From: Bernd Bleßmann Date: Fri, 12 Feb 2016 15:25:40 +0000 (+0100) Subject: GLN: In Bericht Kunden/Lieferanten anzeigen und danach suchen können. X-Git-Tag: release-3.4.1~421 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=030cf0d5a9b65ce85deb47fb37aa8334ce68cabd;p=kivitendo-erp.git GLN: In Bericht Kunden/Lieferanten anzeigen und danach suchen können. --- diff --git a/SL/CT.pm b/SL/CT.pm index cdf274b71..f21f73b82 100644 --- a/SL/CT.pm +++ b/SL/CT.pm @@ -75,6 +75,7 @@ sub search { "zipcode" => "ct.zipcode", "city" => "ct.city", "country" => "ct.country", + "gln" => "ct.gln", "discount" => "ct.discount", "insertdate" => "ct.itime", "salesman" => "e.name", @@ -143,6 +144,19 @@ sub search { push @values, ('%' . $form->{addr_country} . '%') x 2; } + if ($form->{addr_gln}) { + $where .= " AND ((lower(ct.gln) LIKE lower(?)) + OR + (ct.id IN ( + SELECT so.trans_id + FROM shipto so + WHERE (so.module = 'CT') + AND (lower(so.shiptogln) LIKE lower(?)) + )) + )"; + push @values, ('%' . $form->{addr_gln} . '%') x 2; + } + if ( $form->{status} eq 'orphaned' ) { $where .= qq| AND ct.id NOT IN | . diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index ec1ccbfba..e8b6854f9 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -145,6 +145,7 @@ sub list_names { push @options, $locale->text('Billing/shipping address (zipcode)') . " : $form->{zipcode}" if $form->{addr_zipcode}; push @options, $locale->text('Billing/shipping address (street)') . " : $form->{street}" if $form->{addr_street}; push @options, $locale->text('Billing/shipping address (country)') . " : $form->{country}" if $form->{addr_country}; + push @options, $locale->text('Billing/shipping address (GLN)') . " : $form->{addr_gln}" if $form->{addr_gln}; if ($form->{business_id}) { my $business = SL::DB::Manager::Business->find_by(id => $form->{business_id}); @@ -170,7 +171,7 @@ sub list_names { 'id', 'name', "$form->{db}number", 'contact', 'phone', 'discount', 'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', 'business', 'payment', 'invnumber', 'ordnumber', 'quonumber', 'salesman', - 'country', 'insertdate', 'pricegroup' + 'country', 'gln', 'insertdate', 'pricegroup' ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -197,6 +198,7 @@ sub list_names { 'zipcode' => { 'text' => $locale->text('Zipcode'), }, 'city' => { 'text' => $locale->text('City'), }, 'country' => { 'text' => $locale->text('Country'), }, + 'gln' => { 'text' => $locale->text('GLN'), }, 'salesman' => { 'text' => $locale->text('Salesman'), }, 'discount' => { 'text' => $locale->text('Discount'), }, 'payment' => { 'text' => $locale->text('Payment Terms'), }, @@ -209,7 +211,7 @@ sub list_names { my @hidden_variables = ( qw( db status obsolete name contact email cp_name addr_street addr_zipcode - addr_city addr_country business_id salesman_id insertdateto insertdatefrom + addr_city addr_country addr_gln business_id salesman_id insertdateto insertdatefrom ), "$form->{db}number", map({ "cvar_$_->{name}" } @searchable_custom_variables), map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables)), diff --git a/locale/de/all b/locale/de/all index 547fafdf0..6dd4877e6 100755 --- a/locale/de/all +++ b/locale/de/all @@ -389,6 +389,7 @@ $self->{texts} = { 'Billed extra expenses' => 'Abgerechnete Nebenkosten', 'Billing Address' => 'Rechnungsadresse', 'Billing Periodicity' => 'Abrechnungsperiodizität', + 'Billing/shipping address (GLN)' => 'Rechnungsadresse (GLN)', 'Billing/shipping address (city)' => 'Rechnungsadresse (Stadt)', 'Billing/shipping address (country)' => 'Rechnungsadresse (Land)', 'Billing/shipping address (street)' => 'Rechnungsadresse (Straße)', @@ -1284,6 +1285,7 @@ $self->{texts} = { 'GL Transaction (abbreviation)' => 'DB', 'GL search' => 'FiBu Suche', 'GL transactions changeable' => 'Änderbarkeit von Dialogbuchungen', + 'GLN' => 'GLN', 'Gegenkonto' => 'Gegenkonto', 'Gender' => 'Geschlecht', 'General Ledger' => 'Finanzbuchhaltung', diff --git a/locale/en/all b/locale/en/all index 124ac89c0..f1dfda725 100644 --- a/locale/en/all +++ b/locale/en/all @@ -306,6 +306,7 @@ $self->{texts} = { 'Bestandskonto' => '', 'Bilanz' => '', 'Billing Address' => '', + 'Billing/shipping address (GLN)' => '', 'Billing/shipping address (city)' => '', 'Billing/shipping address (country)' => '', 'Billing/shipping address (street)' => '', @@ -1035,6 +1036,7 @@ $self->{texts} = { 'Fwd' => 'Forward', 'GL Transaction' => '', 'GL transactions changeable' => '', + 'GLN' => '', 'Gegenkonto' => '', 'Gender' => '', 'General Ledger' => '', diff --git a/templates/webpages/ct/search.html b/templates/webpages/ct/search.html index aa517079f..d98b324ce 100644 --- a/templates/webpages/ct/search.html +++ b/templates/webpages/ct/search.html @@ -47,6 +47,10 @@ [% 'Billing/shipping address (country)' | $T8 %] + + [% 'Billing/shipping address (GLN)' | $T8 %] + + [% IF SHOW_BUSINESS_TYPES %] @@ -187,19 +191,23 @@ + + + + + [% IF IS_CUSTOMER %] + - - - [% END %] + [% END %] [% CUSTOM_VARIABLES_INCLUSION_CODE %]