[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]
[% IF RO %]
[% P.hidden_tag(vc_id, $vc_id) %]
[% HTML.escape(VC_OBJ.name) %]
[% ELSE %]
[% P.customer_vendor.picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %]
[% END %]
[% P.hidden_tag("previous_" _ vc_id, $vc_id) %]
[% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %]
[%- IF ALL_CONTACTS.size %]
[% 'Contact Person' | $T8 %]
[%- IF delivered %]
[% L.hidden_tag("cp_id", cp_id) %]
[% HTML.escape(CONTACT_OBJ.full_name) %][% IF CONTACT_OBJ.cp_abteilung %] ([% HTML.escape(CONTACT_OBJ.cp_abteilung) %])[% END %]
[%- ELSE %]
[% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %]
[%- END %]
[%- END %]
[% 'Shipping Address' | $T8 %]
[%- IF delivered %]
[% HTML.escape(shipto_label.join('; ')) %]
[%- ELSE %]
[%- IF ALL_SHIPTO.size %]
[% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
[%- END %]
[% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
[%- END %]
[%- IF business %]
[% IF is_customer %][% 'Customer type' | $T8 %][% ELSE %][% 'Vendor type' | $T8 %][% END %]
[% HTML.escape(business) %]
[%- END %]
[%- IF max_dunning_level %]
[% 'Max. Dunning Level' | $T8 %]
[% HTML.escape(max_dunning_level) %] ; [% 'Dunning Amount' | $T8 %]:
[% HTML.escape(LxERP.format_amount(dunning_amount, 2)) %]
[%- END %]
[%- IF ALL_LANGUAGES.size %]
[% 'Language' | $T8 %]
[% L.select_tag('language_id', ALL_LANGUAGES, default = language_id, title_key = 'description', with_empty = 1, style = 'width: 250px' )%]
[%- END %]
[%- IF ALL_DEPARTMENTS.size %]
[% 'Department' | $T8 %]
[% IF ( delivered ) %]
[% L.hidden_tag('department_id', department_id) %]
[% ELSE %]
[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%]
[% END %]
[%- END %]
[% 'Shipping Point' | $T8 %]
[% 'Ship via' | $T8 %]
[% 'Transaction description' | $T8 %]
[% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=(INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : ''), readonly=delivered) %]
[%- IF delivered %]
[%- IF is_customer %]
[% 'transferred out' | $T8 %]
[%- ELSE %]
[% 'transferred in' | $T8 %]
[%- END %]
[%- ELSE %]
[%- IF is_customer %]
[% 'not transferred out yet' | $T8 %]
[%- ELSE %]
[% 'not transferred in yet' | $T8 %]
[%- END %]
[%- END %]
;
[%- IF closed %]
[% 'Closed' | $T8 %]
[%- ELSE %]
[% 'Open' | $T8 %]
[%- END %]
[% 'Employee' | $T8 %]
[%- IF delivered %]
[%- FOREACH row = ALL_EMPLOYEES %]
[% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
[%- END %]
[%- ELSE %]
[% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %]
[%- END %]
[%- IF is_customer %]
[%- IF salesman_id %]
[%- SET the_salesman_id = salesman_id %]
[%- ELSE %]
[%- SET the_salesman_id = employee_id %]
[%- END %]
[% 'Salesman' | $T8 %]
[%- IF delivered %]
[%- FOREACH row = ALL_SALESMEN %]
[% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %]
[%- END %]
[%- ELSE %]
[% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %]
[%- END %]
[%- END %]
[% 'Delivery Order Number' | $T8 %]
[% 'Order Number' | $T8 %]
[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]
[% 'Delivery Order Date' | $T8 %]
[% L.date_tag('transdate', transdate, readonly => delivered) %]
[% 'Reqdate' | $T8 %]
[% L.date_tag('reqdate', reqdate, readonly => delivered) %]
[%- IF is_customer %]
[% 'Insert Date' | $T8 %]
[% insertdate %]
[%- END %]
[% 'Project Number' | $T8 %]
[%- IF delivered %]
[%- FOREACH row = ALL_PROJECTS %]
[% IF globalproject_id == row.id %][% HTML.escape(row.projectnumber) %][% END %]
[%- END %]
[%- ELSE %]
[%- FOREACH row = ALL_PROJECTS %]
[% HTML.escape(row.projectnumber) %]
[%- END %]
[%- END %]