X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fform_header.html;h=bee0ee6c4abd99bff565873abacaf261570978d2;hb=51aa7d3ccc53449c3582bae461d567ff2203e964;hp=a83a2b91e38b5313268086cf1febfe6cc057e929;hpb=2879330bd173831981bdd8b25fc1900292efaeac;p=kivitendo-erp.git diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index a83a2b91e..bee0ee6c4 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -1,28 +1,37 @@ [%- USE T8 %] -[% USE HTML %][% USE LxERP %] +[%- 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 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 RO = ' readonly' %] [%- SET DISABLED = ' disabled' %] [%- END %] -
[% title %]
- [%- INCLUDE 'common/flash.html' %] +[%- INCLUDE 'generic/set_longdescription.html' %] [%- IF ERRORS && ERRORS.size %]

[% ERRORS.join('
') %]

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

@@ -107,21 +128,16 @@ @@ -300,13 +295,7 @@ [% IF row.id == the_salesman_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] [%- END %] [%- ELSE %] - + [% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %] [%- END %] @@ -314,28 +303,49 @@ - + - + - + + + + + + + [%- IF is_customer %] + + + + + [%- END %] +
- - [%- IF ALL_CONTACTS.size %] @@ -129,54 +145,38 @@ [%- END %] - [%- IF ALL_SHIPTO.size %] + + [%- IF (vc == 'customer') && VC_OBJ.additional_billing_addresses.as_list.size %] + + + + [%- END %] [%- IF business %] @@ -197,24 +197,25 @@ [%- END %] + [%- IF ALL_LANGUAGES.size %] + + + + + [%- END %] + [%- IF ALL_DEPARTMENTS.size %] + [% 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 %] + [%- END %] @@ -230,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 %]
[% '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 %] - + [% 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 %] - - [%- FOREACH row = ALL_DEPARTMENTS %] - [% IF department == row.value %][% HTML.escape(row.description) %]--[% HTML.escape(row.id) %][% END %] - [%- END %] - [%- ELSE %] - - [%- END %] -
[% 'Transaction description' | $T8 %][% L.input_tag("transaction_description", transaction_description, size=35, "data-validate"=(INSTANCE_CONF.get_require_transaction_description_ps ? 'required' : ''), readonly=delivered) %]
@@ -274,13 +275,7 @@ [% IF row.id == employee_id %][%- IF row.name %][%- HTML.escape(row.name) %][%- ELSE %][% HTML.escape(row.login) %][%- END %][% END %] [%- END %] [%- ELSE %] - + [% L.select_tag('employee_id', ALL_EMPLOYEES, default = employee_id, title_key = 'safe_name') %] [%- END %]
[% '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 %]
[% 'Delivery Order Date' | $T8 %] - - [% UNLESS delivered %][% END %] + [% L.date_tag('transdate', transdate, readonly => delivered) %] +
[% 'Reqdate' | $T8 %] + [% L.date_tag('reqdate', reqdate, readonly => delivered) %]
[% 'Insert Date' | $T8 %][% insertdate %]
[% 'Project Number' | $T8 %]