X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=templates%2Fwebpages%2Fdo%2Fform_header.html;h=bee0ee6c4abd99bff565873abacaf261570978d2;hb=844a541e0d8f59644540413f675e8f07cd154cf6;hp=198a44ff33982884c901674a69d31bc2e9e3c2a0;hpb=5896615180704b3dddba46f4064a47ff1f094c3c;p=kivitendo-erp.git diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 198a44ff3..bee0ee6c4 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -1,27 +1,37 @@ [%- 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 %]

- - - - + + [%- 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 %] -
[% title %]
- [%- INCLUDE 'common/flash.html' %] +[%- INCLUDE 'generic/set_longdescription.html' %] [%- IF ERRORS && ERRORS.size %]

[% ERRORS.join('
') %]

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

@@ -105,21 +128,16 @@ @@ -266,7 +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 = 'safe_name') %] + [% L.select_tag('salesman_id', ALL_SALESMEN, default = (salesman_id ? salesman_id : employee_id), title_key = 'safe_name') %] [%- END %] @@ -274,17 +303,26 @@ - + - + - + @@ -294,6 +332,20 @@ + + + + + + [%- IF is_customer %] + + + + + [%- END %] +
- - [%- IF ALL_CONTACTS.size %] @@ -127,37 +145,38 @@ [%- END %] - [%- IF ALL_SHIPTO.size %] + + [%- IF (vc == 'customer') && VC_OBJ.additional_billing_addresses.as_list.size %] + + + + [%- END %] [%- IF business %] @@ -178,14 +197,24 @@ [%- END %] + [%- IF ALL_LANGUAGES.size %] + + + + + [%- END %] + [%- IF ALL_DEPARTMENTS.size %] [%- END %] @@ -202,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 = 'cp_id', title = 'full_name_dep', with_empty = 1, style='width: 250px') %] + [% 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.select_tag('shipto_id', ALL_SHIPTO, default = shipto_id, value = 'shipto_id', title = 'displayable_id', with_empty = 1, class = 'fixed_width') %] + [%- 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 = '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) %]
@@ -246,7 +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 = 'safe_name') %] + [% 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 %]
[% 'Reqdate' | $T8 %] + [% L.date_tag('reqdate', reqdate, readonly => delivered) %] +
[% 'Insert Date' | $T8 %][% insertdate %]
[% 'Project Number' | $T8 %]