X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fform_header.html;h=6e7c49984530252b442bd95158d470034189b7b7;hb=bec23a700e524b09e80fde2ec8178367aa3a16e2;hp=2410439c3afed9210dccbfe32a5413ee696b61ce;hpb=7f683e50d6d550b307a1c97d071e894889039ff0;p=kivitendo-erp.git diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 2410439c3..6e7c49984 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 %] + + + + + + + +[%- FOREACH row = HIDDENS %] + [% L.hidden_tag(row.name, row.value) %] +[%- END %]

@@ -104,21 +130,16 @@ @@ -297,13 +278,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 %] @@ -311,28 +286,40 @@ - + - + - + + + + + + + [%- IF is_customer %] + + + + + [%- END %] +
- - [%- IF ALL_CONTACTS.size %] @@ -126,55 +147,29 @@ [%- END %] - [%- IF ALL_SHIPTO.size %] - [%- END %] [%- IF business %] @@ -198,20 +193,12 @@ + [% 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 %] @@ -227,7 +214,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 %]
[% '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) %]
@@ -271,13 +258,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 %]
[% '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 %]