From: Moritz Bunkus Date: Thu, 5 Jan 2017 12:40:07 +0000 (+0100) Subject: ActionBar: Lieferscheine: Lieferadresse via Popup bearbeiten X-Git-Tag: release-3.5.4~1346 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=ac4348955083894282314d882001f0e176ff8d38;p=kivitendo-erp.git ActionBar: Lieferscheine: Lieferadresse via Popup bearbeiten --- diff --git a/locale/de/all b/locale/de/all index 0c4409f2b..9c9041829 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3741,6 +3741,7 @@ $self->{texts} = { 'no bestbefore' => 'keine Mindesthaltbarkeit', 'no chargenumber' => 'keine Chargennummer', 'no execution for this client' => 'keine Ausführung für diesen Mandanten', + 'no shipping address' => 'keine Lieferadresse', 'no skonto_chart configured for taxkey #1 : #2 : #3' => 'Kein Skontokonto für Steuerschlüssel #1 : #2 : #3', 'no tax_id in acc_trans' => 'Keine tax_id in acc_trans', 'not configured' => 'nicht konfiguriert', diff --git a/templates/webpages/do/form_footer.html b/templates/webpages/do/form_footer.html index a1920c81c..4848b178c 100644 --- a/templates/webpages/do/form_footer.html +++ b/templates/webpages/do/form_footer.html @@ -71,7 +71,16 @@ + [%- IF !delivered %] + + [%- END %] + +[%- IF !delivered %] + +[%- END %] diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 19d8f50c0..18ba23861 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 ; %] +

[% title %]

@@ -84,6 +104,8 @@ + [%- IF delivered %] + @@ -98,6 +120,7 @@ + [%- END %] @@ -144,29 +167,20 @@ [%- END %] - [%- IF ALL_SHIPTO.size %] [% 'Shipping Address' | $T8 %] [%- IF delivered %] - - [%- FOREACH row = ALL_SHIPTO %] - [%- IF shipto_id == row.shipto_id %] - [%- HTML.escape(row.shiptoname) -%] - [%- IF row.shiptodepartment_1 %]; [% HTML.escape(row.shiptodepartment_1) -%][% END -%] - [%- IF row.shiptostreet %]; [% HTML.escape(row.shiptostreet) -%][% END -%] - [%- IF row.shiptocity %]; [% HTML.escape(row.shiptocity) -%][% END -%] - [%- END %] - [%- END %] - + [% HTML.escape(shipto_label.join('; ')) %] [%- ELSE %] + [%- IF ALL_SHIPTO.size %] [% shiptos = [ [ "", LxERP.t8("No/individual shipping address") ] ] ; L.select_tag('shipto_id', shiptos.import(ALL_SHIPTO), default=shipto_id, value_key='shipto_id', title_key='displayable_id', style='width: 250px') %] - [% L.submit_tag('action_ship_to', LxERP.t8('Ship to')) %] + [%- END %] + [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %] [%- END %] - [%- END %] [%- IF business %]