]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/delivery_order/tabs/_row.html
date error in mapping
[mfinanz.git] / templates / webpages / delivery_order / tabs / _row.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- USE P %]
6
7 <tbody class="row_entry listrow" data-position="[%- HTML.escape(ITEM.position) -%]"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]>
8   <tr>
9     <td align="center">
10       [%- IF MYCONFIG.show_form_details %]
11         [% L.img_tag(src="image/collapse.svg",
12                      alt=LxERP.t8('Hide details'), title=LxERP.t8('Hide details'), class="expand") %]
13       [%- ELSE %]
14         [% L.img_tag(src="image/expand.svg",
15                      alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand") %]
16       [%- END %]
17       [% L.hidden_tag("orderitem_ids[+]", ID) %]
18       [% L.hidden_tag("converted_from_record_item_type_ref[+]", ITEM.converted_from_record_item_type_ref) %]
19       [% L.hidden_tag("converted_from_record_item_id[+]",       ITEM.converted_from_record_item_id) %]
20       [% L.hidden_tag("order.orderitems[+].id", ITEM.id, id='item_' _ ID) %]
21       [% L.hidden_tag("order.orderitems[].stock_info", ITEM.stock_info, class="data-stock-info") %]
22       [% L.hidden_tag("order.orderitems[].parts_id", ITEM.parts_id) %]
23       [% L.hidden_tag("order.orderitems[].sellprice", ITEM.sellprice) %]
24       [% L.hidden_tag("order.orderitems[].discount", ITEM.discount) %]
25       [% L.hidden_tag("order.orderitems[].ordnumber", ITEM.ordnumber) %]
26       [% L.hidden_tag("order.orderitems[].transdate", ITEM.transdate) %]
27       [% L.hidden_tag("order.orderitems[].cusordnumber", ITEM.cusordnumber) %]
28       [% L.hidden_tag("order.orderitems[].base_qty", ITEM.base_qty) %]
29       [% L.hidden_tag("order.orderitems[].lastcost", ITEM.lastcost) %]
30       [% L.hidden_tag("order.orderitems[].price_factor_id", ITEM.price_factor_id) %]
31       [% L.hidden_tag("order.orderitems[].price_factor", ITEM.price_factor) %]
32       [% L.hidden_tag("order.orderitems[].marge_price_factor", ITEM.marge_price_factor) %]
33       [% L.hidden_tag("order.orderitems[].pricegroup_id", ITEM.pricegroup_id) %]
34       [% L.hidden_tag("order.orderitems[].active_price_source", ITEM.active_price_source.source) %]
35       [% L.hidden_tag("order.orderitems[].active_discount_source", ITEM.active_discount_source.source) %]
36     </td>
37     <td>
38       <div name="position" class="numeric">
39         [% HTML.escape(ITEM.position) %]
40       </div>
41     </td>
42     <td align="center">
43       <img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]" class="dragdrop">
44     </td>
45     <td align="center">
46       [%- L.button_tag("kivi.DeliveryOrder.delete_order_item_row(this)",
47                        LxERP.t8("X"),
48                        confirm=LxERP.t8("Are you sure?")) %]
49     </td>
50     [%- IF SELF.show_update_button -%]
51     <td align="center">
52       [%- L.img_tag(src="image/rotate_cw.svg",
53                     alt=LxERP.t8('Update from master data'),
54                     title= LxERP.t8('Update from master data'),
55                     onclick="if (!confirm('" _ LxERP.t8("Are you sure to update this position from master data?") _ "')) return false; kivi.DeliveryOrder.update_row_from_master_data(this);",
56                     id='update_from_master') %]
57     </td>
58     [%- END -%]
59     <td>
60       <div name="partnumber">
61         [%- P.link_tag(SELF.url_for(controller='Part', action='edit', 'part.id'=ITEM.part.id), ITEM.part.partnumber, target="_blank", title=LxERP.t8('Open in new window')) -%]
62       </div>
63     </td>
64     [%- IF SELF.search_cvpartnumber -%]
65     <td>
66       <div name="cvpartnumber">[% HTML.escape(ITEM.cvpartnumber) %]</div>
67     </td>
68     [%- END -%]
69     <td>
70       <div name="partclassification">[% ITEM.part.presenter.typeclass_abbreviation %]</div>
71     </td>
72     <td>
73       [% L.areainput_tag("order.orderitems[].description",
74                      ITEM.description,
75                      size='40',
76                      style='width: 300px') %]
77       [%- L.hidden_tag("order.orderitems[].longdescription", ITEM.longdescription) %]
78       [%- L.button_tag("kivi.DeliveryOrder.show_longdescription_dialog(this)", LxERP.t8("L")) %]
79     </td>
80     [%- IF (SELF.type == "sales_order" || SELF.type == "purchase_order") -%]
81     <td nowrap>
82       [%- L.div_tag(LxERP.format_amount(ITEM.shipped_qty, 2, 0) _ ' ' _ ITEM.unit, name="shipped_qty", class="numeric") %]
83     </td>
84     [%- END -%]
85     <td nowrap>
86       [%- L.input_tag("order.orderitems[].qty_as_number",
87                       ITEM.qty_as_number,
88                       size = 5,
89                       class="reformat_number numeric") %]
90       [%- IF ITEM.part.formel -%]
91         [%- L.button_tag("kivi.DeliveryOrder.show_calculate_qty_dialog(this)", LxERP.t8("*/")) %]
92         [%- L.hidden_tag("formula[+]", ITEM.part.formel) -%]
93       [%- END -%]
94     </td>
95     <td nowrap>
96       [%- L.select_tag("order.orderitems[].unit",
97                       ITEM.part.available_units,
98                       default = ITEM.unit,
99                       title_key = 'name',
100                       value_key = 'name',
101                       class = 'unitselect') %]
102     </td>
103
104     <td>
105       <span id="stock_[% ID %]" class="data-stock-qty">[% SELF.calculate_stock_in_out(ITEM) %] [% ITEM.unit %]</span>
106       [% P.button_tag("kivi.DeliveryOrder.open_stock_in_out_dialog(this, '" _ in_out _"')", "?") %]
107     </td>
108   </tr>
109
110   <tr [%- IF !MYCONFIG.show_form_details -%]style="display:none"[%- END -%]>
111     <td colspan="100%">
112       [%- IF MYCONFIG.show_form_details || ITEM.render_second_row %]
113         <div name="second_row" data-loaded="1">
114           [%- PROCESS delivery_order/tabs/_second_row.html ITEM=ITEM TYPE=SELF.type %]
115         </div>
116       [%- ELSE %]
117         <div name="second_row" id="second_row_[% ID %]">
118           [%- LxERP.t8("Loading...") %]
119         </div>
120       [%- END %]
121     </td>
122   </tr>
123
124 </tbody>