Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2209a6c3

Von Hans P. Schlaepfer vor fast 4 Jahren hinzugefügt

  • ID 2209a6c31b4c176cfd5d58b3b81ef7334487bf60
  • Vorgänger a9af91ec
  • Nachfolger d78cfbde

Neues Design 2019 Standard-Code templates/webpages/order/tabs/_second_row.html

War schwierig zu splitten, darum mehrfach auftretenden +/- Zeilen am Schluss

Unterschiede anzeigen:

templates/webpages/order/tabs/_second_row.html
5 5
[% USE P %]
6 6

  
7 7
<table>
8
  <tr><td colspan="100%">
9
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
10
      <b>[%- 'Serial No.' | $T8 %]</b>&nbsp;
11
      [%- L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15) %]&nbsp;
12
    [%- END %]
13
    <b>[%- 'Project' | $T8 %]</b>&nbsp;
14
    [% P.project.picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]&nbsp;
15
    [%- IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
16
      <b>[%- 'Reqdate' | $T8 %]</b>&nbsp;
17
      [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %]&nbsp;
18
    [%- END %]
19
    <b>[%- 'Subtotal' | $T8 %]</b>&nbsp;
20
    [% L.yes_no_tag("order.orderitems[].subtotal", ITEM.subtotal) %]&nbsp;
21
    [%- IF (TYPE == "sales_order" || TYPE == "sales_quotation") %]
22
      <b>[%- 'Ertrag' | $T8 %]</b>&nbsp;
23
        <span name="linemargin">
24
          <span[%- IF ITEM.marge_total < 0 -%] class="plus0"[%- END -%]>
25
            [%- LxERP.format_amount(ITEM.marge_total, 2, 0) %]&nbsp;&nbsp;
26
            [%- LxERP.format_amount(ITEM.marge_percent, 2, 0) %]%
27
          </span>
28
       </span>&nbsp;
29
      <b>[%- 'LP' | $T8 %]</b>&nbsp;
30
      [%- LxERP.format_amount(ITEM.part.listprice, 2, 0) %]&nbsp;
31
      <b>[%- 'EK' | $T8 %]</b>&nbsp;
32
        [%- L.input_tag("order.orderitems[].lastcost_as_number",
33
                        ITEM.lastcost_as_number,
34
                        size = 5,
35
                        class="recalc reformat_number numeric") %]&nbsp;
36
    [%- END %]
37
    <b>[%- 'On Hand' | $T8 %]</b>&nbsp;
38
      <span[%- IF ITEM.part.onhand < ITEM.part.rop -%] class="plus0"[%- END -%]>
39
        [%- LxERP.format_amount(ITEM.part.onhand_as_number, 2, 0) -%]&nbsp;[%- ITEM.part.unit -%]
40
      </span>&nbsp;
41
  </td></tr>
42

  
43 8
  <tr>
44
    [%- SET n = 0 %]
45
    [%- FOREACH var = ITEM.cvars_by_config %]
46
    [%- NEXT UNLESS (var.config.processed_flags.editable && ITEM.part.cvar_by_name(var.config.name).is_valid) %]
47
    [%- SET n = n + 1 %]
48
    <th>
49
      [% var.config.description %]
50
    </th>
51 9
    <td>
52
      [% L.hidden_tag('order.orderitems[].custom_variables[+].config_id', var.config.id) %]
53
      [% L.hidden_tag('order.orderitems[].custom_variables[].id', var.id) %]
54
      [% L.hidden_tag('order.orderitems[].custom_variables[].sub_module', var.sub_module) %]
55
      [% INCLUDE 'common/render_cvar_input.html' var_name='order.orderitems[].custom_variables[].unparsed_value' %]
10
      [% IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
11
        <b>[% 'Serial No.' | $T8 %]</b> [% L.input_tag("order.orderitems[].serialnumber", ITEM.serialnumber, size = 15) %]
12
      [% END %]
13
      <b>[% 'Project' | $T8 %]</b> [% P.project.picker("order.orderitems[].project_id", ITEM.project_id, size = 15) %]
14
      [% IF (TYPE == "sales_order" || TYPE == "purchase_order") %]
15
        <b>[% 'Reqdate' | $T8 %]</b> [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %] 
16
      [% END %]
17
      <b>[% 'Subtotal' | $T8 %]</b> [% L.yes_no_tag("order.orderitems[].subtotal", ITEM.subtotal) %] 
18
      [% IF (TYPE == "sales_order" || TYPE == "sales_quotation") %]
19
        <b>[% 'Ertrag' | $T8 %]</b> 
20
          <span name="linemargin">
21
            <span[% IF ITEM.marge_total < 0 %] class="plus0"[% END %]>
22
              [% LxERP.format_amount(ITEM.marge_total, 2, 0) %]  
23
              [% LxERP.format_amount(ITEM.marge_percent, 2, 0) %]%
24
            </span>
25
         </span> 
26
        <b> [% 'LP' | $T8 %]</b> 
27
        [% LxERP.format_amount(ITEM.part.listprice, 2, 0) %] 
28
        <b>[% 'EK' | $T8 %]</b> 
29
          [% L.input_tag("order.orderitems[].lastcost_as_number",
30
                          ITEM.lastcost_as_number,
31
                          size = 5,
32
                          class="recalc reformat_number numeric") %] 
33
      [% END %]
34
      <b>[% 'On Hand' | $T8 %]</b> 
35
        <span[% IF ITEM.part.onhand < ITEM.part.rop %] class="plus0"[% END %]>
36
          [% LxERP.format_amount(ITEM.part.onhand_as_number, 2, 0) %] [% ITEM.part.unit %]
37
        </span> 
56 38
    </td>
57
    [%- IF (n % (MYCONFIG.form_cvars_nr_cols || 3)) == 0 %]
58

  
59
  </tr><tr>
60
    [%- END %]
61
    [%- END %]
39
  </tr>
40
  <tr>
41
    [% SET n = 0 %]
42
    [% FOREACH var = ITEM.cvars_by_config %]
43
      [% NEXT UNLESS (var.config.processed_flags.editable && ITEM.part.cvar_by_name(var.config.name).is_valid) %]
44
      [% SET n = n + 1 %]
45
      <td>
46
        [% L.hidden_tag('order.orderitems[].custom_variables[+].config_id', var.config.id) %]
47
        [% L.hidden_tag('order.orderitems[].custom_variables[].id', var.id) %]
48
        [% L.hidden_tag('order.orderitems[].custom_variables[].sub_module', var.sub_module) %]
49
        [% INCLUDE 'common/render_cvar_input.html' var_name='order.orderitems[].custom_variables[].unparsed_value' %]
50
      </td>
51
      [% IF (n % (MYCONFIG.form_cvars_nr_cols || 3)) == 0 %]
52
        </tr><tr>
53
      [% END %]
54
    [% END %]
62 55
  </tr>
63 56
</table>

Auch abrufbar als: Unified diff