1b1bf60602430e4d393e7aa447d6c1f28f80328d
[kivitendo-erp.git] / templates / webpages / order / tabs / _item_input.html
1 [%- USE T8 %][%- USE HTML %][%- USE LxERP %][%- USE L %][%- USE P %]
2
3  <div>
4   <table id="input_row_table_id">
5     <thead>
6       <tr class="listheading">
7         <th class="listheading" nowrap >[%- '+'            | $T8 %] </th>
8         <th class="listheading" nowrap >[%- 'position'     | $T8 %] </th>
9         <th class="listheading" nowrap >[%- 'Part'         | $T8 %] </th>
10         <th class="listheading" nowrap >[%- 'Description'  | $T8 %] </th>
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         <th></th>
15       </tr>
16     </thead>
17     <tbody>
18       <tr valign="top" class="listrow">
19         <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') ] ] %]
21           [%- IF INSTANCE_CONF.get_feature_experimental_assortment %]
22             [%- type_options.push([ 'assortment', LxERP.t8('Assortment')]) %]
23           [%- END %]
24           [% L.select_tag('add_item.create_part_type', type_options) %]
25           [% L.button_tag('kivi.Order.create_part()', LxERP.t8('+')) %]
26         </td>
27         <td>[% L.input_tag('add_item.position', '', size = 5, class="add_item_input numeric") %]</td>
28         <td>
29           [%- SET PARAM_KEY = SELF.cv == "customer" ? 'with_customer_partnumber' : 'with_makemodel' -%]
30           [%- SET PARAM_VAL = SELF.search_cvpartnumber -%]
31           [% P.part.picker('add_item.parts_id', SELF.created_part, style='width: 300px', class="add_item_input",
32                             fat_set_item=1,
33                             multiple_pos_input=1,
34                             action={set_multi_items='kivi.Order.add_multi_items'},
35                             classification_id=SELF.part_picker_classification_ids.as_list.join(','),
36                             $PARAM_KEY=PARAM_VAL) %]</td>
37         <td>[% L.input_tag('add_item.description', SELF.created_part.description, class="add_item_input") %]</td>
38         <td>
39           [% L.input_tag('add_item.qty_as_number', '', size = 5, class="add_item_input numeric") %]
40           [% L.hidden_tag('add_item.unit', SELF.created_part.unit, class="add_item_input") %]
41         </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         <td>[% L.button_tag('kivi.Order.add_item()', LxERP.t8('Add part')) %]</td>
46       </tr>
47     </tbody>
48   </table>
49  </div>