[% USE T8 %] [% USE HTML %] [% USE LxERP %] [% USE L %] [% USE P %] [% INCLUDE 'generic/set_longdescription.html' %]
[% IF FORM.email_attachment_id || FORM.workflow_email_attachment_id%]
[% BLOCK panel_1; P.email_journal.attachment_preview( FORM.email_attachment_id || FORM.workflow_email_attachment_id, style="height:600px" ); END; INCLUDE 'common/toggle_panel.html' block_name='panel_1' button_closed = LxERP.t8('Show Attachment') button_open = LxERP.t8('Hide Attachment') ; %]
[% END %]
[% INCLUDE 'generic/toggle_wrapper.html' %]
[% SET cv_id = SELF.cv _ '_id' %] [%- IF SELF.cv == "customer" %] [%- END %] [% PROCESS order/tabs/_business_info_row.html SELF=SELF %] [% SET currency_id = SELF.order.currency_id || INSTANCE_CONF.get_currency_id # use default currency for new order %] [% SET show_exchangerate = (SELF.order.currency_id != INSTANCE_CONF.get_currency_id) %] [% IF SELF.all_languages.size %] [% END %] [% IF SELF.all_departments.size %] [% END %]
[% 'Customer & Order Information' | $T8 %]
[%- SELF.cv == "customer" ? LxERP.t8('Customer') : LxERP.t8('Vendor') -%] [% P.customer_vendor.picker("order.${SELF.cv}" _ '_id', SELF.order.$cv_id, type=SELF.cv, show_details="1") %]
[% 'Contact Person' | $T8 %] [% L.select_tag('order.cp_id', SELF.order.${SELF.cv}.contacts, default=SELF.order.cp_id, title_key='full_name_dep', value_key='cp_id', with_empty=1, class='wi-lightwide') %]
[% 'Shipping Address' | $T8 %] [% shiptos = [ { shipto_id => "", displayable_id => LxERP.t8("No/individual shipping address") } ] ; FOREACH s = SELF.order.${SELF.cv}.shipto ; shiptos.push(s) ; END ; L.select_tag('order.shipto_id', shiptos, default=SELF.order.shipto_id, title_key='displayable_id', value_key='shipto_id', with_empty=0, class='wi-lightwide') %] [% L.button_tag("kivi.Order.edit_custom_shipto()", LxERP.t8("Custom shipto"), class='button neutral below wi-lightwide') %]
[% 'Custom Billing Address' | $T8 %] [% L.select_tag('order.billing_address_id', SELF.order.customer.additional_billing_addresses, default=SELF.order.billing_address_id, title_key='displayable_id', value_key='id', with_empty=1, class='wi-lightwide') %]
[% 'Steuersatz' | $T8 %] [% L.select_tag('order.taxzone_id', SELF.all_taxzones, default=SELF.order.taxzone_id, title_key='description', class='recalc wi-lightwide') %]
[% 'Currency' | $T8 %] [% L.select_tag('order.currency_id', SELF.all_currencies, default=currency_id, value_key='id', title_key='name', class='wi-lightwide') %]
[% 'Exchangerate' | $T8 %] 1 [% SELF.order.currency.name %] = [% 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") %] [% INSTANCE_CONF.default_currency %] [% L.hidden_tag('old_currency_id', currency_id) %] [% L.hidden_tag('old_exchangerate', SELF.order.exchangerate_as_null_number) %]
[% 'Language' | $T8 %] [% L.select_tag('order.language_id', SELF.all_languages, default=SELF.order.language_id, title_key='description', with_empty=1, class='wi-lightwide') %]
[% 'Department' | $T8 %] [% L.select_tag('order.department_id', SELF.all_departments, default=SELF.order.department_id, title_key='description', with_empty=1, class='wi-lightwide') %]
[% 'Shipping Point' | $T8 %] [% L.input_tag('order.shippingpoint', SELF.order.shippingpoint, class='wi-lightwide') %]
[% 'Ship via' | $T8 %] [% L.input_tag('order.shipvia', SELF.order.shipvia, class='wi-lightwide') %]
[% 'Transaction description' | $T8 %] [% L.input_tag('order.transaction_description', SELF.order.transaction_description, 'data-validate'=INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : '', class='wi-lightwide') %]
[% 'Project Number' | $T8 %] [% P.project.picker('order.globalproject_id', SELF.order.globalproject_id, class='wi-lightwide') %]
[% IF SELF.type == "sales_order" %] [% END %]
[% 'Terms' | $T8 %]
[% 'Payment Terms' | $T8 %] [% L.select_tag('order.payment_id', SELF.all_payment_terms, default = SELF.order.payment_id, with_empty = 1, title_key = 'description', class = 'wi-mediumsmall-lightwide') %]
[% 'Delivery Terms' | $T8 %] [% L.select_tag('order.delivery_term_id', SELF.all_delivery_terms, default = SELF.order.delivery_term_id, with_empty = 1, title_key = 'description', class = 'wi-mediumsmall-lightwide') %]
[% L.yes_no_tag('order.taxincluded', SELF.order.taxincluded, class='recalc') %]
[% 'Periodic Invoices' | $T8 %] [% SELF.periodic_invoices_status %] [% L.button_tag('kivi.Order.show_periodic_invoices_config_dialog()', LxERP.t8('Configure'), class='neutral inline below') %] ?
[% 'Notes' | $T8 %]
[% L.textarea_tag('order.notes', SELF.order.notes, rows=7, class="texteditor wi-wide") %]
[% 'Internal Notes' | $T8 %][% L.textarea_tag('order.intnotes', SELF.order.intnotes, class="wi-wide") %]
[% IF SELF.order.id %] [% END %] [%- IF SELF.all_statuses.size %] [%- END -%] [% IF SELF.cv == 'customer' %] [% END %] [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %] [% END %] [% IF SELF.type == "purchase_order_confirmation" %] [%- numbers = []; FOREACH p = SELF.order.preceding_purchase_orders(); numbers.push(HTML.escape(p.ordnumber)); END; %] [% END %] [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") %] [% SET quo_nr_txt = 'Quotation Number' %] [% ELSE %] [% SET quo_nr_txt = 'RFQ Number' %] [% END %] [% IF (SELF.type == "purchase_order_confirmation") -%] [%- END %] [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %] [% END %] [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order") %] [% SET transdate_txt = 'Order Date' %] [% ELSIF SELF.type == "purchase_order_confirmation" -%] [%- SET transdate_txt = 'Confirmation Date' -%] [% ELSIF (SELF.type == "sales_quotation" || SELF.type == "purchase_quotation_intake") %] [% SET transdate_txt = 'Quotation Date' %] [% ELSE %] [% SET transdate_txt = 'RFQ Date' %] [% END %] [% IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") %] [% SET reqdate_txt = 'Reqdate'; SET reqdate_class = 'recalc' %] [% ELSIF SELF.type == "sales_quotation" %] [% SET reqdate_txt = 'Valid until'; SET reqdate_class = '' %] [% ELSE %] [% SET reqdate_txt = 'Required by'; SET reqdate_class = 'recalc' %] [% END %] [% IF SELF.type == "sales_quotation" %] [% END %]
[% 'Handling, Numbers & Dates' | $T8 %]
[% L.yes_no_tag('order.delivered', SELF.order.delivered, class='wi-small') %]
[% L.yes_no_tag('order.closed', SELF.order.closed, class='wi-small') %]
[% 'Status' | $T8 %] [% L.select_tag('order.order_status_id', SELF.all_statuses, default=SELF.order.order_status_id, with_empty=1, title_key='name') %]
[% 'Employee' | $T8 %] [% L.select_tag('order.employee_id', SELF.all_employees, default=(SELF.order.employee_id ? SELF.order.employee_id : SELF.current_employee_id), class='wi-normal', title_key='safe_name') %]
[% 'Salesman' | $T8 %] [% L.select_tag('order.salesman_id', SELF.all_salesmen, default=(SELF.order.salesman_id ? SELF.order.salesman_id : SELF.current_employee_id), class='wi-normal', title_key='safe_name') %]
[% IF SELF.type == "purchase_order_confirmation" %][% 'Order Confirmation Number' | $T8 %][% ELSE %][% 'Order Number' | $T8 %][% END %] [%- IF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %] [% L.input_tag('order.ordnumber', SELF.order.ordnumber, onchange='kivi.Order.set_number_in_title(this)', class='wi-normal') %] [%- ELSIF SELF.order.id %] [% HTML.escape(SELF.order.ordnumber) %] [% L.hidden_tag("order.ordnumber", SELF.order.ordnumber) %] [% ELSE %] [% LxERP.t8("will be set upon saving") %] [%- END %]
[% 'Order Number' | $T8 %][% numbers.join(', ') %]
[% quo_nr_txt | $T8 %] [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%] [% L.input_tag('order.quonumber', SELF.order.quonumber, class='wi-normal') %] [%- ELSIF INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %] [% L.input_tag('order.quonumber', SELF.order.quonumber, onchange='kivi.Order.set_number_in_title(this)', class='wi-normal') %] [%- ELSIF SELF.order.id %] [% HTML.escape(SELF.order.quonumber) %] [% L.hidden_tag("order.quonumber", SELF.order.quonumber) %] [% ELSE %] [% LxERP.t8("will be set upon saving") %] [%- END %]
[% 'Vendor Confirmation Number' | $T8 %] [% L.input_tag('order.vendor_confirmation_number', SELF.order.vendor_confirmation_number, class='wi-normal') %]
[% 'Customer Order Number' | $T8 %] [% L.input_tag('order.cusordnumber', SELF.order.cusordnumber, class='wi-normal') %]
[% transdate_txt | $T8 %] [% L.date_tag('order.transdate_as_date', SELF.order.transdate_as_date, class='wi-date') %]
[% 'Tax point' | $T8 %] [% L.date_tag('order.tax_point_as_date', SELF.order.tax_point_as_date, class='wi-date recalc') %]
[% reqdate_txt | $T8 %] [% L.date_tag('order.reqdate_as_date', SELF.order.reqdate_as_date, class='wi-date ' _ reqdate_class) %]
[% 'Order probability' | $T8 %] [% L.select_tag('order.order_probability', SELF.order_probabilities, title='title', default=SELF.order.order_probability) %]%
[% 'Expected billing date' | $T8 %] [% L.date_tag('order.expected_billing_date_as_date', SELF.order.expected_billing_date_as_date, class='wi-date') %]
[% 'Insert Date' | $T8 %] [% SELF.order.itime_as_date %]
[% PROCESS order/tabs/_item_input.html SELF=SELF %] [%- IF SELF.positions_scrollbar_height -%] [%- SET scroll_style = 'style="overflow-y: auto; height:' _ SELF.positions_scrollbar_height _ 'vh;"' -%] [%- ELSE -%] [%- SET scroll_style = '' -%] [%- END -%]
[%- IF SELF.show_update_button -%] [%- END %] [%- IF SELF.search_cvpartnumber -%] [%- END -%] [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "purchase_order" || SELF.type == "purchase_order_confirmation") -%] [%- END -%] [% FOREACH item = SELF.order.items_sorted %] [% PROCESS order/tabs/_row.html ITEM=item ID=(item.id||item.new_fake_id) %] [% END %] [% IF (SELF.type == "sales_quotation") || (SELF.type == "request_quotation") || (SELF.type == "purchase_quotation_intake") %] [% SET add_col = 0 %] [% ELSE %] [% SET add_col = 1 %] [% END %] [% IF SELF.search_cvpartnumber %] [% SET add_col = add_col + 1 %] [% END %] [%- IF SELF.show_update_button -%] [%- END -%] [% FOREACH tax = SELF.taxes %] [% PROCESS order/tabs/_tax_row.html TAX=tax TAXINCLUDED=SELF.order.taxincluded QUOTATION=SELF.order.quotation %] [% END %] [%- IF (SELF.type == "sales_order_intake" || SELF.type == "sales_order" || SELF.type == "sales_quotation") -%] [%- SET marge_class = ((SELF.order.marge_total || 0) < 0) ? 'plus0' : '' -%] [%- ELSE -%] [%- END -%] [%- IF SELF.show_update_button -%] [%- END -%]
[% 'Articles' | $T8 %]
[% IF MYCONFIG.show_form_details %] [% 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") %] [% ELSE %] [% 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') %] [% END %] [% 'position' | $T8 %] [% LxERP.t8('reorder item') %] [% LxERP.t8('delete item') %] [%- L.img_tag(src="image/rotate_cw.svg", alt=LxERP.t8('Update from master data'), title= LxERP.t8('Update from master data'), 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();", id='update_from_master', class='row-icon') %] [% 'Partnumber' | $T8 %][%- SELF.cv == "customer" ? LxERP.t8('Customer Part Number') : LxERP.t8('Model') %][% 'Type' | $T8 %] [% 'Description' | $T8 %][% 'Delivered' | $T8 %] [% 'Qty' | $T8 %] [% 'Price Factor' | $T8 %] [% 'Unit' | $T8 %] [% 'Price Source' | $T8 %] [% 'Price' | $T8 %] [% 'Discount' | $T8 %] [% 'Extended' | $T8 %]
[% IF !SELF.order.taxincluded %][% 'Subtotal' | $T8 %][% END %] [% IF !SELF.order.taxincluded %][% L.div_tag(SELF.order.netamount_as_number, id='netamount_id') %][% END %]
[% 'Ertrag' | $T8 %] [%- L.div_tag(SELF.order.marge_total_as_number, id='marge_total_id', class=marge_class) %] [% 'Ertrag prozentual' | $T8 %] [%- LxERP.format_amount(SELF.order.marge_percent, 2) %] % [% 'Total' | $T8 %] [% L.div_tag(SELF.order.amount_as_number, id='amount_id') %]
[% L.sortable_element('#row_table_id') %]