Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 6f677221

Von Sven Schöling vor mehr als 3 Jahren hinzugefügt

DeliveryOrder: Template Anpassungen

Unterschiede anzeigen:

templates/webpages/delivery_order/tabs/_item_input.html
9 9
        <th class="listheading" nowrap >[%- 'Part'         | $T8 %] </th>
10 10
        <th class="listheading" nowrap >[%- 'Description'  | $T8 %] </th>
11 11
        <th class="listheading" nowrap width="5" >[%- 'Qty'          | $T8 %] </th>
12
        <th class="listheading" nowrap width="15">[%- 'Price'        | $T8 %] </th>
13
        <th class="listheading" nowrap width="5" >[%- 'Discount'     | $T8 %] </th>
14 12
        <th></th>
15 13
      </tr>
16 14
    </thead>
17 15
    <tbody>
18 16
      <tr valign="top" class="listrow">
19 17
        <td class="tooltipster-html" title="[%- 'Create a new part' | $T8 -%]">
20
          [% SET type_options = [[ 'part', LxERP.t8('Part') ], [ 'assembly', LxERP.t8('Assembly') ], [ 'service', LxERP.t8('Service') ] ] %]
18
          [% SET type_options = [[ 'part', LxERP.t8('Part') ], [ 'assembly', LxERP.t8('Assembly') ]] %]
21 19
          [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
22 20
            [%- type_options.push([ 'assortment', LxERP.t8('Assortment')]) %]
23 21
          [%- END %]
......
26 24
        </td>
27 25
        <td>[% L.input_tag('add_item.position', '', size = 5, class="add_item_input numeric") %]</td>
28 26
        <td>
29
          [%- SET PARAM_KEY = SELF.cv == "customer" ? 'with_customer_partnumber' : 'with_makemodel' -%]
27
          [%- SET PARAM_KEY = SELF.type_data.properties('is_customer') ? 'with_customer_partnumber' : 'with_makemodel' -%]
30 28
          [%- SET PARAM_VAL = SELF.search_cvpartnumber -%]
31 29
          [% P.part.picker('add_item.parts_id', SELF.created_part, style='width: 300px', class="add_item_input",
32 30
                            fat_set_item=1,
......
39 37
          [% L.input_tag('add_item.qty_as_number', '', size = 5, class="add_item_input numeric") %]
40 38
          [% L.hidden_tag('add_item.unit', SELF.created_part.unit, class="add_item_input") %]
41 39
        </td>
42
        [%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%]
43
        <td>[% L.input_tag('add_item.sellprice_as_number', price, size = 10, class="add_item_input numeric") %]</td>
44
        <td>[% L.input_tag('add_item.discount_as_percent', '', size = 5, class="add_item_input numeric") %]</td>
45 40
        <td>[% L.button_tag('kivi.DeliveryOrder.add_item()', LxERP.t8('Add part')) %]</td>
46 41
      </tr>
47 42
    </tbody>
templates/webpages/delivery_order/tabs/_row.html
77 77
        [%- L.hidden_tag("formula[+]", ITEM.part.formel) -%]
78 78
      [%- END -%]
79 79
    </td>
80
    <td>
81
      [%- L.select_tag("order.orderitems[].price_factor_id",
82
                       SELF.all_price_factors,
83
                       default = ITEM.price_factor_id,
84
                       title_key = 'description',
85
                       with_empty = 1) %]
86
    </td>
87 80
    <td nowrap>
88 81
      [%- L.select_tag("order.orderitems[].unit",
89 82
                      ITEM.part.available_units,
......
92 85
                      value_key = 'name',
93 86
                      class = 'unitselect') %]
94 87
    </td>
95
    [% SET RIGHT_TO_EDIT_PRICES = 0 %]
96
    [% IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") %]
97
      [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('sales_edit_prices', 1) %]
98
    [% END %]
99
    [% IF (SELF.type == "purchase_order" || SELF.type == "request_quotation") %]
100
      [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('purchase_edit_prices', 1) %]
101
    [% END %]
102
    <td>
103
      [%- SET EDIT_PRICE = (RIGHT_TO_EDIT_PRICES) %]
104
      <div name="editable_price" [%- IF !EDIT_PRICE %]style="display:none"[%- END %] class="numeric">
105
        [%- L.input_tag("order.orderitems[].sellprice_as_number",
106
                        ITEM.sellprice_as_number,
107
                        size = 10,
108
                        disabled=(EDIT_PRICE? '' : 1),
109
                        class="reformat_number numeric") %]
110
      </div>
111
      <div name="not_editable_price" [%- IF EDIT_PRICE %]style="display:none"[%- END %]>
112
        [%- L.div_tag(ITEM.sellprice_as_number, name="sellprice_text", class="numeric") %]
113
        [%- L.hidden_tag("order.orderitems[].sellprice_as_number",
114
                         ITEM.sellprice_as_number,
115
                         disabled=(EDIT_PRICE? 1 : '')) %]
116
      </div>
117
    </td>
118
    <td>
119
      [%- SET EDIT_DISCOUNT = (RIGHT_TO_EDIT_PRICES) %]
120
      <div name="editable_discount" [%- IF !EDIT_DISCOUNT %]style="display:none"[%- END %] class="numeric">
121
        [%- L.input_tag("order.orderitems[].discount_as_percent",
122
                        ITEM.discount_as_percent,
123
                        size = 5,
124
                        disabled=(EDIT_DISCOUNT? '' : 1),
125
                        class="reformat_number numeric") %]
126
      </div>
127
      <div name="not_editable_discount" [%- IF EDIT_DISCOUNT %]style="display:none"[%- END %]>
128
        [%- L.div_tag(ITEM.discount_as_percent, name="discount_text", class="numeric") %]
129
        [%- L.hidden_tag("order.orderitems[].discount_as_percent",
130
                         ITEM.discount_as_percent,
131
                         disabled=(EDIT_DISCOUNT? 1 : '')) %]
132
      </div>
133
    </td>
134
    <td align="right">
135
      [%- L.div_tag(LxERP.format_amount(ITEM.linetotal, 2, 0), name="linetotal") %]
136
    </td>
137

  
138 88
  </tr>
139 89

  
140 90
  <tr [%- IF !MYCONFIG.show_form_details -%]style="display:none"[%- END -%]>
templates/webpages/delivery_order/tabs/_second_row.html
16 16
      <b>[%- 'Reqdate' | $T8 %]</b>&nbsp;
17 17
      [% L.date_tag("order.orderitems[].reqdate_as_date", ITEM.reqdate_as_date) %]&nbsp;
18 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 19
    <b>[%- 'On Hand' | $T8 %]</b>&nbsp;
38 20
      <span[%- IF ITEM.part.onhand < ITEM.part.rop -%] class="numeric plus0"[%- END -%]>
39 21
        [%- ITEM.part.onhand_as_number -%]&nbsp;[%- ITEM.part.unit -%]
40 22
      </span>&nbsp;
41
    <b>[%- 'Optional' | $T8 %]</b>&nbsp;
42
      [%- L.yes_no_tag("order.orderitems[].optional", ITEM.optional
43
                        class="recalc") %]&nbsp;
44 23
  </td></tr>
45 24

  
46 25
  <tr>
templates/webpages/delivery_order/tabs/basic_data.html
53 53

  
54 54
          [%- PROCESS delivery_order/tabs/_business_info_row.html SELF=SELF %]
55 55

  
56
          <tr>
57
            <th align="right">[% 'Steuersatz' | $T8 %]</th>
58
            <td>[% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', style='width: 300px', class='recalc') %]</td>
59
          </tr>
60

  
61
          [% SET currency_id = SELF.order.currency_id || INSTANCE_CONF.get_currency_id  # use default currency for new order %]
62
          <tr id="currency_settings">
63
            <th align="right">[% 'Currency' | $T8 %]</th>
64
            <td>[% L.select_tag('order.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name') %]</td>
65
          </tr>
66
          <tr id="exchangerate_settings" [%- IF SELF.order.currency_id==INSTANCE_CONF.get_currency_id %]style='display:none'[%- END %]>
67
            <th align="right">[% 'Exchangerate' | $T8 %]</th>
68
            <td> 1 <span id="currency_name">[% SELF.order.currency.name %]</span> =
69
              [% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, size="15", class="reformat_number_as_null_number numeric") %]
70
              [% INSTANCE_CONF.default_currency %]
71
              [% L.hidden_tag('old_currency_id', currency_id) %]
72
              [% L.hidden_tag('old_exchangerate', SELF.order.exchangerate_as_null_number) %]
73
            </td>
74
          </tr>
75

  
76 56
[%- IF SELF.all_languages.size %]
77 57
          <tr>
78 58
            <th align="right">[% 'Language' | $T8 %]</th>
......
120 100
          <tr>
121 101
            <td colspan="2" align="center">
122 102
              [%- IF SELF.order.id %]
123
                <label for="order.delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label>
124
                [% L.yes_no_tag('order.delivered', SELF.order.delivered) %]
125
                <label for="order.closed">[% 'Closed' | $T8 %]</label>
126
                [% L.yes_no_tag('order.closed', SELF.order.closed) %]
103
                [%- IF SELF.order.delivered %]
104
                  [%- IF is_customer %]
105
                  [% 'transferred out' | $T8 %]
106
                  [%- ELSE %]
107
                  [% 'transferred in' | $T8 %]
108
                  [%- END %]
109
                [%- ELSE %]
110
                  [%- IF is_customer %]
111
                  [% 'not transferred out yet' | $T8 %]
112
                  [%- ELSE %]
113
                  [% 'not transferred in yet' | $T8 %]
114
                  [%- END %]
115
                [%- END %]
116
               ;
117
                [%- IF SEF.order.closed %]
118
                  [% 'Closed' | $T8 %]
119
                [%- ELSE %]
120
                  [% 'Open' | $T8 %]
121
                [%- END %]
127 122
              [%- END %]
128 123
            </td>
129 124
          </tr>
......
146 141
          </tr>
147 142
          [% END %]
148 143

  
149
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
150 144
          <tr>
151
            <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
152
            <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %]</td>
145
            <th width="70%" align="right" nowrap>[% 'Delivery Order Number' | $T8 %]</th>
146
            <td>[% L.input_tag('order.donumber', SELF.order.donumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %]</td>
153 147
          </tr>
154
          [%- END -%]
155 148

  
156
          [%- IF (SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
157
            [%- SET quo_nr_txt = 'Quotation Number' -%]
158
          [%- ELSE -%]
159
            [%- SET quo_nr_txt = 'RFQ Number' -%]
160
          [%- END -%]
161 149
          <tr>
162
            <th width="70%" align="right" nowrap>[% quo_nr_txt | $T8 %]</th>
163
            [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
164
              <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11) %]</td>
165
            [%- ELSE -%]
166
              <td>[% L.input_tag('order.quonumber', SELF.order.quonumber, size = 11, onchange='kivi.DeliveryOrder.set_number_in_title(this)') %]</td>
167
            [%- END -%]
150
            <th width="70%" align="right" nowrap>[% 'Order Number' | $T8 %]</th>
151
            <td>[% L.input_tag('order.ordnumber', SELF.order.ordnumber, size = 11) %]</td>
168 152
          </tr>
169 153

  
170
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
171 154
          <tr>
172
            <th width="70%" align="right" nowrap>[% 'Customer Order Number' | $T8 %]</th>
155
            <th width="70%" align="right" nowrap>[% IF SELF.type_data.properties('is_customer') %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]</th>
173 156
            <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, size = 11) %]</td>
174 157
          </tr>
175
          [%- END -%]
176

  
177
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
178
            [%- SET transdate_txt = 'Order Date' -%]
179
          [%- ELSIF SELF.type == "sales_quotation" -%]
180
            [%- SET transdate_txt = 'Quotation Date' -%]
181
          [%- ELSE -%]
182
            [%- SET transdate_txt = 'RFQ Date' -%]
183
          [%- END -%]
184
          <tr>
185
            <th width="70%" align="right" nowrap>[% transdate_txt | $T8 %]</th>
186
            <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %]</td>
187
          </tr>
188 158

  
189 159
          <tr>
190
            <th width="70%" align="right" nowrap>[% 'Tax point' | $T8 %]</th>
191
            <td>[% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class="recalc") %]</td>
160
            <th width="70%" align="right" nowrap>[% 'Delivery Order Date' | $T8 %]</th>
161
            <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date) %]</td>
192 162
          </tr>
193 163

  
194
          [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
195
            [%- SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' -%]
196
          [%- ELSIF SELF.type == "sales_quotation" -%]
197
            [%- SET reqdate_txt = 'Valid until'; SET reqdate_class = '' -%]
198
          [%- ELSE -%]
199
            [%- SET reqdate_txt = 'Required by'; SET reqdate_class = 'recalc' -%]
200
          [%- END -%]
201 164
          <tr>
202
            <th width="70%" align="right" nowrap>[% reqdate_txt | $T8 %]</th>
165
            <th width="70%" align="right" nowrap>[% 'Reqdate' | $T8 %]</th>
203 166
            <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class=reqdate_class) %]</td>
204 167
          </tr>
205 168

  
206
          [%- IF SELF.type == "sales_quotation" -%]
207
          <tr>
208
            <th width="70%" align="right" nowrap>[% 'Order probability' | $T8 %]</th>
209
            <td>[%- L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]%</td>
210
          </tr>
211
          <tr>
212
            <th width="70%" align="right" nowrap>[% 'Expected billing date' | $T8 %]</th>
213
            <td>[%- L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_as_date) %]</td>
214
          </tr>
215
          [%- END %]
216

  
217 169
          <tr>
218 170
            <th width="70%" align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
219 171
            <td>[% SELF.order.itime_as_date %]</td>
220 172
          </tr>
221

  
222 173
        </table>
223 174

  
224 175
      </td>
......
270 221
                <th id="shipped_qty_header_id"  class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("shipped_qty")'>[%- 'Delivered'   | $T8 %]</a></th>
271 222
                [%- END -%]
272 223
                <th id="qty_header_id"          class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
273
                <th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th>
274 224
                <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
275
                <th id="sellprice_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("sellprice")'> [%- 'Price'       | $T8 %]</a></th>
276
                <th id="discount_header_id"    class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.DeliveryOrder.reorder_items("discount")'>  [%- 'Discount'    | $T8 %]</a></th>
277
                <th class="listheading" nowrap width="10">[%- 'Extended'     | $T8 %] </th>
278 225
              </tr>
279 226
            </thead>
280 227

  

Auch abrufbar als: Unified diff