]> wagnertech.de Git - mfinanz.git/blob - templates/design40_webpages/reclamation/tabs/basic_data/_row.html
date error in mapping
[mfinanz.git] / templates / design40_webpages / reclamation / tabs / basic_data / _row.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- USE P %]
6 [% # L.dump( ITEM ) %]
7
8 <tbody class="row_entry listrow" data-position="[%- HTML.escape(ITEM.position) -%]"[%- IF MYCONFIG.show_form_details -%] data-expanded="1"[%- END -%]>
9   <tr>
10   [% L.hidden_tag("reclamation_item_ids[+]", ID) %]
11   [% L.hidden_tag("converted_from_record_item_type_ref[+]", ITEM.converted_from_record_item_type_ref) %]
12   [% L.hidden_tag("converted_from_record_item_id[+]",       ITEM.converted_from_record_item_id) %]
13   [% L.hidden_tag("reclamation.reclamation_items[+].id", ITEM.id, id='item_' _ ID) %]
14   [% L.hidden_tag("reclamation.reclamation_items[].parts_id", ITEM.parts_id) %]
15     <td>
16       [%- IF MYCONFIG.show_form_details %]
17         [% L.img_tag(src="image/collapse.svg",
18                      alt=LxERP.t8('Hide details'), title=LxERP.t8('Hide details'), class="expand row-icon") %]
19       [%- ELSE %]
20         [% L.img_tag(src="image/expand.svg",
21                      alt=LxERP.t8('Show details'), title=LxERP.t8('Show details'), class="expand row-icon") %]
22       [%- END %]
23     </td>
24     <td>
25       [% L.checkbox_tag('multi_id_' _ ITEM.position, value=ITEM.id, checked=0) %]
26     </td>
27     <td>
28       <div name="position" class="center">
29         [% HTML.escape(ITEM.position) %]
30       </div>
31     </td>
32     <td align="center">
33       <img src="image/updown.png" alt="[%- LxERP.t8('reclamation item') %]" class="dragdrop">
34     </td>
35     <td>
36       [%- L.button_tag("kivi.Reclamation.delete_reclamation_item_row(this)",
37                        LxERP.t8("X"),
38                        confirm=LxERP.t8("Are you sure?")) %]
39     </td>
40     [%- IF SELF.show_update_button -%]
41     <td>
42       [%- L.img_tag(src="image/rotate_cw.svg",
43                     alt=LxERP.t8('Update from master data'),
44                     title= LxERP.t8('Update from master data'),
45                     onclick="if (!confirm('" _ LxERP.t8("Are you sure to update this position from master data?") _ "')) return false; kivi.Reclamation.update_row_from_master_data(this);",
46                     id='update_from_master',
47                     class='row-icon') %]
48     </td>
49     [%- END -%]
50     <td>
51       <div name="partnumber">
52         [%- 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')) -%]
53       </div>
54     </td>
55     [%- IF SELF.search_cvpartnumber -%]
56     <td>
57       <div name="cvpartnumber">[% HTML.escape(ITEM.cvpartnumber) %]</div>
58     </td>
59     [%- END -%]
60     <td>
61       <div name="partclassification">[% ITEM.part.presenter.typeclass_abbreviation %]</div>
62     </td>
63     <td>
64       [% L.areainput_tag("reclamation.reclamation_items[].description",
65                      ITEM.description,
66                      size='40',
67                      class='wi-lightwide') %]
68       [%- L.hidden_tag("reclamation.reclamation_items[].longdescription", ITEM.longdescription) %]
69       [%- L.button_tag("kivi.Reclamation.show_longdescription_dialog(this)", LxERP.t8("L"), class="wi-tiny neutral") %]
70     </td>
71     <td>[% L.select_tag("reclamation.reclamation_items[].reason_id",
72                         SELF.reclamation.valid_reclamation_reasons,
73                         default=ITEM.reason_id,
74                         title_key = 'name',
75                         value_key = 'id',
76                         with_empty=1,
77                         class="wi-small",
78                         ) %]
79     </td>
80     <td>
81       [% L.areainput_tag("reclamation.reclamation_items[].reason_description_ext",
82                          ITEM.reason_description_ext,
83                          size='40',
84                          class="wi-mediumsmall",
85                          ) %]
86     </td>
87     <td>
88       [% L.areainput_tag("reclamation.reclamation_items[].reason_description_int",
89                          ITEM.reason_description_int,
90                          size='40',
91                          class="wi-mediumsmall",
92                          ) %]
93     </td>
94     <td>
95       [%- L.input_tag("reclamation.reclamation_items[].qty_as_number",
96                       ITEM.qty_as_number,
97                       size = 5,
98                       class="recalc reformat_number numeric wi-verysmall") %]
99       [%- IF ITEM.part.formel -%]
100         [%- L.button_tag("kivi.Reclamation.show_calculate_qty_dialog(this)", LxERP.t8("*/"), class="neutral") %]
101         [%- L.hidden_tag("formula[+]", ITEM.part.formel) -%]
102       [%- END -%]
103     </td>
104     <td>
105       [%- L.select_tag("reclamation.reclamation_items[].price_factor_id",
106                        SELF.all_price_factors,
107                        default = ITEM.price_factor_id,
108                        title_key = 'description',
109                        with_empty = 1,
110                        class="recalc wi-mediumsmall") %]
111     </td>
112     <td>
113       [%- L.select_tag("reclamation.reclamation_items[].unit",
114                       ITEM.part.available_units,
115                       default = ITEM.unit,
116                       title_key = 'name',
117                       value_key = 'name',
118                       class = 'unitselect wi-mediumsmall') %]
119     </td>
120     <td>
121       [%- SET EDIT_PRICE_SOURCE = !(ITEM.is_linked_to_record) %]
122       <div name="editable_price_source" [%- IF !EDIT_PRICE_SOURCE %]style="display:none"[%- END %]>
123         [%- L.button_tag("kivi.Reclamation.price_chooser_item_row(this)",
124                          ITEM.active_price_source.source_description _ ' | ' _ ITEM.active_discount_source.source_description,
125                          name = "price_chooser_button",
126                          class = "neutral",
127                          ) %]
128       </div>
129       <div name="not_editable_price_source" [%- IF EDIT_PRICE_SOURCE %]style="display:none"[%- END %]>
130         [%- L.div_tag(ITEM.active_price_source.description _ ' | ' _ ITEM.active_discount_source.source_description, style="white-space:nowrap;") %]
131       </div>
132     </td>
133     [% SET RIGHT_TO_EDIT_PRICES = 0 %]
134     [% IF (SELF.type == "sales_reclamation") %]
135       [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('sales_edit_prices', 1) %]
136     [% END %]
137     [% IF (SELF.type == "purchase_reclamation") %]
138       [% SET RIGHT_TO_EDIT_PRICES = AUTH.assert('purchase_edit_prices', 1) %]
139     [% END %]
140     <td>
141       [%- L.hidden_tag("reclamation.reclamation_items[].active_price_source", ITEM.active_price_source.source) %]
142       [%- SET EDIT_PRICE = (RIGHT_TO_EDIT_PRICES && ITEM.active_price_source.source == '' && !ITEM.is_linked_to_record) %]
143       <div name="editable_price" [%- IF !EDIT_PRICE %]style="display:none"[%- END %] class="numeric">
144         [%- L.input_tag("reclamation.reclamation_items[].sellprice_as_number",
145                         ITEM.sellprice_as_number,
146                         size = 10,
147                         disabled=(EDIT_PRICE? '' : 1),
148                         class="recalc reformat_number numeric wi-verysmall") %]
149       </div>
150       <div name="not_editable_price" [%- IF EDIT_PRICE %]style="display:none"[%- END %]>
151         [%- L.div_tag(ITEM.sellprice_as_number, name="sellprice_text", class="numeric plain-data") %]
152         [%- L.hidden_tag("reclamation.reclamation_items[].sellprice_as_number",
153                          ITEM.sellprice_as_number,
154                          disabled=(EDIT_PRICE? 1 : '')) %]
155       </div>
156     </td>
157     <td>
158       [%- L.hidden_tag("reclamation.reclamation_items[].active_discount_source", ITEM.active_discount_source.source) %]
159       [%- SET EDIT_DISCOUNT = (RIGHT_TO_EDIT_PRICES && ITEM.active_discount_source.source == '' && !ITEM.is_linked_to_record) %]
160       <div name="editable_discount" [%- IF !EDIT_DISCOUNT %]style="display:none"[%- END %] class="numeric">
161         [%- L.input_tag("reclamation.reclamation_items[].discount_as_percent",
162                         ITEM.discount_as_percent,
163                         size = 5,
164                         disabled=(EDIT_DISCOUNT? '' : 1),
165                         class="recalc reformat_number numeric") %]
166       </div>
167       <div name="not_editable_discount" [%- IF EDIT_DISCOUNT %]style="display:none"[%- END %]>
168         [%- L.div_tag(ITEM.discount_as_percent, name="discount_text", class="numeric") %]
169         [%- L.hidden_tag("reclamation.reclamation_items[].discount_as_percent",
170                          ITEM.discount_as_percent,
171                          disabled=(EDIT_DISCOUNT? 1 : '')) %]
172       </div>
173     </td>
174     <td>
175       [%- L.div_tag(LxERP.format_amount(ITEM.linetotal, 2, 0), name="linetotal", class="numeric") %]
176     </td>
177
178   </tr>
179
180   <tr [%- IF !MYCONFIG.show_form_details -%]style="display:none"[%- END -%]>
181     <td colspan="100%">
182       [%- IF MYCONFIG.show_form_details || ITEM.render_second_row %]
183         <div name="second_row" data-loaded="1">
184           [%- PROCESS reclamation/tabs/basic_data/_second_row.html ITEM=ITEM TYPE=SELF.type %]
185         </div>
186       [%- ELSE %]
187         <div name="second_row" id="second_row_[% ID %]">
188           [%- LxERP.t8("Loading...") %]
189         </div>
190       [%- END %]
191     </td>
192   </tr>
193
194 </tbody>