]> wagnertech.de Git - mfinanz.git/blob - templates/webpages/reclamation/tabs/basic_data.html
date error in mapping
[mfinanz.git] / templates / webpages / reclamation / tabs / basic_data.html
1 [%- USE T8 %]
2 [%- USE HTML %]
3 [%- USE LxERP %]
4 [%- USE L %]
5 [%- USE P %]
6
7 [%- INCLUDE 'generic/set_longdescription.html' %]
8
9 <div id="ui-tabs-basic-data">
10   <table width="100%">
11     <tr valign="top">
12       <td>
13         <table width="100%">
14           <tr>
15             <th align="right">[%- SELF.cv == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%]</th>
16             [% SET cv_id = SELF.cv _ '_id' %]
17             <td>
18               [% P.customer_vendor.picker("reclamation.${SELF.cv}" _ '_id', SELF.reclamation.$cv_id, type=SELF.cv, show_details="1",
19                    style='width: 300px') %]
20             </td>
21           </tr>
22
23           <tr id='contact_row' [%- IF !SELF.reclamation.${SELF.cv}.contacts.size %]style='display:none'[%- END %]>
24             <th align="right">[% 'Contact Person' | $T8 %]</th>
25             <td>[% L.select_tag('reclamation.contact_id',
26                                 SELF.reclamation.${SELF.cv}.contacts,
27                                 default=SELF.reclamation.contact_id,
28                                 title_key='full_name_dep',
29                                 value_key='cp_id',
30                                 with_empty=1,
31                                 style='width: 300px') %]</td>
32           </tr>
33
34           <tr>
35             <th align="right">[% 'Shipping Address' | $T8 %]</th>
36             <td>
37               <span id='shipto_selection' [%- IF !SELF.reclamation.${SELF.cv}.shipto.size %] style='display:none'[%- END %] >
38                 [% shiptos = [ { shipto_id => "", displayable_id => LxERP.t8("No/individual shipping address") } ] ;
39                    FOREACH s = SELF.reclamation.${SELF.cv}.shipto ;
40                      shiptos.push(s) ;
41                    END ;
42                    L.select_tag('reclamation.shipto_id',
43                                  shiptos,
44                                  default=SELF.reclamation.shipto_id,
45                                  title_key='displayable_id',
46                                  value_key='shipto_id',
47                                  with_empty=0,
48                                  style='width: 300px') %]
49               </span>
50               [% L.button_tag("kivi.Reclamation.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
51             </td>
52           </tr>
53
54           [%- IF SELF.cv == "customer" %]
55           <tr id="billing_address_row"[% IF !SELF.reclamation.customer.additional_billing_addresses.as_list.size %] style="display:none"[% END %]>
56             <th align="right">[% 'Custom Billing Address' | $T8 %]</th>
57             <td>
58               [% L.select_tag('reclamation.billing_address_id',
59                                SELF.reclamation.customer.additional_billing_addresses,
60                                default=SELF.reclamation.billing_address_id,
61                                title_key='displayable_id',
62                                value_key='id',
63                                with_empty=1,
64                                style='width: 300px') %]
65             </td>
66           </tr>
67           [%- END %]
68
69           [%- PROCESS reclamation/tabs/basic_data/_business_info_row.html SELF=SELF %]
70
71           <tr>
72             <th align="right">[% 'Tax rate' | $T8 %]</th>
73             <td>[% L.select_tag('reclamation.taxzone_id', SELF.all_taxzones, default=SELF.reclamation.taxzone_id, title_key='description', style='width: 300px', class='recalc') %]</td>
74           </tr>
75
76           [% SET currency_id = SELF.reclamation.currency_id || INSTANCE_CONF.get_currency_id  # use default currency for new reclamation %]
77           [% SET show_exchangerate = (SELF.reclamation.currency_id != INSTANCE_CONF.get_currency_id) %]
78           <tr id="currency_settings">
79             <th align="right">[% 'Currency' | $T8 %]</th>
80             <td>[% L.select_tag('reclamation.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name') %]</td>
81           </tr>
82           <tr id="exchangerate_settings" [%- IF !show_exchangerate %]style='display:none'[%- END %]>
83             <th align="right">[% 'Exchangerate' | $T8 %]</th>
84             <td> 1 <span id="currency_name">[% SELF.reclamation.currency.name %]</span> =
85               [% L.input_tag('reclamation.exchangerate_as_null_number', SELF.reclamation.exchangerate_as_null_number, 'data-validate'=show_exchangerate ? 'required' : '', size="15", class="reformat_number_as_null_number numeric") %]
86               [% INSTANCE_CONF.default_currency %]
87               [% L.hidden_tag('old_currency_id', currency_id) %]
88               [% L.hidden_tag('old_exchangerate', SELF.reclamation.exchangerate_as_null_number) %]
89             </td>
90           </tr>
91
92 [%- IF SELF.all_languages.size %]
93           <tr>
94             <th align="right">[% 'Language' | $T8 %]</th>
95             <td>
96               [% L.select_tag('reclamation.language_id', SELF.all_languages, default=SELF.reclamation.language_id, title_key='description', with_empty=1, style='width:300px') %]
97             </td>
98           </tr>
99 [%- END %]
100
101 [%- IF SELF.all_departments.size %]
102           <tr>
103             <th align="right">[% 'Department' | $T8 %]</th>
104             <td>
105               [% L.select_tag('reclamation.department_id', SELF.all_departments, default=SELF.reclamation.department_id, title_key='description', with_empty=1, style='width:300px') %]
106             </td>
107           </tr>
108 [%- END %]
109
110           <tr>
111             <th align="right">[% 'Shipping Point' | $T8 %]</th>
112             <td>[% L.input_tag('reclamation.shippingpoint', SELF.reclamation.shippingpoint, style='width: 300px') %]</td>
113           </tr>
114
115           <tr>
116             <th align="right">[% 'Ship via' | $T8 %]</th>
117             <td>[% L.input_tag('reclamation.shipvia', SELF.reclamation.shipvia, style='width: 300px') %]</td>
118           </tr>
119
120           <tr>
121             <th align="right">[% 'Transaction description' | $T8 %]</th>
122             <td>[% L.input_tag('reclamation.transaction_description', SELF.reclamation.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', style='width: 300px') %]</td>
123           </tr>
124
125           <tr>
126             <th align="right">[% 'Project Number' | $T8 %]</th>
127             <td>[% P.project.picker('reclamation.globalproject_id', SELF.reclamation.globalproject_id, style='width: 300px') %]</td>
128           </tr>
129
130         </table>
131       </td>
132
133       <td align="right">
134         <table>
135
136           <tr>
137             <td colspan="2" align="center">
138               [%- IF SELF.reclamation.id %]
139                 <label for="reclamation.delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label>
140                 [% L.yes_no_tag('reclamation.delivered', SELF.reclamation.delivered) %]
141                 <label for="reclamation.closed">[% 'Closed' | $T8 %]</label>
142                 [% L.yes_no_tag('reclamation.closed', SELF.reclamation.closed) %]
143               [%- END %]
144             </td>
145           </tr>
146
147           <tr>
148             <th align="right">[% 'Employee' | $T8 %]</th>
149             <td>[% L.select_tag('reclamation.employee_id',
150               SELF.all_employees,
151               default=(SELF.reclamation.employee_id ? SELF.reclamation.employee_id : SELF.current_employee_id),
152               title_key='safe_name') %]</td>
153           </tr>
154
155           [% IF SELF.cv == 'customer' %]
156           <tr>
157             <th align="right">[% 'Salesman' | $T8 %]</th>
158             <td>[% L.select_tag('reclamation.salesman_id',
159               SELF.all_salesmen,
160               default=(SELF.reclamation.salesman_id ? SELF.reclamation.salesman_id : SELF.current_employee_id),
161               title_key='safe_name') %]</td>
162           </tr>
163           [% END %]
164
165           <tr>
166             <th width="70%" align="right" nowrap>[% 'Reclamation Number' | $T8 %]</th>
167             <td>[% L.input_tag('reclamation.record_number', SELF.reclamation.record_number, size = 11, onchange='kivi.Reclamation.set_number_in_title(this)') %]</td>
168           </tr>
169
170           <tr>
171             <th width="70%" align="right" nowrap>[% 'Customer Record Number' | $T8 %]</th>
172             <td>[% L.input_tag('reclamation.cv_record_number', SELF.reclamation.cv_record_number, size = 11) %]</td>
173           </tr>
174
175           <tr>
176             <th width="70%" align="right" nowrap>[% 'Reclamation Date' | $T8 %]</th>
177             <td>[% L.date_tag('reclamation.transdate_as_date', SELF.reclamation.transdate_as_date) %]</td>
178           </tr>
179
180           <tr>
181             <th width="70%" align="right" nowrap>[% 'Tax point' | $T8 %]</th>
182             <td>[% L.date_tag('reclamation.tax_point_as_date', SELF.reclamation.tax_point_as_date, class="recalc") %]</td>
183           </tr>
184
185           <tr>
186             <th width="70%" align="right" nowrap>[% 'Deadline' | $T8 %]</th>
187             <td>[% L.date_tag('reclamation.reqdate_as_date', SELF.reclamation.reqdate_as_date, class="recalc") %]</td>
188           </tr>
189
190           <tr>
191             <th width="70%" align="right" nowrap>[% 'Insert Date' | $T8 %]</th>
192             <td>[% SELF.reclamation.itime_as_date %]</td>
193           </tr>
194
195         </table>
196
197       </td>
198     </tr>
199   </table>
200
201   [%- PROCESS reclamation/tabs/basic_data/_item_input.html SELF=SELF %]
202
203   [% L.button_tag('kivi.Reclamation.open_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
204
205   <table width="100%">
206     <tr>
207       <td>
208         [%- IF SELF.positions_scrollbar_height -%]
209           [%- SET scroll_style = 'style="overflow-y: auto; height:' _ SELF.positions_scrollbar_height _ 'vh;"' -%]
210         [%- ELSE -%]
211           [%- SET scroll_style = '' -%]
212         [%- END -%]
213         <div id="row_table_scroll_id" [%- scroll_style -%]>
214           <table id="row_table_id" width="100%">
215             <thead>
216               <tr class="listheading">
217                 <th class="listheading" style='text-align:center' nowrap width="1">
218                   [%- IF MYCONFIG.show_form_details %]
219                     [%- L.img_tag(src="image/collapse.svg", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all', "data-expanded"="1") %]
220                   [%- ELSE %]
221                     [%- L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all') %]
222                   [%- END %]
223                 </th>
224                 <th>
225                   [% L.checkbox_tag("select_all_multi_id", checked=0, alt=LxERP.t8('Select/Deselect all'), title=LxERP.t8('Select/Deselect all'), id='select_all') %]
226                 </th>
227                 <th class="listheading" nowrap width="3" >[%- 'position'     | $T8 %] </th>
228                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/updown.png" alt="[%- LxERP.t8('reorder item') %]"></th>
229                 <th class="listheading" style='text-align:center' nowrap width="1"><img src="image/close.png" alt="[%- LxERP.t8('delete item') %]"></th>
230                 [%- IF SELF.show_update_button -%]
231                 <th class="listheading" style='text-align:center' nowrap width="1">
232                   [%- L.img_tag(src="image/rotate_cw.svg",
233                                 alt=LxERP.t8('Update from master data'),
234                                 title= LxERP.t8('Update from master data'),
235                                 onclick="if (!confirm('" _ LxERP.t8("Are you sure to update all positions from master data?") _ "')) return false; kivi.Reclamation.update_all_rows_from_master_data();",
236                                 id='update_from_master') %]
237                 </th>
238                 [%- END %]
239                 <th id="partnumber_header_id"   class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("partnumber")'> [%- 'Partnumber'  | $T8 %]</a></th>
240                 [%- IF SELF.search_cvpartnumber -%]
241                 <th id="cvpartnumber_header_id" class="listheading" nowrap width="15"><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("cvpartnumber")' > [%- SELF.cv == "customer" ? LxERP.t8('Customer Part Number') : LxERP.t8('Model') %]</a></th>
242                 [%- END -%]
243                 <th id="partclass_header_id"    class="listheading" nowrap width="2">[%- 'Type'  | $T8 %]</th>
244                 <th id="description_header_id"  class="listheading" nowrap           ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("description")'>[%- 'Description' | $T8 %]</a></th>
245                 <th id="reason_header_id"   class="listheading" nowrap width="100"><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("reason")'>[%- 'Reason' | $T8 %]</a></th>
246                 <th id="reason_description_ext_header_id"  class="listheading" nowrap ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("reason_description_ext")'>[%- 'Reason Description Extern' | $T8 %]</a></th>
247                 <th id="reason_description_int_header_id"  class="listheading" nowrap ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("reason_description_int")'>[%- 'Reason Description Intern' | $T8 %]</a></th>
248                 <th id="qty_header_id"          class="listheading" nowrap width="5" ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("qty")'>        [%- 'Qty'         | $T8 %]</a></th>
249                 <th class="listheading" nowrap width="5" >[%- 'Price Factor' | $T8 %] </th>
250                 <th class="listheading" nowrap width="5" >[%- 'Unit'         | $T8 %] </th>
251                 <th class="listheading" nowrap width="5" >[%- 'Price Source' | $T8 %] </th>
252                 <th id="sellprice_header_id"   class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("sellprice")'> [%- 'Price'       | $T8 %]</a></th>
253                 <th id="discount_header_id"    class="listheading" nowrap width="15" ><a href='#' onClick='javascript:kivi.Reclamation.reorder_items("discount")'>  [%- 'Discount'    | $T8 %]</a></th>
254                 <th class="listheading" nowrap width="10">[%- 'Extended'     | $T8 %] </th>
255               </tr>
256               <tr class="listheading">
257                 <th></th>
258                 <th class="center">
259                   [%- L.button_tag('kivi.Reclamation.toggle_selected_rows();', "🔄",
260                                    title=LxERP.t8("Toggle selection"),
261                                    alt=LxERP.t8("Toggle selection"),
262                                    ) %]
263                 </th>
264                 <th colspan="2"></th>
265                 <th class="center">
266                   [%- L.button_tag('kivi.Reclamation.delete_selected_rows();', LxERP.t8("X"),
267                                    title=LxERP.t8("Delete selected rows"),
268                                    alt=LxERP.t8("Delete selected rows"),
269                                    ) %]
270                 </th>
271                 [%- IF SELF.show_update_button -%]
272                 <th></th>
273                 [%- END -%]
274                 <th colspan="3"></th>
275                 <th>
276                   [% L.select_tag("reason_id_for_selected",
277                                   SELF.reclamation.valid_reclamation_reasons,
278                                   title_key = 'name',
279                                   value_key = 'id',
280                                   with_empty=1,
281                                   class="wi-small",
282                                   ) %]
283                   [%- L.button_tag(
284                         'kivi.Reclamation.set_selected_to_value("reason_id")',
285                         "↓",
286                         alt=LxERP.t8('Apply to selected rows'),
287                         title=LxERP.t8('Apply to selected rows'),
288                   ) %]
289                 </th>
290                 <th>
291                   [% L.areainput_tag("reason_description_ext_for_selected",
292                                      "",
293                                      class="wi-mediumsmall",
294                                      ) %]
295                   [%- L.button_tag(
296                         'kivi.Reclamation.set_selected_to_value("reason_description_ext")',
297                         "↓",
298                         alt=LxERP.t8('Apply to selected rows'),
299                         title=LxERP.t8('Apply to selected rows'),
300                   ) %]
301                 </th>
302                 <th>
303                   [% L.areainput_tag("reason_description_int_for_selected",
304                                      "",
305                                      class="wi-mediumsmall",
306                                      ) %]
307                   [%- L.button_tag(
308                         'kivi.Reclamation.set_selected_to_value("reason_description_int")',
309                         "↓",
310                         alt=LxERP.t8('Apply to selected rows'),
311                         title=LxERP.t8('Apply to selected rows'),
312                   ) %]
313                 </th>
314                 <th colspan="7"></th>
315               </tr>
316             </thead>
317
318             [%- FOREACH item = SELF.reclamation.items_sorted %]
319               [%- PROCESS reclamation/tabs/basic_data/_row.html ITEM=item ID=(item.id||item.new_fake_id) -%]
320             [%- END %]
321
322           </table>
323         </div>
324
325       </td>
326     </tr>
327
328     <tr>
329     </tr>
330
331     <tr>
332       <td colspan="100%" width="100%">
333         <table width="100%">
334           <tr>
335             <td>
336               <table>
337                 <tr>
338                   <th align="left">[% 'Notes' | $T8 %]</th>
339                   <th align="left">[% 'Internal Notes' | $T8 %]</th>
340                 </tr>
341                 <tr valign="top">
342                   <td>
343                     [% L.textarea_tag('reclamation.notes', SELF.reclamation.notes, wrap="soft", style="width: 350px; height: 150px", class="texteditor") %]
344                   </td>
345                   <td>
346                     [% L.textarea_tag('reclamation.intnotes', SELF.reclamation.intnotes, wrap="soft", style="width: 350px; height: 150px") %]
347                   </td>
348                 </tr>
349               </table>
350             </td>
351
352             <td>
353               <table>
354                 <tr>
355                   <th align="right">[% 'Payment Terms' | $T8 %]</th>
356                   <td>[% L.select_tag('reclamation.payment_id',
357                                       SELF.all_payment_terms,
358                                       default = SELF.reclamation.payment_id,
359                                       with_empty = 1,
360                                       title_key = 'description',
361                                       style = 'width: 250px') %]</td>
362                 </tr>
363                 <tr>
364                   <th align="right">[% 'Delivery Terms' | $T8 %]</th>
365                   <td>[% L.select_tag('reclamation.delivery_term_id',
366                                       SELF.all_delivery_terms,
367                                       default = SELF.reclamation.delivery_term_id,
368                                       with_empty = 1,
369                                       title_key = 'description',
370                                       style = 'width: 250px') %]</td>
371                 </tr>
372               </table>
373             </td>
374
375
376             <td align="right">
377               <table>
378                 <tr id="taxincluded_row_id" [%- IF !SELF.taxes.size %]style="display:none"[%- END %]>
379                   <td align=right colspan="2">
380                     <label for="reclamation.taxincluded"><b>[% 'Tax Included' | $T8 %]</b></label>
381                     [% L.yes_no_tag('reclamation.taxincluded', SELF.reclamation.taxincluded, class='recalc') %]
382                   </td>
383                 </tr>
384
385                 <tr id="subtotal_row_id" [%- IF SELF.reclamation.taxincluded %]style="display:none"[%- END %]>
386                   <th align="right">[%- 'Subtotal' | $T8 %]</th>
387                   <td align="right">
388                     [%- L.div_tag(SELF.reclamation.netamount_as_number, id='netamount_id') %]
389                   </td>
390                 </tr>
391                 [%- FOREACH tax = SELF.reclamation.taxes %]
392                   [%- PROCESS reclamation/tabs/basic_data/_tax_row.html TAX=tax TAXINCLUDED=SELF.reclamation.taxincluded %]
393                 [%- END %]
394                 <tr id="amount_row_id">
395                   <th align="right">[%- 'Total' | $T8 %]</th>
396                   <td align="right">
397                     [%- L.div_tag(SELF.reclamation.amount_as_number, id='amount_id') %]
398                   </td>
399                 </tr>
400               </table>
401             </td>
402
403           </tr>
404         </table>
405       </td>
406     </tr>
407
408   </table>
409
410 </div>
411
412 [% L.sortable_element('#row_table_id') %]