[%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%] [% L.stylesheet_tag('webshop') %] [%- INCLUDE 'common/flash.html' %]

[% title %]

[% L.hidden_tag('create_customer','customer') %][% L.hidden_tag('import_id', IMPORT.id) %]
[% 'Shop Customer Address' | $T8 %]
[% 'Greeting' | $T8 %]
[% HTML.escape(IMPORT.customer_greeting) %]
[% 'Firstname' | $T8 %]
[% HTML.escape(IMPORT.customer_firstname) %]
[% 'Lastname' | $T8 %]
[% HTML.escape(IMPORT.customer_lastname) %]
[% 'Company' | $T8 %]
[% HTML.escape(IMPORT.customer_company) %]
[% 'Department' | $T8 %]
[% HTML.escape(IMPORT.customer_department) %]
[% SET customer = IMPORT.customer_firstname _ ' ' _ IMPORT.customer_lastname %]
[% 'Greeting' | $T8 %]
[% L.input_tag('customer_greeting', IMPORT.customer_greeting) %]
[% 'Customer' | $T8 %]
[% L.input_tag('customer_name', customer) %]
[% 'Name 2' | $T8 %]
[% L.input_tag('customer_company', IMPORT.customer_company) %]
[% 'Name 3' | $T8 %]
[% L.input_tag('customer_department', IMPORT.customer_department) %]
[% 'Street' | $T8 %]
[% L.input_tag('customer_street', IMPORT.customer_street) %]
[% 'Zipcode' | $T8 %]
[% L.input_tag('customer_zipcode', IMPORT.customer_zipcode) %]
[% 'City' | $T8 %]
[% L.input_tag('customer_city', IMPORT.customer_city) %]
[% 'Country' | $T8 %]
[% L.input_tag('customer_country', IMPORT.customer_country) %]
[% 'Phone' | $T8 %]
[% L.input_tag('customer_phone', IMPORT.customer_phone) %]
[% 'Email' | $T8 %]
[% L.input_tag('customer_email', IMPORT.customer_email) %]
[% IF C_ADDRESS %]
[% 'Customernumber' | $T8 %]
[% C_ADDRESS.customernumber %]
[% ELSE %]
[% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer", "#customer", LxERP.t8("Apply customer")) %]
[% END %]
[% L.hidden_tag('create_customer','billing') %][% L.hidden_tag('import_id', IMPORT.id) %]
[% 'Shop Billing Address' | $T8 %]
[% 'Greeting' | $T8 %]
[% HTML.escape(IMPORT.billing_greeting) %]
[% 'Firstname' | $T8 %]
[% HTML.escape(IMPORT.billing_firstname) %]
[% 'Lastname' | $T8 %]
[% HTML.escape(IMPORT.billing_lastname) %]
[% 'Company' | $T8 %]
[% HTML.escape(IMPORT.billing_company) %]
[% 'Department' | $T8 %]
[% HTML.escape(IMPORT.billing_department) %]
[% SET billing = IMPORT.billing_firstname _ ' ' _ IMPORT.billing_lastname %]
[% 'Greeting' | $T8 %]
[% L.input_tag('billing_greeting', IMPORT.billing_greeting) %]
[% 'Customer' | $T8 %]
[% L.input_tag('billing_name', billing) %]
[% 'Name 2' | $T8 %]
[% L.input_tag('billing_company', IMPORT.billing_company) %]
[% 'Name 3' | $T8 %]
[% L.input_tag('billing_department', IMPORT.billing_department) %]
[% 'Street' | $T8 %]
[% L.input_tag('billing_street', IMPORT.billing_street) %]
[% 'Zipcode' | $T8 %]
[% L.input_tag('billing_zipcode', IMPORT.billing_zipcode) %]
[% 'City' | $T8 %]
[% L.input_tag('billing_city', IMPORT.billing_city) %]
[% 'Country' | $T8 %]
[% L.input_tag('billing_country', IMPORT.billing_country) %]
[% 'Phone' | $T8 %]
[% L.input_tag('billing_phone', IMPORT.billing_phone) %]
[% 'Email' | $T8 %]
[% L.input_tag('billing_email', IMPORT.billing_email) %]
[% IF B_ADDRESS %]
[% 'Customernumber' | $T8 %]
[% B_ADDRESS.customernumber %]
[% ELSE %]
[% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer", "#billing", LxERP.t8("Apply customer")) %]
[% END %]
[% L.hidden_tag('create_customer','delivery') %][% L.hidden_tag('import_id', IMPORT.id) %]
[% 'Shop Delivery Address' | $T8 %]
[% 'Greeting' | $T8 %]
[% HTML.escape(IMPORT.delivery_greeting) %]
[% 'Firstname' | $T8 %]
[% HTML.escape(IMPORT.delivery_firstname) %]
[% 'Lastname' | $T8 %]
[% HTML.escape(IMPORT.delivery_lastname) %]
[% 'Company' | $T8 %]
[% HTML.escape(IMPORT.delivery_company) %]
[% 'Department' | $T8 %]
[% HTML.escape(IMPORT.delivery_department) %]
[% SET delivery = IMPORT.delivery_firstname _ ' ' _ IMPORT.delivery_lastname %]
[% 'Greeting' | $T8 %]
[% L.input_tag('delivery_greeting', IMPORT.delivery_greeting) %]
[% 'Customer' | $T8 %]
[% L.input_tag('delivery_name', delivery) %]
[% 'Name 2' | $T8 %]
[% L.input_tag('delivery_company', IMPORT.delivery_company) %]
[% 'Name 3' | $T8 %]
[% L.input_tag('delivery_department', IMPORT.delivery_department) %]
[% 'Street' | $T8 %]
[% L.input_tag('delivery_street', IMPORT.delivery_street) %]
[% 'Zipcode' | $T8 %]
[% L.input_tag('delivery_zipcode', IMPORT.delivery_zipcode) %]
[% 'City' | $T8 %]
[% L.input_tag('delivery_city', IMPORT.delivery_city) %]
[% 'Country' | $T8 %]
[% L.input_tag('delivery_country', IMPORT.delivery_country) %]
[% 'Phone' | $T8 %]
[% L.input_tag('delivery_phone', IMPORT.delivery_phone) %]
[% 'Email' | $T8 %]
[% L.input_tag('delivery_email', IMPORT.delivery_email) %]
[% IF D_ADDRESS %]
[% 'Customernumber' | $T8 %]
[% D_ADDRESS.customernumber %]
[% ELSE %]
[% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer", "#delivery", LxERP.t8("Apply customer")) %]
[% END %]

[% 'Shop Headdata' | $T8 %]
[% 'Shop Ordernumber' | $T8 %][% HTML.escape(IMPORT.shop_ordernumber) %]
[% 'Shop Orderdate' | $T8 %][% HTML.escape(IMPORT.order_date.dmy('.')) _ ' ' _ HTML.escape(IMPORT.order_date.hms(':')) %]
[% 'Shop Host' | $T8 %][% HTML.escape(IMPORT.host) %]
[% 'Shop OrderIP' | $T8 %][% HTML.escape(IMPORT.remote_ip) %]
[% 'Shop Ordernotes' | $T8 %][% HTML.escape(IMPORT.shop_customer_comment) %]
[% 'Shop Orderamount' | $T8 %][% HTML.escape(IMPORT.amount_as_number) %]
[% 'Shipping costs' | $T8 %][% HTML.escape(IMPORT.shipping_costs_as_number) %]
[% 'Payment description' | $T8 %][% HTML.escape(IMPORT.payment_description) %]
[% IF IMPORT.obsolete %] [% 'Shoporder deleted -- ' | $T8 %][% 'revert deleted' | $T8 %] [% ELSE %] [% UNLESS IMPORT.transferred %] [% IF PROPOSALS %]
[% L.hidden_tag('import_id', IMPORT.id) %]
[% FOREACH prop = PROPOSALS %][% IF prop.order_lock %][% SET orderlock_class = 'style="background:rgba(232, 32, 23, 0.2);"' %][% ELSE %][% SET orderlock_class = '' %][% END %] [% END %]
[% 'Customer Proposals' | $T8 %]
[% IF !prop.order_lock %][% L.radio_button_tag('customer', value=prop.id) %][% END %] [% HTML.escape(prop.customernumber) %] [% IF !prop.notes == '' %][% HTML.escape(prop.name) %][% ELSE %][% HTML.escape(prop.name) %][% END %] [% HTML.escape(prop.street) %] [% HTML.escape(prop.zipcode) %] [% HTML.escape(prop.city) %] [% HTML.escape(prop.email) %]
[% FOREACH prop = PROPOSALS %] [% END %]
[% 'delete order' | $T8 %] [% END # PROPOSALS %] [% ELSE %]
[% 'Transferred' | $T8 %]
[% END %] [% END %]

[% FOREACH pos = IMPORT.shop_order_items %] [% END %]
[% 'Position' | $T8 %] [% 'Partnumber' | $T8 %] [% 'Partdescriptipion' | $T8 %] [% 'Qty' | $T8 %] [% 'Price' | $T8 %] [% 'Extended' | $T8 %]
[% loop.count %] [% HTML.escape(pos.partnumber) %] [% HTML.escape(pos.description) %] [% pos.quantity_as_number %] [% pos.price_as_number %] [% LxERP.format_amount(pos.price * pos.quantity,2) %]