88888e9db2c0b85db2bf27d95add9114758d9220
[kivitendo-erp.git] / templates / webpages / order / tabs / _row.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5
6 <tbody class="row_entry">
7
8   <tr class="listrow0">
9     <td style='display:none'>
10       [% L.hidden_tag("orderitem_ids[+]", ID) %]
11       [% L.hidden_tag("order.orderitems[+].id", ITEM.id, id='item_' _ ID) %]
12       [% L.hidden_tag("order.orderitems[].parts_id", ITEM.parts_id) %]
13     </td>
14     <td>
15       <div name="position" class="numeric">
16         [% HTML.escape(ITEM.position) %]
17       </div>
18     </td>
19     <td align="center">
20       <img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop">
21     </td>
22     <td align="center">
23       [%- L.button_tag("kivi.Order.delete_order_item_row(this)",
24                        LxERP.t8("X"),
25                        confirm=LxERP.t8("Are you sure?")) %]
26     </td>
27     <td>
28       <div name="partnumber">[% HTML.escape(ITEM.part.partnumber) %]</div>
29     </td>
30     <td>
31       [% L.input_tag("order.orderitems[].description",
32                      ITEM.description,
33                      style='width: 300px') %]
34       [%- L.button_tag("kivi.Order.show_longdescription_dialog(this)", LxERP.t8("L")) %]
35     </td>
36     <td>
37       [%- L.input_tag("order.orderitems[].qty_as_number",
38                       ITEM.qty_as_number,
39                       size = 5,
40                       class="recalc reformat_number numeric") %]
41     </td>
42     <td>
43       [%- L.select_tag("order.orderitems[].price_factor_id",
44                        ALL_PRICE_FACTORS,
45                        default = ITEM.price_factor_id,
46                        title_key = 'description',
47                        with_empty = 1,
48                        class="recalc") %]
49     </td>
50     <td nowrap>
51       [%- L.select_tag("order.orderitems[].unit",
52                       ITEM.part.available_units,
53                       default = ITEM.unit,
54                       title_key = 'name',
55                       value_key = 'name',
56                       class = 'unitselect') %]
57     </td>
58     <td>
59       [%- L.button_tag("kivi.Order.price_chooser_item_row(this)",
60                        ITEM.active_price_source.source_description _ ' | ' _ ITEM.active_discount_source.source_description,
61                        name = "price_chooser_button") %]
62     </td>
63     <td>
64       [%- L.hidden_tag("order.orderitems[].active_price_source", ITEM.active_price_source.source) %]
65       [%- SET EDIT_PRICE = (AUTH.assert('edit_prices', 1) && ITEM.active_price_source.source == '') %]
66       <div name="editable_price" [%- IF !EDIT_PRICE %]style="display:none"[%- END %] class="numeric">
67         [%- L.input_tag("order.orderitems[].sellprice_as_number",
68                         ITEM.sellprice_as_number,
69                         size = 10,
70                         disabled=(EDIT_PRICE? '' : 1),
71                         class="recalc reformat_number numeric") %]
72       </div>
73       <div name="not_editable_price" [%- IF EDIT_PRICE %]style="display:none"[%- END %]>
74         [%- L.div_tag(ITEM.sellprice_as_number, name="sellprice_text", class="numeric") %]
75         [%- L.hidden_tag("order.orderitems[].sellprice_as_number",
76                          ITEM.sellprice_as_number,
77                          disabled=(EDIT_PRICE? 1 : '')) %]
78       </div>
79     </td>
80     <td>
81       [%- L.hidden_tag("order.orderitems[].active_discount_source", ITEM.active_discount_source.source) %]
82       [%- SET EDIT_DISCOUNT = (AUTH.assert('edit_prices', 1) && ITEM.active_discount_source.source == '') %]
83       <div name="editable_discount" [%- IF !EDIT_DISCOUNT %]style="display:none"[%- END %] class="numeric">
84         [%- L.input_tag("order.orderitems[].discount_as_percent",
85                         ITEM.discount_as_percent,
86                         size = 5,
87                         disabled=(EDIT_DISCOUNT? '' : 1),
88                         class="recalc reformat_number numeric") %]
89       </div>
90       <div name="not_editable_discount" [%- IF EDIT_DISCOUNT %]style="display:none"[%- END %]>
91         [%- L.div_tag(ITEM.discount_as_percent, name="discount_text", class="numeric") %]
92         [%- L.hidden_tag("order.orderitems[].discount_as_percent",
93                          ITEM.discount_as_percent,
94                          disabled=(EDIT_DISCOUNT? 1 : '')) %]
95       </div>
96     </td>
97     <td align="right">
98       [%- L.div_tag(LxERP.format_amount(ITEM.linetotal, 2, 0), name="linetotal") %]
99     </td>
100
101   </tr>
102
103   <tr class="listrow1" style="display:none">
104     <td colspan="100%">
105       <div name="second_row">
106         [%- LxERP.t8("Loading...") %]
107       </div>
108     </td>
109   </tr>
110
111 </tbody>