[% USE T8 %]
[% 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 ; %]
[% title %]
[% IF vc == 'customer' %]
[% SET is_customer = '1' %]
[% ELSE %]
[% SET vc = 'vendor' %]
[% SET is_customer = '0' %]
[% END %]
[% SET vc_id = vc _ "_id" %]
[% IF delivered %]
[% SET DISABLED = ' disabled' %]
[% END %]
[% INCLUDE 'common/flash.html' %]
[% INCLUDE 'generic/set_longdescription.html' %]
[% IF ERRORS && ERRORS.size %]