X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fform_header.html;h=6e7c49984530252b442bd95158d470034189b7b7;hb=bec23a700e524b09e80fde2ec8178367aa3a16e2;hp=19d8f50c078bdb0462ce37df3bb683b983ef5344;hpb=89ac3ab19c933e449f5b4f7b02f3511cc0e9de16;p=kivitendo-erp.git diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 19d8f50c0..6e7c49984 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 %]

@@ -56,56 +76,50 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + [%- IF delivered %] + + + + + + + + + + + + + + + + [%- END %] + + + + + + + [%- FOREACH row = HIDDENS %] [% L.hidden_tag(row.name, row.value) %] [%- END %] @@ -122,7 +136,7 @@ [% P.hidden_tag(vc_id, $vc_id) %] [% HTML.escape(VC_OBJ.name) %] [% ELSE %] - [% P.customer_vendor_picker(vc_id, $vc_id, type=vc, class="fixed_width") %] + [% P.customer_vendor.picker(vc_id, $vc_id, type=vc, class="fixed_width", onchange="\$('#update_button').click()") %] [% END %] [% P.hidden_tag("previous_" _ vc_id, $vc_id) %] [% P.button_tag("show_vc_details('" _ HTML.escape(vc) _ "')", LxERP.t8("Details (one letter abbreviation)")) %] @@ -133,10 +147,8 @@ [% 'Contact Person' | $T8 %] [%- IF delivered %] - - [%- IF cp_id == row.cp_id %] - [%- HTML.escape(row.cp_name) %][%- IF row.cp_abteilung %] ([% HTML.escape(row.cp_abteilung) %])[% END -%] - [%- END %] + [% L.hidden_tag("cp_id", cp_id) %] + [% HTML.escape(CONTACT_OBJ.full_name) %][% IF CONTACT_OBJ.cp_abteilung %] ([% HTML.escape(CONTACT_OBJ.cp_abteilung) %])[% END %] [%- ELSE %] [% L.select_tag('cp_id', ALL_CONTACTS, default = cp_id, value_key = 'cp_id', title_key = 'full_name_dep', with_empty = 1, style='width: 250px') %] [%- END %] @@ -144,29 +156,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 %] @@ -211,7 +214,7 @@ [% 'Transaction description' | $T8 %] - + [% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=(INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : ''), readonly=delivered) %] @@ -283,17 +286,17 @@ [% 'Delivery Order Number' | $T8 %] - + [% 'Order Number' | $T8 %] - + [% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %] - +