]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/order/tabs/_item_input.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / order / tabs / _item_input.html
1 [% USE T8 %]
2 [% USE HTML %]
3 [% USE LxERP %]
4 [% USE L %]
5 [% USE P %]
6
7 <div class="wrapper panel-wrapper">
8 <div class="input-panel control-panel">
9   <table id="input_row_table_id" class="tbl-plain condensed">
10     <caption>[% 'Add Parts here!' | $T8 %]</caption>
11     <tbody>
12       <tr>
13         <td>
14           <span class="label above">[% 'position' | $T8 %] </span>
15           [% L.input_tag('add_item.position', '', size = 5, class="add_item_input numeric") %]
16         </td>
17         <td>
18           <span class="label above">[% 'Part' | $T8 %] </span>
19           [%- SET PARAM_KEY = SELF.cv == "customer" ? 'with_customer_partnumber' : 'with_makemodel' -%]
20           [%- SET PARAM_VAL = SELF.search_cvpartnumber -%]
21           [% P.part.picker('add_item.parts_id', SELF.created_part, class="add_item_input wi-normal",
22              fat_set_item=1,
23              multiple_pos_input=1,
24              action={set_multi_items='kivi.Order.add_multi_items'},
25              classification_id=SELF.part_picker_classification_ids.as_list.join(','),
26              not_order_locked=SELF.type_data.no_order_locked_parts,
27              $PARAM_KEY=PARAM_VAL) %]
28         </td>
29         <td>
30           <span class="label above">[% 'Description' | $T8 %] </span>
31           [% L.input_tag('add_item.description', SELF.created_part.description, class="add_item_input wi-normal") %]
32         </td>
33         <td>
34           <span class="label above">[% 'Qty' | $T8 %]</span>
35           [% L.input_tag('add_item.qty_as_number', '', placeholder="1", class="add_item_input numeric wi-verysmall") %]
36           [% L.hidden_tag('add_item.unit', SELF.created_part.unit, class="add_item_input") %]
37         </td>
38         [%- SET price = '' %]
39         [%- IF SELF.created_part %]
40           [%- SET price = LxERP.format_amount(((SELF.type == 'sales_quotation' || SELF.type == 'sales_order_intake' || SELF.type == 'sales_order') ? SELF.created_part.sellprice : SELF.created_part.lastcost), -2) -%]
41         [%- END %]
42         <td>
43           <span class="label above">[% 'Price' | $T8 %]</span>
44           [% L.input_tag('add_item.sellprice_as_number', price, class="add_item_input numeric wi-verysmall") %]
45         </td>
46         <td>
47           <span class="label above">[% 'Discount' | $T8 %]</span>
48           [% L.input_tag('add_item.discount_as_percent', '', class="add_item_input numeric wi-smallest") %]
49         </td>
50         <td style="vertical-align:bottom;">[% L.button_tag('kivi.Order.add_item()', LxERP.t8('Add part'), style='margin:0;') %]</td>
51       </tr>
52     </tbody>
53   </table>
54   <div style="clear:both">[% L.button_tag('kivi.Order.open_multi_items_dialog()', LxERP.t8('Add multiple items'), class='neutral') %]</div>
55 </div><!-- /.entry-panel -->
56
57 <div class="input-panel control-panel short">
58   <table id="create_part_table_id" class="tbl-plain condensed">
59     <caption>[% 'Create a new part' | $T8 %]!</caption>
60     <tbody>
61       <tr>
62         <td class="tooltipster-html" title="[%- 'Create a new part' | $T8 -%]">
63           <span class="label above">[% 'Part Type' | $T8 %] </span>
64           [% SET type_options = [[ 'part', LxERP.t8('Part') ], [ 'assembly', LxERP.t8('Assembly') ], [ 'service', LxERP.t8('Service') ]] %]
65           [%- type_options.push([ 'assortment', LxERP.t8('Assortment')]) %]
66           [% L.select_tag('add_item.create_part_type', type_options) %]
67           [% L.button_tag('kivi.Order.create_part()', LxERP.t8('+')) %]
68         </td>
69       </tr>
70     </tbody>
71   </table>
72 </div><!-- /.entry-panel -->
73 </div><!-- /.wrapper -->