2 |
2 |
[%- USE HTML %]
|
3 |
3 |
[%- USE LxERP %]
|
4 |
4 |
[%- USE L %][%- USE P -%]
|
|
5 |
|
|
6 |
[%# Determine which shipping address to show if the delivery order has been shipped already. %]
|
|
7 |
[%- IF delivered;
|
|
8 |
SET shipto_label = [];
|
|
9 |
IF shipto_id;
|
|
10 |
FOREACH row = ALL_SHIPTO ;
|
|
11 |
IF row.shipto_id == shipto_id ;
|
|
12 |
SET shipto_label = [ row.shiptoname, row.shiptodepartment_1, row.shiptostreet, row.shiptocity ] ;
|
|
13 |
END ;
|
|
14 |
END ;
|
|
15 |
ELSE ;
|
|
16 |
SET shipto_label = [ shiptoname, shiptodepartment_1, shiptostreet, shiptocity ] ;
|
|
17 |
END ;
|
|
18 |
|
|
19 |
SET shipto_label = shipto_label.grep('.') ;
|
|
20 |
IF !shipto_label.size ;
|
|
21 |
shipto_label = [ LxERP.t8('no shipping address') ] ;
|
|
22 |
END ;
|
|
23 |
END ; %]
|
|
24 |
|
5 |
25 |
<h1>[% title %]</h1>
|
6 |
26 |
|
7 |
27 |
<script type="text/javascript" src="js/show_form_details.js"></script>
|
... | ... | |
84 |
104 |
<input type="hidden" name="proforma" value="[% HTML.escape(proforma) %]">
|
85 |
105 |
<input type="hidden" name="queued" value="[% HTML.escape(queued) %]">
|
86 |
106 |
<input type="hidden" name="saved_donumber" value="[% HTML.escape(saved_donumber) %]">
|
|
107 |
[%- IF delivered %]
|
|
108 |
<input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
|
87 |
109 |
<input type="hidden" name="shiptocity" value="[% HTML.escape(shiptocity) %]">
|
88 |
110 |
<input type="hidden" name="shiptocontact" value="[% HTML.escape(shiptocontact) %]">
|
89 |
111 |
<input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
|
... | ... | |
98 |
120 |
<input type="hidden" name="shiptostreet" value="[% HTML.escape(shiptostreet) %]">
|
99 |
121 |
<input type="hidden" name="shiptozipcode" value="[% HTML.escape(shiptozipcode) %]">
|
100 |
122 |
<input type="hidden" name="shiptocp_gender" value="[% HTML.escape(shiptocp_gender) %]">
|
|
123 |
[%- END %]
|
101 |
124 |
<input type="hidden" name="show_details" value="[% HTML.escape(show_details) %]">
|
102 |
125 |
<input type="hidden" name="subject" value="[% HTML.escape(subject) %]">
|
103 |
126 |
<input type="hidden" name="taxincluded" value="[% HTML.escape(taxincluded) %]">
|
... | ... | |
144 |
167 |
</tr>
|
145 |
168 |
[%- END %]
|
146 |
169 |
|
147 |
|
[%- IF ALL_SHIPTO.size %]
|
148 |
170 |
<tr>
|
149 |
171 |
<th align="right">[% 'Shipping Address' | $T8 %]</th>
|
150 |
172 |
<td>
|
151 |
173 |
[%- IF delivered %]
|
152 |
|
<input type="hidden" name="shipto_id" value="[% HTML.escape(shipto_id) %]">
|
153 |
|
[%- FOREACH row = ALL_SHIPTO %]
|
154 |
|
[%- IF shipto_id == row.shipto_id %]
|
155 |
|
[%- HTML.escape(row.shiptoname) -%]
|
156 |
|
[%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%]
|
157 |
|
[%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%]
|
158 |
|
[%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%]
|
159 |
|
[%- END %]
|
160 |
|
[%- END %]
|
161 |
|
|
|
174 |
[% HTML.escape(shipto_label.join('; ')) %]
|
162 |
175 |
[%- ELSE %]
|
|
176 |
[%- IF ALL_SHIPTO.size %]
|
163 |
177 |
[% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ;
|
164 |
178 |
L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %]
|
165 |
|
[% L.submit_tag('action_ship_to', LxERP.t8('Ship to')) %]
|
|
179 |
[%- END %]
|
|
180 |
[% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %]
|
166 |
181 |
[%- END %]
|
167 |
182 |
</td>
|
168 |
183 |
</tr>
|
169 |
|
[%- END %]
|
170 |
184 |
|
171 |
185 |
[%- IF business %]
|
172 |
186 |
<tr>
|
ActionBar: Lieferscheine: Lieferadresse via Popup bearbeiten