[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %]
[%- UNLESS !delivered && SHOW_VC_DROP_DOWN %]
[%- ELSE %]
[%- FOREACH row = ALL_VC %]
[% HTML.escape(row.name) %]
[%- END %]
[%- END %]
[%- IF ALL_CONTACTS.size %]
[% 'Contact Person' | $T8 %]
[%- IF delivered %]
[%- IF cp_id == row.cp_id %]
[%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%]
[%- 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 %]
[%- IF ALL_SHIPTO.size %]
[% 'Shipping Address' | $T8 %]
[%- IF delivered %]
[%- FOREACH row = ALL_SHIPTO %]
[%- IF shipto_id == row.shipto_id %]
[%- HTML.escape(row.shiptoname) -%]
[%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
[%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
[%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
[%- END %]
[%- END %]
[%- ELSE %]
[% L.select_tag('shipto_id', ALL_SHIPTO, default = shipto_id, value_key = 'shipto_id', title_key = 'displayable_id', with_empty = 1, class = 'fixed_width') %]
[%- END %]
[%- 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_DEPARTMENTS.size %]
[% 'Department' | $T8 %]
[% IF ( delivered ) %]
[% L.hidden_tag('department_id', department_id) %]
[% END %]
[% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%]
[%- END %]
[% 'Shipping Point' | $T8 %]
[% 'Ship via' | $T8 %]
[% 'Transaction description' | $T8 %]
[%- 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) %]
[% '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 %]