X-Git-Url: http://wagnertech.de/git?p=kivitendo-erp.git;a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fform_header.html;fp=templates%2Fwebpages%2Fdo%2Fform_header.html;h=bee0ee6c4abd99bff565873abacaf261570978d2;hp=52b0e703307429c4745a1c97e00af465eb338409;hb=53593baa211863fbf66540cf1bcc36c8fb37257f;hpb=deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44 diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 52b0e7033..bee0ee6c4 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -1,15 +1,33 @@ [%- USE T8 %] [%- USE HTML %] [%- USE LxERP %] -[%- USE L %] +[%- 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 %]

- - @@ -22,18 +40,12 @@ [%- IF vc == 'customer' %] - [%- SET vc = 'customer' %] - [%- SET the_vc_id = customer_id %] - [%- SET the_vc = customer %] - [%- SET the_oldvc = oldcustomer %] [%- SET is_customer = '1' %] [%- ELSE %] [%- SET vc = 'vendor' %] - [%- SET the_vc_id = vendor_id %] - [%- SET the_vc = vendor %] - [%- SET the_oldvc = oldvendor %] [%- SET is_customer = '0' %] [%- END %] + [%- SET vc_id = vc _ "_id" %] [%- IF delivered %] [%- SET DISABLED = ' disabled' %] [%- END %] @@ -45,7 +57,7 @@

[% ERRORS.join('
') %]

[%- END %] -
+
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + [%- IF delivered %] + + + + + + + + + + + + + + + + [%- END %] + + + + + + + +

@@ -116,22 +128,16 @@ - + - + - +
- - - [%- IF ALL_CONTACTS.size %] @@ -139,10 +145,8 @@ [%- END %] - [%- IF ALL_SHIPTO.size %] + + [%- IF (vc == 'customer') && VC_OBJ.additional_billing_addresses.as_list.size %] + + + + [%- END %] [%- IF business %] @@ -191,14 +197,24 @@ [%- END %] + [%- IF ALL_LANGUAGES.size %] + + + + + [%- END %] + [%- IF ALL_DEPARTMENTS.size %] [%- END %] @@ -215,7 +231,7 @@ - +
[% IF is_customer %][% 'Customer' | $T8 %][% ELSE %][% 'Vendor' | $T8 %][% END %] - [%- UNLESS !delivered && SHOW_VC_DROP_DOWN %] - - [%- ELSE %] - - - [%- END %] - + [% IF RO %] + [% 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", 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)")) %] [% '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 %] @@ -150,27 +154,29 @@
[% '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') %] + [%- END %] + [% L.button_tag("kivi.SalesPurchase.edit_custom_shipto()", LxERP.t8("Custom shipto")) %] [%- END %]
[% 'Custom Billing Address' | $T8 %] + [% L.select_tag('billing_address_id', VC_OBJ.additional_billing_addresses, + with_empty=1, default=billing_address_id, value_key='id', title_key='displayable_id', style='width: 250px') %] +
[% 'Language' | $T8 %] + [% L.select_tag('language_id', ALL_LANGUAGES, default = language_id, title_key = 'description', with_empty = 1, style = 'width: 250px' )%] +
[% 'Department' | $T8 %] [% IF ( delivered ) %] [% L.hidden_tag('department_id', department_id) %] + [% ELSE %] + [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%] [% END %] - [% L.select_tag('department_id', ALL_DEPARTMENTS, default = department_id, title_key = 'description', with_empty = 1, style = 'width: 250px', disabled = delivered )%]
[% 'Transaction description' | $T8 %][% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=(INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : ''), readonly=delivered) %]
@@ -287,17 +303,26 @@
[% 'Delivery Order Number' | $T8 %] +[%- IF !is_customer || INSTANCE_CONF.get_sales_purchase_record_numbers_changeable %] + [% L.input_tag("donumber", donumber, size="11", readonly=delivered) %] +[%- ELSIF id %] + [% HTML.escape(donumber) %] + [% L.hidden_tag("donumber", donumber) %] +[%- ELSE %] + [% LxERP.t8("will be set upon saving") %] +[%- END %] +
[% 'Order Number' | $T8 %]
[% IF is_customer %][% 'Customer Order Number' | $T8 %][% ELSE %][% 'Vendor Order Number' | $T8 %][% END %]