Lieferschein: Kunden-/Lieferantenpicker nutzen
[kivitendo-erp.git] / templates / webpages / io / ship_to.html
index ca5560c..e3e6500 100644 (file)
@@ -9,11 +9,15 @@
       shiptozipcode:      "[% JavaScript.escape(vc_obj.zipcode) %]",
       shiptocity:         "[% JavaScript.escape(vc_obj.city) %]",
       shiptocountry:      "[% JavaScript.escape(vc_obj.country) %]",
+      shiptogln:          "[% JavaScript.escape(vc_obj.gln) %]",
       shiptocontact:      "[% JavaScript.escape(vc_obj.contact) %]",
       shiptocp_gender:    "[% JavaScript.escape(vc_obj.cp_gender) %]",
       shiptophone:        "[% JavaScript.escape(vc_obj.phone) %]",
       shiptofax:          "[% JavaScript.escape(vc_obj.fax) %]",
       shiptoemail:        "[% JavaScript.escape(vc_obj.email) %]"
+[% FOREACH var = cvars %]
+      , "shiptocvar_[% JavaScript.escape(var.config.name) %]": ""
+[% END %]
     }
 
   [% FOREACH shipto = vc_obj.shipto %]
       shiptozipcode:      "[% JavaScript.escape(shipto.shiptozipcode) %]",
       shiptocity:         "[% JavaScript.escape(shipto.shiptocity) %]",
       shiptocountry:      "[% JavaScript.escape(shipto.shiptocountry) %]",
+      shiptogln:          "[% JavaScript.escape(shipto.shiptogln) %]",
       shiptocontact:      "[% JavaScript.escape(shipto.shiptocontact) %]",
       shiptocp_gender:    "[% JavaScript.escape(shipto.shiptocp_gender) %]",
       shiptophone:        "[% JavaScript.escape(shipto.shiptophone) %]",
       shiptofax:          "[% JavaScript.escape(shipto.shiptofax) %]",
       shiptoemail:        "[% JavaScript.escape(shipto.shiptoemail) %]"
+    [% FOREACH var = shipto.cvars_by_config %]
+      , "shiptocvar_[% JavaScript.escape(var.config.name) %]": "[% JavaScript.escape(var.value_as_text) %]"
+    [% END %]
     }
   [% END %]
   ];
@@ -61,9 +69,9 @@
 
 [% 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("; ") ] ]) ;
+     tmpcity  = shipto.shiptozipcode _ ' ' _ shipto.shiptocity ;
+     tmptitle = [ shipto.shiptoname, shipto.shiptostreet, tmpcity ] ;
+     CALL select_options.import([ [ loop.count, tmptitle.grep('\S').join("; ") ] ]) ;
    END ;
    '' %]
 
     <td>[% HTML.escape(country) %]</td>
     <td>[% L.input_tag("shiptocountry", shiptocountry, "size", "35") %]</td>
    </tr>
+   <tr>
+    <th align="right" nowrap>[% LxERP.t8('GLN') %]</th>
+    <td>[% HTML.escape(gln) %]</td>
+    <td>[% L.input_tag("shiptogln", shiptogln, "size", "35") %]</td>
+   </tr>
    <tr>
     <th align="right" nowrap>[% LxERP.t8('Contact') %]</th>
     <td>[% HTML.escape(contact) %]</td>
     <td>[% HTML.escape(email) %]</td>
     <td>[% L.input_tag("shiptoemail", shiptoemail, "size", "35") %]</td>
    </tr>
+[% FOREACH var = cvars %]
+   <tr valign="top">
+    <th align="right" nowrap>[% HTML.escape(var.config.description) %]</th>
+    <td></td>
+    <td>[% INCLUDE 'common/render_cvar_input.html' cvar_name_prefix='shiptocvar_' %]</td>
+   </tr>
+[% END %]
   </table>
 
   <hr size="3" noshade>