1 [% USE HTML %][% USE L %][% USE LxERP %][%- USE JavaScript -%]
3 <script type="text/javascript">
5 { shiptoname: "[% JavaScript.escape(vc_obj.name) %]",
6 shiptodepartment_1: "[% JavaScript.escape(vc_obj.department_1) %]",
7 shiptodepartment_2: "[% JavaScript.escape(vc_obj.department_2) %]",
8 shiptostreet: "[% JavaScript.escape(vc_obj.street) %]",
9 shiptozipcode: "[% JavaScript.escape(vc_obj.zipcode) %]",
10 shiptocity: "[% JavaScript.escape(vc_obj.city) %]",
11 shiptocountry: "[% JavaScript.escape(vc_obj.country) %]",
12 shiptogln: "[% JavaScript.escape(vc_obj.gln) %]",
13 shiptocontact: "[% JavaScript.escape(vc_obj.contact) %]",
14 shiptocp_gender: "[% JavaScript.escape(vc_obj.cp_gender) %]",
15 shiptophone: "[% JavaScript.escape(vc_obj.phone) %]",
16 shiptofax: "[% JavaScript.escape(vc_obj.fax) %]",
17 shiptoemail: "[% JavaScript.escape(vc_obj.email) %]"
20 [% FOREACH shipto = vc_obj.shipto %]
22 { shiptoname: "[% JavaScript.escape(shipto.shiptoname) %]",
23 shiptodepartment_1: "[% JavaScript.escape(shipto.shiptodepartment_1) %]",
24 shiptodepartment_2: "[% JavaScript.escape(shipto.shiptodepartment_2) %]",
25 shiptostreet: "[% JavaScript.escape(shipto.shiptostreet) %]",
26 shiptozipcode: "[% JavaScript.escape(shipto.shiptozipcode) %]",
27 shiptocity: "[% JavaScript.escape(shipto.shiptocity) %]",
28 shiptocountry: "[% JavaScript.escape(shipto.shiptocountry) %]",
29 shiptogln: "[% JavaScript.escape(shipto.shiptogln) %]",
30 shiptocontact: "[% JavaScript.escape(shipto.shiptocontact) %]",
31 shiptocp_gender: "[% JavaScript.escape(shipto.shiptocp_gender) %]",
32 shiptophone: "[% JavaScript.escape(shipto.shiptophone) %]",
33 shiptofax: "[% JavaScript.escape(shipto.shiptofax) %]",
34 shiptoemail: "[% JavaScript.escape(shipto.shiptoemail) %]"
39 function copy_address() {
40 var shipto = addresses[ $('#shipto_to_copy').val() ];
42 $('#' + key).val(shipto[key]);
45 function clear_fields() {
46 var shipto = addresses[0];
49 $('#shiptocp_gender').val('m');
52 function clear_shipto_id_before_submit() {
53 var shipto = addresses[0];
55 if ((key != 'shiptocp_gender') && ($('#' + key).val() != '')) {
56 $('#shipto_id').val('');
64 [% select_options = [ [ 0, LxERP.t8("Billing Address") ] ] ;
65 FOREACH shipto = vc_obj.shipto ;
66 tmpcity = shipto.shiptozipcode _ ' ' _ shipto.shiptocity ;
67 tmptitle = [ shipto.shiptoname, shipto.shiptostreet, tmpcity ] ;
68 CALL select_options.import([ [ loop.count, tmptitle.grep('\S').join("; ") ] ]) ;
72 <form method="post" action="[% HTML.escape(script) %]">
73 [% L.hidden_tag("shipto_id", shipto_id) %]
76 [% LxERP.t8("Copy address from master data") %]:
77 [% L.select_tag("", select_options, id="shipto_to_copy", style="width: 400px") %]
78 [% L.button_tag("copy_address()", LxERP.t8("Copy")) %]
79 [% L.button_tag("clear_fields()", LxERP.t8("Clear fields")) %]
83 <tr class="listheading">
84 <th colspan="2" width="50%">[% LxERP.t8('Billing Address') %]</th>
85 <th width="50%">[% LxERP.t8('Shipping Address') %]</th>
89 <th align="right" nowrap>[%- IF vc == "customer" %][%- LxERP.t8('Customer Number') %][%- ELSE %][%- LxERP.t8('Vendor Number') %][%- END %]</th>
90 <td>[%- IF vc == "customer" %][%- HTML.escape(customernumber) %][%- ELSE %][%- HTML.escape(vendornumber) %][%- END %]</td>
93 <th align="right" nowrap>[% LxERP.t8('Company Name') %]</th>
94 <td>[% HTML.escape(name) %]</td>
95 <td>[% L.input_tag("shiptoname", shiptoname, "size", "35") %]</td>
98 <th align="right" nowrap>[% LxERP.t8('Department') %]</th>
99 <td>[% HTML.escape(department_1) %]</td>
100 <td>[% L.input_tag("shiptodepartment_1", shiptodepartment_1, "size", "35") %]</td>
103 <th align="right" nowrap> </th>
104 <td>[% HTML.escape(department_2) %]</td>
105 <td>[% L.input_tag("shiptodepartment_2", shiptodepartment_2, "size", "35") %]</td>
108 <th align="right" nowrap>[% LxERP.t8('Street') %]</th>
109 <td>[% HTML.escape(street) %]</td>
110 <td>[% L.input_tag("shiptostreet", shiptostreet, "size", "35") %]</td>
113 <th align="right" nowrap>[% LxERP.t8('Zipcode') %]</th>
114 <td>[% HTML.escape(zipcode) %]</td>
115 <td>[% L.input_tag("shiptozipcode", shiptozipcode, "size", "35") %]</td>
118 <th align="right" nowrap>[% LxERP.t8('City') %]</th>
119 <td>[% HTML.escape(city) %]</td>
120 <td>[% L.input_tag("shiptocity", shiptocity, "size", "35") %]</td>
123 <th align="right" nowrap>[% LxERP.t8('Country') %]</th>
124 <td>[% HTML.escape(country) %]</td>
125 <td>[% L.input_tag("shiptocountry", shiptocountry, "size", "35") %]</td>
128 <th align="right" nowrap>[% LxERP.t8('GLN') %]</th>
129 <td>[% HTML.escape(gln) %]</td>
130 <td>[% L.input_tag("shiptogln", shiptogln, "size", "35") %]</td>
133 <th align="right" nowrap>[% LxERP.t8('Contact') %]</th>
134 <td>[% HTML.escape(contact) %]</td>
135 <td>[% L.input_tag("shiptocontact", shiptocontact, "size", "35") %]</td>
138 <th align="right" nowrap>[% LxERP.t8('Gender') %]</th>
141 [% L.select_tag('shiptocp_gender', [ [ 'm', LxERP.t8('male') ], [ 'f', LxERP.t8('female') ] ], 'default' = shiptocp_gender) %]
145 <th align="right" nowrap>[% LxERP.t8('Phone') %]</th>
146 <td>[% HTML.escape(phone) %]</td>
147 <td>[% L.input_tag("shiptophone", shiptophone, "size", "35") %]</td>
150 <th align="right" nowrap>[% LxERP.t8('Fax') %]</th>
151 <td>[% HTML.escape(fax) %]</td>
152 <td>[% L.input_tag("shiptofax", shiptofax, "size", "35") %]</td>
155 <th align="right" nowrap>[% LxERP.t8('E-mail') %]</th>
156 <td>[% HTML.escape(email) %]</td>
157 <td>[% L.input_tag("shiptoemail", shiptoemail, "size", "35") %]</td>
161 <hr size="3" noshade>
163 [% L.hidden_tag("action", "ship_to_entered") %]
164 [% L.hidden_tag("nextsub", nextsub) %]
165 [% L.hidden_tag("previousform", previousform) %]
167 [% L.button_tag("clear_shipto_id_before_submit()", LxERP.t8("Continue")) %]