[% USE HTML %][% USE L %][% USE LxERP %][%- USE JavaScript -%] [% select_options = [ [ 0, LxERP.t8("Billing Address") ] ] ; FOREACH shipto = vc_obj.shipto ; city = shipto.shiptozipcode _ ' ' _ shipto.shiptocity ; title = [ shipto.shiptoname, shipto.shiptostreet, city ] ; CALL select_options.import([ [ loop.count, title.grep('\S').join("; ") ] ]) ; END ; '' %]
[% L.hidden_tag("shipto_id", shipto_id) %]

[% LxERP.t8("Copy address from master data") %]: [% L.select_tag("", select_options, id="shipto_to_copy", style="width: 400px") %] [% L.button_tag("copy_address()", LxERP.t8("Copy")) %] [% L.button_tag("clear_fields()", LxERP.t8("Clear fields")) %]

[% LxERP.t8('Billing Address') %] [% LxERP.t8('Shipping Address') %]
[%- IF vc == "customer" %][%- LxERP.t8('Customer Number') %][%- ELSE %][%- LxERP.t8('Vendor Number') %][%- END %] [%- IF vc == "customer" %][%- HTML.escape(customernumber) %][%- ELSE %][%- HTML.escape(vendornumber) %][%- END %]
[% LxERP.t8('Company Name') %] [% HTML.escape(name) %] [% L.input_tag("shiptoname", shiptoname, "size", "35") %]
[% LxERP.t8('Department') %] [% HTML.escape(department_1) %] [% L.input_tag("shiptodepartment_1", shiptodepartment_1, "size", "35") %]
  [% HTML.escape(department_2) %] [% L.input_tag("shiptodepartment_2", shiptodepartment_2, "size", "35") %]
[% LxERP.t8('Street') %] [% HTML.escape(street) %] [% L.input_tag("shiptostreet", shiptostreet, "size", "35") %]
[% LxERP.t8('Zipcode') %] [% HTML.escape(zipcode) %] [% L.input_tag("shiptozipcode", shiptozipcode, "size", "35") %]
[% LxERP.t8('City') %] [% HTML.escape(city) %] [% L.input_tag("shiptocity", shiptocity, "size", "35") %]
[% LxERP.t8('Country') %] [% HTML.escape(country) %] [% L.input_tag("shiptocountry", shiptocountry, "size", "35") %]
[% LxERP.t8('Contact') %] [% HTML.escape(contact) %] [% L.input_tag("shiptocontact", shiptocontact, "size", "35") %]
[% LxERP.t8('Gender') %] [% L.select_tag('shiptocp_gender', [ [ 'm', LxERP.t8('male') ], [ 'f', LxERP.t8('female') ] ], 'default' = shiptocp_gender) %]
[% LxERP.t8('Phone') %] [% HTML.escape(phone) %] [% L.input_tag("shiptophone", shiptophone, "size", "35") %]
[% LxERP.t8('Fax') %] [% HTML.escape(fax) %] [% L.input_tag("shiptofax", shiptofax, "size", "35") %]
[% LxERP.t8('E-mail') %] [% HTML.escape(email) %] [% L.input_tag("shiptoemail", shiptoemail, "size", "35") %]

[% L.hidden_tag("action", "ship_to_entered") %] [% L.hidden_tag("nextsub", nextsub) %] [% L.hidden_tag("previousform", previousform) %] [% L.button_tag("clear_shipto_id_before_submit()", LxERP.t8("Continue")) %]