X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fform_header.html;h=9ff8e98a153575707cdf5749fd3aa239aef605c5;hb=f70c8fa479417e7c20108a23c18c0c6e5e683c6a;hp=326db490a8ca1122bf35bd2a2335c0b909b39faf;hpb=fdbb6888ea00ca5f6450015ea70bb3d5f89edfc9;p=kivitendo-erp.git
diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html
index 326db490a..9ff8e98a1 100644
--- a/templates/webpages/do/form_header.html
+++ b/templates/webpages/do/form_header.html
@@ -2,6 +2,26 @@
[%- USE HTML %]
[%- USE LxERP %]
[%- USE L %][%- USE P -%]
+
+[%# Determine which shipping address to show if the delivery order has been shipped already. %]
+[%- IF delivered;
+ SET shipto_label = [];
+ IF shipto_id;
+ FOREACH row = ALL_SHIPTO ;
+ IF row.shipto_id == shipto_id ;
+ SET shipto_label = [ row.shiptoname, row.shiptodepartment_1, row.shiptostreet, row.shiptocity ] ;
+ END ;
+ END ;
+ ELSE ;
+ SET shipto_label = [ shiptoname, shiptodepartment_1, shiptostreet, shiptocity ] ;
+ END ;
+
+ SET shipto_label = shipto_label.grep('.') ;
+ IF !shipto_label.size ;
+ shipto_label = [ LxERP.t8('no shipping address') ] ;
+ END ;
+ END ; %]
+