1 [%- USE HTML -%][%- USE LxERP -%][%- USE L -%][%- USE T8 -%]
2 [% L.stylesheet_tag('webshop') %]
3 [%- INCLUDE 'common/flash.html' %]
6 <div class="shop_table shop_main">
7 <div class="shop_table-row">
8 <div class="shop_table-cell">
9 <form method="post" action="controller.pl" id="customer">[% L.hidden_tag('create_customer','customer') %][% L.hidden_tag('import_id', IMPORT.id) %]
10 <div class="shop_table shop_table_address">
11 <div class="shop_table-row listheading">
12 <div class="shop_table-cell">[% 'Shop Customer Address' | $T8 %]</div>
13 <div class="shop_table-cell"></div>
15 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Greeting' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.customer_greeting) %]</div></div>
16 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Firstname' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.customer_firstname) %]</div></div>
17 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Lastname' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.customer_lastname) %]</div></div>
18 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Company' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.customer_company) %]</div></div>
19 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Department' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.customer_department) %]</div></div>
20 [% SET customer = IMPORT.customer_firstname _ ' ' _ IMPORT.customer_lastname %]
22 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Greeting' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_greeting', IMPORT.customer_greeting) %]</div></div>
23 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Customer' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_name', customer) %]</div></div>
24 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Name 2' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_company', IMPORT.customer_company) %]</div></div>
25 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Name 3' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_department', IMPORT.customer_department) %]</div></div>
26 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Street' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_street', IMPORT.customer_street) %]</div></div>
27 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Zipcode' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_zipcode', IMPORT.customer_zipcode) %]</div></div>
28 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'City' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_city', IMPORT.customer_city) %]</div></div>
29 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Country' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_country', IMPORT.customer_country) %]</div></div>
30 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Phone' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_phone', IMPORT.customer_phone) %]</div></div>
31 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Email' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('customer_email', IMPORT.customer_email) %]</div></div>
33 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Customernumber' | $T8 %]</div><div class="shop_table-cell">[% C_ADDRESS.customernumber %]</div></div>
35 <div>[% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer", "#customer", LxERP.t8("Apply customer")) %]</div>
40 <div class="shop_table-cell">
41 <form method="post" action="controller.pl" id="billing">[% L.hidden_tag('create_customer','billing') %][% L.hidden_tag('import_id', IMPORT.id) %]
42 <div class="shop_table shop_table_address">
43 <div class="shop_table-row listheading">
44 <div class="shop_table-cell">[% 'Shop Billing Address' | $T8 %]</div>
45 <div class="shop_table-cell"></div>
47 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Greeting' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.billing_greeting) %]</div></div>
48 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Firstname' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.billing_firstname) %]</div></div>
49 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Lastname' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.billing_lastname) %]</div></div>
50 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Company' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.billing_company) %]</div></div>
51 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Department' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.billing_department) %]</div></div>
52 [% SET billing = IMPORT.billing_firstname _ ' ' _ IMPORT.billing_lastname %]
54 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Greeting' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_greeting', IMPORT.billing_greeting) %]</div></div>
55 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Customer' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_name', billing) %]</div></div>
56 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Name 2' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_company', IMPORT.billing_company) %]</div></div>
57 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Name 3' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_department', IMPORT.billing_department) %]</div></div>
58 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Street' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_street', IMPORT.billing_street) %]</div></div>
59 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Zipcode' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_zipcode', IMPORT.billing_zipcode) %]</div></div>
60 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'City' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_city', IMPORT.billing_city) %]</div></div>
61 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Country' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_country', IMPORT.billing_country) %]</div></div>
62 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Phone' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_phone', IMPORT.billing_phone) %]</div></div>
63 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Email' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('billing_email', IMPORT.billing_email) %]</div></div>
65 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Customernumber' | $T8 %]</div><div class="shop_table-cell">[% B_ADDRESS.customernumber %]</div></div>
67 <div>[% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer", "#billing", LxERP.t8("Apply customer")) %]</div>
72 <div class="shop_table-cell">
73 <form method="post" action="controller.pl" id="delivery">[% L.hidden_tag('create_customer','delivery') %][% L.hidden_tag('import_id', IMPORT.id) %]
74 <div class="shop_table shop_table_address">
75 <div class="shop_table-row listheading">
76 <div class="shop_table-cell">[% 'Shop Delivery Address' | $T8 %]</div>
77 <div class="shop_table-cell"></div>
79 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Greeting' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.delivery_greeting) %]</div></div>
80 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Firstname' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.delivery_firstname) %]</div></div>
81 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Lastname' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.delivery_lastname) %]</div></div>
82 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Company' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.delivery_company) %]</div></div>
83 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Department' | $T8 %]</div><div class="shop_table-cell">[% HTML.escape(IMPORT.delivery_department) %]</div></div>
84 [% SET delivery = IMPORT.delivery_firstname _ ' ' _ IMPORT.delivery_lastname %]
86 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Greeting' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_greeting', IMPORT.delivery_greeting) %]</div></div>
87 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Customer' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_name', delivery) %]</div></div>
88 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Name 2' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_company', IMPORT.delivery_company) %]</div></div>
89 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Name 3' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_department', IMPORT.delivery_department) %]</div></div>
90 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Street' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_street', IMPORT.delivery_street) %]</div></div>
91 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Zipcode' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_zipcode', IMPORT.delivery_zipcode) %]</div></div>
92 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'City' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_city', IMPORT.delivery_city) %]</div></div>
93 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Country' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_country', IMPORT.delivery_country) %]</div></div>
94 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Phone' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_phone', IMPORT.delivery_phone) %]</div></div>
95 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Email' | $T8 %]</div><div class="shop_table-cell">[% L.input_tag('delivery_email', IMPORT.delivery_email) %]</div></div>
97 <div class="shop_table-row"><div class="shop_table-cell listheading">[% 'Customernumber' | $T8 %]</div><div class="shop_table-cell">[% D_ADDRESS.customernumber %]</div></div>
99 <div>[% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer", "#delivery", LxERP.t8("Apply customer")) %]</div>
111 <tr class="listheading">
112 <th colspan="2">[% 'Shop Headdata' | $T8 %]</th>
114 <tr><td><b>[% 'Shop Ordernumber' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.shop_ordernumber) %]</td></tr>
115 <tr><td><b>[% 'Shop Orderdate' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.order_date.dmy('.')) _ ' ' _ HTML.escape(IMPORT.order_date.hms(':')) %]</td></tr>
116 <tr><td><b>[% 'Shop Host' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.host) %]</td></tr>
117 <tr><td><b>[% 'Shop OrderIP' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.remote_ip) %]</td></tr>
118 <tr><td><b>[% 'Shop Ordernotes' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.shop_customer_comment) %]</td></tr>
119 <tr><td><b>[% 'Shop Orderamount' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.amount_as_number) %]</td></tr>
120 <tr><td><b>[% 'Shipping costs' | $T8 %]</b></td><td>[% HTML.escape(IMPORT.shipping_costs_as_number) %]</td></tr>
123 <td style="padding-left: 20px; vertical-align: top;">
124 [% IF IMPORT.obsolete %]
125 <b>[% 'Shoporder deleted -- ' | $T8 %]</b><a href="controller.pl?action=ShopOrder/undelete_order&import_id=[% IMPORT.id %]">[% 'revert deleted' | $T8 %]</a>
127 [% UNLESS IMPORT.transferred %]
129 <form method="post" action="controller.pl" id="create_order">
130 [% L.hidden_tag('import_id', IMPORT.id) %]
131 <div style="height: 125px; overflow:auto;">
133 <tr class="listheading">
134 <th colspan="7">Customer Proposals</td>
136 [% FOREACH prop = PROPOSALS %][% IF prop.order_lock %][% SET orderlock_class = 'style="background:rgba(232, 32, 23, 0.2);"' %][% ELSE %][% SET orderlock_class = '' %][% END %]
137 <tr class="listrow" [% orderlock_class %]>
138 <td>[% IF !prop.order_lock %][% L.radio_button_tag('customer', value=prop.id) %][% END %]</td>
139 <td><a href="controller.pl?action=CustomerVendor/edit&id=[% prop.id %]&db=customer&callback=[% HTML.url('controller.pl?action=ShopOrder/show&id=' _ IMPORT.id) %]">[% HTML.escape(prop.customernumber) %]</a></td>
140 <td>[% IF !prop.notes == '' %]<span class="tooltipster-html" title="[% HTML.escape(prop.notes) %]"><span style="color:red;font-weight: bold;">[% HTML.escape(prop.name) %]</span>[% ELSE %][% HTML.escape(prop.name) %][% END %]</td>
141 <td>[% HTML.escape(prop.street) %]</td>
142 <td>[% HTML.escape(prop.zipcode) %]</td>
143 <td>[% HTML.escape(prop.city) %]</td>
144 <td>[% HTML.escape(prop.email) %]</td>
149 <div id="transfer" style="float:left; display:none;">
150 [% # 'Customernumber: ' _ %]
151 [% L.ajax_submit_tag('controller.pl?action=ShopOrder/transfer', "#create_order", LxERP.t8('Create order')) %]
153 [% FOREACH prop = PROPOSALS %]
154 <div id="shop_update_customer_[% prop.id %]" class="div_hidden" style="display:none;">
155 [% L.ajax_submit_tag("controller.pl?action=ShopOrder/apply_customer&cv_id=" _ prop.id, "#billing", LxERP.t8("Update customer using billing address")) %]
159 <a href="controller.pl?action=ShopOrder/delete_order&import_id=[% IMPORT.id %]">[% 'delete order' | $T8 %]</a>
160 [% END # PROPOSALS %]
163 [% 'Transferred' | $T8 %]
164 <div id="recordlinks"></div>
165 <script type="text/javascript">
166 var url = 'controller.pl?action=RecordLinks/ajax_list&object_model=ShopOrder&object_id=[% IMPORT.id %]';
167 $('#recordlinks').load(url);
176 <div style="height: 250px; overflow:auto; margin:15px;">
178 <tr class="listheading">
179 <th>[% 'Position' | $T8 %]</th>
180 <th>[% 'Partnumber' | $T8 %]</th>
181 <th>[% 'Partdescriptipion' | $T8 %]</th>
182 <th>[% 'Qty' | $T8 %]</th>
183 <th>[% 'Price' | $T8 %]</th>
184 <th>[% 'Extended' | $T8 %]</th>
187 [% FOREACH pos = IMPORT.shop_order_items %]
188 <td>[% loop.index+1 %]</td>
189 <td>[% HTML.escape(pos.partnumber) %]</td>
190 <td>[% HTML.escape(pos.description) %]</td>
191 <td>[% pos.quantity_as_number %]</td>
192 <td>[% pos.price_as_number %]</td>
193 <td>[% LxERP.format_amount(pos.price * pos.quantity,2) %]</td>
199 <script type="text/javascript">
200 $("input[type=radio]").change(function(){
201 $('.div_hidden').css("display", 'none');
202 var cv_id = $("input[type=radio][id="+ this.id + "]").val();
203 $('#shop_update_customer_'+ cv_id).css("display", 'block');
204 $('#transfer').css("display", 'block');