7 [% INCLUDE 'generic/set_longdescription.html' %]
9 <div id="ui-tabs-basic-data">
10 <!-- PENDENT: EXPERIMENTELL -->
12 [% IF FORM.email_attachment_id || FORM.workflow_email_attachment_id%]
13 <div class="wrapper" id="email_attachment_wrapper">
16 P.email_journal.attachment_preview(
17 FORM.email_attachment_id || FORM.workflow_email_attachment_id,
21 INCLUDE 'common/toggle_panel.html'
23 button_closed = LxERP.t8('Show Attachment')
24 button_open = LxERP.t8('Hide Attachment')
30 <div class="wrapper" id="wrapper-1">
31 [% INCLUDE 'generic/toggle_wrapper.html' %]
35 <table class="tbl-horizontal col">
36 <caption>[% 'Customer & Order Information' | $T8 %]</caption>
37 <colgroup><col class="wi-mediumsmall"><col class="wi-lightwide"></colgroup>
40 <th>[%- SELF.cv == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%]</th>
41 [% SET cv_id = SELF.cv _ '_id' %]
42 <td class="wi-lightwide">
43 [% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, show_details="1") %]
46 <tr id='cp_row' [% IF !SELF.order.${SELF.cv}.contacts.size %]style='display:none'[% END %]>
47 <th>[% 'Contact Person' | $T8 %]</th>
48 <td>[% L.select_tag('order.cp_id',
49 SELF.order.${SELF.cv}.contacts,
50 default=SELF.order.cp_id,
51 title_key='full_name_dep',
54 class='wi-lightwide') %]</td>
57 <th>[% 'Shipping Address' | $T8 %]</th>
59 <span id='shipto_selection' [% IF !SELF.order.${SELF.cv}.shipto.size %]style='display:none'[% END %]>
60 [% shiptos = [ { shipto_id => "", displayable_id => LxERP.t8("No/individual shipping address") } ] ;
61 FOREACH s = SELF.order.${SELF.cv}.shipto ;
64 L.select_tag('order.shipto_id',
66 default=SELF.order.shipto_id,
67 title_key='displayable_id',
68 value_key='shipto_id',
70 class='wi-lightwide') %]
72 [% L.button_tag("kivi.Order.edit_custom_shipto()",
73 LxERP.t8("Custom shipto"),
74 class='button neutral below wi-lightwide') %]
77 [%- IF SELF.cv == "customer" %]
78 <tr id="billing_address_row"[% IF !SELF.order.customer.additional_billing_addresses.as_list.size %]style="display:none"[% END %]>
79 <th>[% 'Custom Billing Address' | $T8 %]</th>
81 [% L.select_tag('order.billing_address_id',
82 SELF.order.customer.additional_billing_addresses,
83 default=SELF.order.billing_address_id,
84 title_key='displayable_id',
87 class='wi-lightwide') %]
91 [% PROCESS order/tabs/_business_info_row.html SELF=SELF %]
93 <th>[% 'Steuersatz' | $T8 %]</th>
94 <td>[% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', class='recalc wi-lightwide') %]</td>
96 [% SET currency_id = SELF.order.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new order %]
97 [% SET show_exchangerate = (SELF.order.currency_id != INSTANCE_CONF.get_currency_id) %]
98 <tr id="currency_settings">
99 <th>[% 'Currency' | $T8 %]</th>
100 <td>[% L.select_tag('order.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name', class='wi-lightwide') %]</td>
102 <tr id="exchangerate_settings" [%- IF !show_exchangerate %]style='display:none'[%- END %]>
103 <th>[% 'Exchangerate' | $T8 %]</th>
104 <td> 1 <span id="currency_name">[% SELF.order.currency.name %]</span> =
105 [% L.input_tag('order.exchangerate_as_null_number', SELF.order.exchangerate_as_null_number, 'data-validate'=show_exchangerate ? 'required' : '', class="reformat_number_as_null_number numeric wi-small") %]
106 [% INSTANCE_CONF.default_currency %]
107 [% L.hidden_tag('old_currency_id', currency_id) %]
108 [% L.hidden_tag('old_exchangerate', SELF.order.exchangerate_as_null_number) %]
111 [% IF SELF.all_languages.size %]
113 <th>[% 'Language' | $T8 %]</th>
115 [% L.select_tag('order.language_id', SELF.all_languages, default=SELF.order.language_id, title_key='description', with_empty=1, class='wi-lightwide') %]
119 [% IF SELF.all_departments.size %]
121 <th>[% 'Department' | $T8 %]</th>
123 [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, class='wi-lightwide') %]
128 <th>[% 'Shipping Point' | $T8 %]</th>
129 <td>[% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, class='wi-lightwide') %]</td>
132 <th>[% 'Ship via' | $T8 %]</th>
133 <td>[% L.input_tag('order.shipvia', SELF.order.shipvia, class='wi-lightwide') %]</td>
136 <th>[% 'Transaction description' | $T8 %]</th>
137 <td>[% L.input_tag('order.transaction_description', SELF.order.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', class='wi-lightwide') %]</td>
140 <th>[% 'Project Number' | $T8 %]</th>
141 <td>[% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, class='wi-lightwide') %]</td>
146 <table class="tbl-horizontal col">
147 <caption>[% 'Terms' | $T8 %]</caption>
148 <colgroup><col class="wi-mediumsmall"><col class="wi-lightwide"></colgroup>
152 <span class="label above">[% 'Payment Terms' | $T8 %]</span>
153 [% L.select_tag('order.payment_id',
154 SELF.all_payment_terms,
155 default = SELF.order.payment_id,
157 title_key = 'description',
158 class = 'wi-mediumsmall-lightwide') %]
163 <span class="label above">[% 'Delivery Terms' | $T8 %]</span>
164 [% L.select_tag('order.delivery_term_id',
165 SELF.all_delivery_terms,
166 default = SELF.order.delivery_term_id,
168 title_key = 'description',
169 class = 'wi-mediumsmall-lightwide') %]
172 <tr id="taxincluded_row_id" [% IF !SELF.taxes.size %]class="hidden"[% END %]>
173 <th><label for="order.taxincluded">[% 'Tax Included' | $T8 %]</label></th>
174 <td>[% L.yes_no_tag('order.taxincluded', SELF.order.taxincluded, class='recalc') %]</td>
176 [% IF SELF.type == "sales_order" %]
178 <th>[% 'Periodic Invoices' | $T8 %]</th>
180 <span id='periodic_invoices_status' class="data wi-normal wi-lightwide">[% SELF.periodic_invoices_status %]</span>
181 <span class="button-inline">
182 [% L.button_tag('kivi.Order.show_periodic_invoices_config_dialog()', LxERP.t8('Configure'), class='neutral inline below') %]
183 <a href="doc/html/ch03.html#features.periodic-invoices.variables" target="_blank" class="button wi-tiny neutral" title="[% 'Documentation about periodic invoices in a new window/tab' | $T8 %]">?</a>
193 <table class="tbl-horizontal col">
194 <caption>[% 'Notes' | $T8 %]</caption>
195 <colgroup><col class="wi-wide"></colgroup>
198 <td class="wi-wide">[% L.textarea_tag('order.notes', SELF.order.notes, rows=7, class="texteditor wi-wide") %]</td>
201 <td><span class="label above">[% 'Internal Notes' | $T8 %]</span>[% L.textarea_tag('order.intnotes', SELF.order.intnotes, class="wi-wide") %]</td>
206 <table class="tbl-horizontal col">
207 <caption>[% 'Handling, Numbers & Dates' | $T8 %]</caption>
208 <colgroup> <col class="wi-mediumsmall"><col class="wi-lightwide"> </colgroup>
210 [% IF SELF.order.id %]
212 <th><label for="order.delivered">[% 'Delivery Order(s) for full qty created' | $T8 %]</label></th>
213 <td>[% L.yes_no_tag('order.delivered', SELF.order.delivered, class='wi-small') %]</td>
216 <th><label for="order.closed">[% 'Closed' | $T8 %]</label></th>
217 <td>[% L.yes_no_tag('order.closed', SELF.order.closed, class='wi-small') %]</td>
221 [%- IF SELF.all_statuses.size %]
223 <th>[% 'Status' | $T8 %]</th>
224 <td>[% L.select_tag('order.order_status_id',
226 default=SELF.order.order_status_id,
228 title_key='name') %]</td>
233 <th>[% 'Employee' | $T8 %]</th>
234 <td>[% L.select_tag('order.employee_id',
236 default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id),
238 title_key='safe_name') %]</td>
240 [% IF SELF.cv == 'customer' %]
242 <th>[% 'Salesman' | $T8 %]</th>
243 <td>[% L.select_tag('order.salesman_id',
245 default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id),
247 title_key='safe_name') %]</td>
250 [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %]
252 <th>[% IF SELF.type == "purchase_order_confirmation" %][% 'Order Confirmation Number' | $T8 %][% ELSE %][% 'Order Number' | $T8 %][% END %]</th>
254 [%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
255 [% L.input_tag('order.ordnumber', SELF.order.ordnumber, onchange='kivi.Order.set_number_in_title(this)', class='wi-normal') %]
256 [%- ELSIF SELF.order.id %]
257 [% HTML.escape(SELF.order.ordnumber) %]
258 [% L.hidden_tag("order.ordnumber", SELF.order.ordnumber) %]
260 [% LxERP.t8("will be set upon saving") %]
266 [% IF SELF.type == "purchase_order_confirmation" %]
268 <th>[% 'Order Number' | $T8 %]</th>
271 FOREACH p = SELF.order.preceding_purchase_orders();
272 numbers.push(HTML.escape(p.ordnumber));
275 <td><span class="data wi-normal">[% numbers.join(', ') %]</span></td>
279 [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") %]
280 [% SET quo_nr_txt = 'Quotation Number' %]
282 [% SET quo_nr_txt = 'RFQ Number' %]
285 <th>[% quo_nr_txt | $T8 %]</th>
287 [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
288 [% L.input_tag('order.quonumber', SELF.order.quonumber, class='wi-normal') %]
289 [%- ELSIF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %]
290 [% L.input_tag('order.quonumber', SELF.order.quonumber, onchange='kivi.Order.set_number_in_title(this)', class='wi-normal') %]
291 [%- ELSIF SELF.order.id %]
292 [% HTML.escape(SELF.order.quonumber) %]
293 [% L.hidden_tag("order.quonumber", SELF.order.quonumber) %]
295 [% LxERP.t8("will be set upon saving") %]
299 [% IF (SELF.type == "purchase_order_confirmation") -%]
301 <th>[% 'Vendor Confirmation Number' | $T8 %]</th>
302 <td>[% L.input_tag('order.vendor_confirmation_number', SELF.order.vendor_confirmation_number, class='wi-normal') %]</td>
305 [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %]
307 <th>[% 'Customer Order Number' | $T8 %]</th>
308 <td>[% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, class='wi-normal') %]</td>
311 [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") %]
312 [% SET transdate_txt = 'Order Date' %]
313 [% ELSIF SELF.type == "purchase_order_confirmation" -%]
314 [%- SET transdate_txt = 'Confirmation Date' -%]
315 [% ELSIF (SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") %]
316 [% SET transdate_txt = 'Quotation Date' %]
318 [% SET transdate_txt = 'RFQ Date' %]
321 <th>[% transdate_txt | $T8 %]</th>
322 <td>[% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date, class='wi-date') %]</td>
325 <th>[% 'Tax point' | $T8 %]</th>
326 <td>[% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class='wi-date recalc') %]</td>
328 [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %]
329 [% SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' %]
330 [% ELSIF SELF.type == "sales_quotation" %]
331 [% SET reqdate_txt = 'Valid until'; SET reqdate_class = '' %]
333 [% SET reqdate_txt = 'Required by'; SET reqdate_class = 'recalc' %]
336 <th>[% reqdate_txt | $T8 %]</th>
337 <td>[% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class='wi-date ' _ reqdate_class) %]</td>
339 [% IF SELF.type == "sales_quotation" %]
341 <th>[% 'Order probability' | $T8 %]</th>
342 <td>[% L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]%</td>
345 <th>[% 'Expected billing date' | $T8 %]</th>
346 <td>[% L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_as_date, class='wi-date') %]</td>
350 <th>[% 'Insert Date' | $T8 %]</th>
351 <td><span class="data wi-normal">[% SELF.order.itime_as_date %]</span></td>
356 </div><!-- /.wrapper -->
358 [%- IF order_item_input_position == 0 -%]
359 [% PROCESS order/tabs/_item_input.html SELF=SELF %]
362 [%- IF SELF.positions_scrollbar_height -%]
363 [%- SET scroll_style = 'style="overflow-y: auto; height:' _ SELF.positions_scrollbar_height _ 'vh;"' -%]
365 [%- SET scroll_style = '' -%]
367 <div id="row_table_scroll_id" class="wrapper horizontal-scroll-wrapper" [%- scroll_style -%]>
369 <table id="row_table_id" class="tbl-list">
370 <caption>[% 'Articles' | $T8 %]</caption>
374 [% IF MYCONFIG.show_form_details %]
375 [% L.img_tag(src="image/collapse.svg", alt=LxERP.t8('Hide all details'), title=LxERP.t8('Hide all details'), id='expand_all', class='row-icon', "data-expanded"="1") %]
377 [% L.img_tag(src="image/expand.svg", alt=LxERP.t8('Show all details'), title=LxERP.t8('Show all details'), id='expand_all', class='row-icon') %]
380 <th>[% 'position' | $T8 %] </th>
381 <th style='text-align:center'><img src="image/updown.png" alt="[% LxERP.t8('reorder item') %]"></th>
382 <th style='text-align:center'><img src="image/close.png" alt="[% LxERP.t8('delete item') %]"></th>
383 [%- IF SELF.show_update_button -%]
384 <th class="listheading" style='text-align:center' nowrap width="1">
385 [%- L.img_tag(src="image/rotate_cw.svg",
386 alt=LxERP.t8('Update from master data'),
387 title= LxERP.t8('Update from master data'),
388 onclick="if (!confirm('" _ LxERP.t8("Are you sure to update all positions from master data?") _ "')) return false; kivi.Order.update_all_rows_from_master_data();",
389 id='update_from_master', class='row-icon') %]
392 <th id="partnumber_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("partnumber")'> [% 'Partnumber' | $T8 %]</a></th>
393 [%- IF SELF.search_cvpartnumber -%]
394 <th id="cvpartnumber_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("cvpartnumber")'>[%- SELF.cv == "customer" ? LxERP.t8('Customer Part Number') : LxERP.t8('Model') %]</a></th>
396 <th id="partclass_header_id">[% 'Type' | $T8 %]</th>
397 <th id="description_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("description")'>[% 'Description' | $T8 %]</a></th>
398 [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%]
399 <th id="shipped_qty_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("shipped_qty")'>[% 'Delivered' | $T8 %]</a></th>
401 <th id="qty_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("qty")'> [% 'Qty' | $T8 %]</a></th>
402 <th >[% 'Price Factor' | $T8 %]</th>
403 <th >[% 'Unit' | $T8 %]</th>
404 <th >[% 'Price Source' | $T8 %]</th>
405 <th id="sellprice_header_id"><a href='#' onClick='javascript:kivi.Order.reorder_items("sellprice")'> [% 'Price' | $T8 %]</a></th>
406 <th id="discount_header_id" ><a href='#' onClick='javascript:kivi.Order.reorder_items("discount")'> [% 'Discount' | $T8 %]</a></th>
407 <th>[% 'Extended' | $T8 %]</th>
410 [% FOREACH item = SELF.order.items_sorted %]
411 [% PROCESS order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id) %]
413 <tfoot id="row_table_footer">
414 [%- IF order_item_input_position == 1 -%]
415 [% PROCESS order/tabs/_item_below_input.html SELF=SELF %]
418 [% IF (SELF.type == "sales_quotation") || (SELF.type == "request_quotation") || (SELF.type == "purchase_quotation_intake") %]
419 [% SET add_col = 0 %]
421 [% SET add_col = 1 %]
423 [% IF SELF.search_cvpartnumber %]
424 [% SET add_col = add_col + 1 %]
426 <tr id="subtotal_row_id">
427 <td colspan="[%- 10 + add_col %]"></td>
428 [%- IF SELF.show_update_button -%]
431 <th colspan="3">[% IF !SELF.order.taxincluded %][% 'Subtotal' | $T8 %][% END %]</th>
432 <td class="numeric">[% IF !SELF.order.taxincluded %][% L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %][% END %]</td>
434 [% FOREACH tax = SELF.taxes %]
435 [% PROCESS order/tabs/_tax_row.html TAX=tax TAXINCLUDED=SELF.order.taxincluded QUOTATION=SELF.order.quotation %]
437 <tr id="amount_row_id">
438 [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%]
439 [%- SET marge_class = ((SELF.order.marge_total || 0) < 0) ? 'plus0' : '' -%]
440 <th colspan="2">[% 'Ertrag' | $T8 %]</th>
441 <td colspan="2" class="numeric">[%- L.div_tag(SELF.order.marge_total_as_number, id='marge_total_id', class=marge_class) %]</td>
442 <th colspan="2">[% 'Ertrag prozentual' | $T8 %]</th>
443 <td class="numeric">[%- LxERP.format_amount(SELF.order.marge_percent, 2) %] %</td>
445 <td colspan="7"></td>
447 [%- IF SELF.show_update_button -%]
450 <td colspan="[%- 3 + add_col %]"></td>
451 <th colspan="3">[% 'Total' | $T8 %]</th>
452 <td class="numeric">[% L.div_tag(SELF.order.amount_as_number, id='amount_id') %]</td>
456 [% IF order_item_input_position == 1 %]
457 [% L.button_tag('kivi.Order.open_multi_items_dialog()', LxERP.t8('Add multiple items')) %]
460 </div><!-- /#row_table_scroll_id /.wrapper -->
462 </div><!-- /#ui-tabs-basic-data -->
464 [% L.sortable_element('#row_table_id') %]