From 1c181c11d5637d4388b138942f2edcd3c97e23c4 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Thu, 11 Feb 2016 23:02:25 +0100 Subject: [PATCH] =?utf8?q?GLN:=20Ber=C3=BCcksichtigung=20in=20Belegmasken?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DB/Helper/FlattenToForm.pm | 2 +- SL/DB/Manager/Customer.pm | 2 +- SL/DB/Manager/Vendor.pm | 2 +- SL/Form.pm | 8 +++++--- SL/IS.pm | 1 + bin/mozilla/io.pl | 5 ++--- bin/mozilla/ir.pl | 2 +- bin/mozilla/is.pl | 2 +- bin/mozilla/oe.pl | 2 +- templates/webpages/common/show_vc_details.html | 10 ++++++++++ templates/webpages/do/form_header.html | 1 + templates/webpages/io/ship_to.html | 7 +++++++ templates/webpages/oe/check_for_direct_delivery.html | 5 +++++ 13 files changed, 37 insertions(+), 12 deletions(-) diff --git a/SL/DB/Helper/FlattenToForm.pm b/SL/DB/Helper/FlattenToForm.pm index 09966e0ac..3cb7b5f49 100644 --- a/SL/DB/Helper/FlattenToForm.pm +++ b/SL/DB/Helper/FlattenToForm.pm @@ -28,7 +28,7 @@ sub flatten_to_form { $form->{vc} = $vc if ref($self) =~ m{^SL::DB::(?:.*Invoice|Order)}; my @vc_fields = (qw(account_number bank bank_code bic business city contact country creditlimit - department_1 department_2 discount email fax homepage iban language name + department_1 department_2 discount email fax gln homepage iban language name payment_terms phone street taxnumber ustid zipcode), "${vc}number", ($vc eq 'customer')? 'c_vendor_id': 'v_customer_id'); diff --git a/SL/DB/Manager/Customer.pm b/SL/DB/Manager/Customer.pm index 30c32a9d3..4a1d8b076 100644 --- a/SL/DB/Manager/Customer.pm +++ b/SL/DB/Manager/Customer.pm @@ -22,7 +22,7 @@ __PACKAGE__->add_filter_specs( sub _sort_spec { return ( default => [ 'name', 1 ], columns => { SIMPLE => 'ALL', - map { ( $_ => "lower(customer.$_)" ) } qw(customernumber vendornumber name contact phone fax email street taxnumber business invnumber ordnumber quonumber) + map { ( $_ => "lower(customer.$_)" ) } qw(customernumber vendornumber name contact phone fax email street gln taxnumber business invnumber ordnumber quonumber) }); } diff --git a/SL/DB/Manager/Vendor.pm b/SL/DB/Manager/Vendor.pm index af4b02993..443a41e1d 100644 --- a/SL/DB/Manager/Vendor.pm +++ b/SL/DB/Manager/Vendor.pm @@ -24,7 +24,7 @@ sub _sort_spec { default => [ 'name', 1 ], columns => { SIMPLE => 'ALL', - map { ( $_ => "lower(vendor.$_)" ) } qw(account_number bank bank_code bcc bic cc city contact country department_1 department_2 depositor email fax greeting homepage iban language + map { ( $_ => "lower(vendor.$_)" ) } qw(account_number bank bank_code bcc bic cc city contact country department_1 department_2 depositor email fax gln greeting homepage iban language name notes phone street taxnumber user_password username ustid v_customer_id vendornumber zipcode) }); } diff --git a/SL/Form.pm b/SL/Form.pm index a1b419821..610f545eb 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1858,7 +1858,7 @@ sub add_shipto { my $shipto; my @values; - foreach my $item (qw(name department_1 department_2 street zipcode city country + foreach my $item (qw(name department_1 department_2 street zipcode city country gln contact cp_gender phone fax email)) { if ($self->{"shipto$item"}) { $shipto = 1 if ($self->{$item} ne $self->{"shipto$item"}); @@ -1876,6 +1876,7 @@ sub add_shipto { shiptozipcode = ?, shiptocity = ?, shiptocountry = ?, + shiptogln = ?, shiptocontact = ?, shiptocp_gender = ?, shiptophone = ?, @@ -1892,6 +1893,7 @@ sub add_shipto { shiptozipcode = ? AND shiptocity = ? AND shiptocountry = ? AND + shiptogln = ? AND shiptocontact = ? AND shiptocp_gender = ? AND shiptophone = ? AND @@ -1903,9 +1905,9 @@ sub add_shipto { if(!$insert_check){ $query = qq|INSERT INTO shipto (trans_id, shiptoname, shiptodepartment_1, shiptodepartment_2, - shiptostreet, shiptozipcode, shiptocity, shiptocountry, + shiptostreet, shiptozipcode, shiptocity, shiptocountry, shiptogln, shiptocontact, shiptocp_gender, shiptophone, shiptofax, shiptoemail, module) - VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; + VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)|; do_query($self, $dbh, $query, $id, @values, $module); } } diff --git a/SL/IS.pm b/SL/IS.pm index 19c41886b..c82e731fa 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -591,6 +591,7 @@ sub customer_details { $ref->{street} = $customer->street; $ref->{zipcode} = $customer->zipcode; $ref->{country} = $customer->country; + $ref->{gln} = $customer->gln; } my $contact = SL::DB::Manager::Contact->find_by(cp_id => $::form->{cp_id}); if ($contact) { diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 26457a5e0..89eb6a2d4 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1643,11 +1643,10 @@ sub ship_to { map { $::form->{$_} = $::form->parse_amount(\%::myconfig, $::form->{$_}) } qw(exchangerate creditlimit creditremaining); # get details for customer/vendor - call_sub($::form->{vc} . "_details", qw(name department_1 department_2 street zipcode city country contact email phone fax), $::form->{vc} . "number"); - + call_sub($::form->{vc} . "_details", qw(name department_1 department_2 street zipcode city country gln contact email phone fax), $::form->{vc} . "number"); $::form->{rowcount}--; - my @shipto_vars = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry + my @shipto_vars = qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact shiptocp_gender shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2); my $previous_form = $::auth->save_form_in_session(skip_keys => [ @shipto_vars, qw(header shipto_id) ]); diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index d8de82099..259b9cb0e 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -335,7 +335,7 @@ sub form_header { id action type media format queued printed emailed title vc discount title creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id max_dunning_level dunning_amount - shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax + shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 message email subject cc bcc taxaccounts cursor_fokus convert_from_do_ids convert_from_oe_ids show_details gldate useasnew ), @custom_hiddens, diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 457ba3fe0..02cabba78 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -385,7 +385,7 @@ sub form_header { id action type media format queued printed emailed title vc discount title creditlimit creditremaining tradediscount business closedto locked shipped storno storno_id max_dunning_level dunning_amount dunning_description - shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax + shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptogln shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 shiptocp_gender message email subject cc bcc taxaccounts cursor_fokus convert_from_do_ids convert_from_oe_ids convert_from_ar_ids useasnew invoice_id diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index dc8f0c17c..f7cf9331f 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -477,7 +477,7 @@ sub form_header { qw(id action type vc formname media format proforma queued printed emailed title creditlimit creditremaining tradediscount business max_dunning_level dunning_amount shiptoname shiptostreet shiptozipcode - CFDD_shipto CFDD_shipto_id shiptocity shiptocountry shiptocontact shiptophone shiptofax + CFDD_shipto CFDD_shipto_id shiptocity shiptocountry shiptogln shiptocontact shiptophone shiptofax shiptodepartment_1 shiptodepartment_2 shiptoemail shiptocp_gender message email subject cc bcc taxpart taxservice taxaccounts cursor_fokus show_details useasnew), diff --git a/templates/webpages/common/show_vc_details.html b/templates/webpages/common/show_vc_details.html index b1f502f7f..f37498033 100644 --- a/templates/webpages/common/show_vc_details.html +++ b/templates/webpages/common/show_vc_details.html @@ -66,6 +66,11 @@ [% HTML.escape(country) %] + + [% 'GLN' | $T8 %] + [% HTML.escape(gln) %] + + [% 'Contact Person' | $T8 %] [% IF greeting %][% HTML.escape(greeting) %] [% END %][% HTML.escape(contact) %] @@ -213,6 +218,11 @@ [% HTML.escape(row.shiptocountry) %] + + [% 'GLN' | $T8 %] + [% HTML.escape(row.shiptogln) %] + + [% 'Contact Person' | $T8 %] [% HTML.escape(row.shiptocontact) %] diff --git a/templates/webpages/do/form_header.html b/templates/webpages/do/form_header.html index 52b0e7033..012c3d30c 100644 --- a/templates/webpages/do/form_header.html +++ b/templates/webpages/do/form_header.html @@ -92,6 +92,7 @@ + diff --git a/templates/webpages/io/ship_to.html b/templates/webpages/io/ship_to.html index ca5560c10..476aaebb0 100644 --- a/templates/webpages/io/ship_to.html +++ b/templates/webpages/io/ship_to.html @@ -9,6 +9,7 @@ shiptozipcode: "[% JavaScript.escape(vc_obj.zipcode) %]", shiptocity: "[% JavaScript.escape(vc_obj.city) %]", shiptocountry: "[% JavaScript.escape(vc_obj.country) %]", + shiptogln: "[% JavaScript.escape(vc_obj.gln) %]", shiptocontact: "[% JavaScript.escape(vc_obj.contact) %]", shiptocp_gender: "[% JavaScript.escape(vc_obj.cp_gender) %]", shiptophone: "[% JavaScript.escape(vc_obj.phone) %]", @@ -25,6 +26,7 @@ shiptozipcode: "[% JavaScript.escape(shipto.shiptozipcode) %]", shiptocity: "[% JavaScript.escape(shipto.shiptocity) %]", shiptocountry: "[% JavaScript.escape(shipto.shiptocountry) %]", + shiptogln: "[% JavaScript.escape(shipto.shiptogln) %]", shiptocontact: "[% JavaScript.escape(shipto.shiptocontact) %]", shiptocp_gender: "[% JavaScript.escape(shipto.shiptocp_gender) %]", shiptophone: "[% JavaScript.escape(shipto.shiptophone) %]", @@ -122,6 +124,11 @@ [% HTML.escape(country) %] [% L.input_tag("shiptocountry", shiptocountry, "size", "35") %] + + [% LxERP.t8('GLN') %] + [% HTML.escape(gln) %] + [% L.input_tag("shiptogln", shiptogln, "size", "35") %] + [% LxERP.t8('Contact') %] [% HTML.escape(contact) %] diff --git a/templates/webpages/oe/check_for_direct_delivery.html b/templates/webpages/oe/check_for_direct_delivery.html index b2a5b1685..9070cab42 100644 --- a/templates/webpages/oe/check_for_direct_delivery.html +++ b/templates/webpages/oe/check_for_direct_delivery.html @@ -41,6 +41,11 @@ [% HTML.escape(CFDD_shiptocountry) %] + + [% 'GLN' | $T8 %]: + [% HTML.escape(CFDD_shiptogln) %] + + [% 'Contact' | $T8 %]: [% HTML.escape(CFDD_shiptocontact) %] -- 2.20.1