From 8145351db7044546499d15e3147a3f59f988310d Mon Sep 17 00:00:00 2001 From: David Ohlbrecht Date: Tue, 17 Nov 2009 10:49:51 +0100 Subject: [PATCH] =?utf8?q?Suche=20nach=20Verk=C3=A4ufer=20in=20Mahnungen?= =?utf8?q?=20und=20Anzeige=20von=20Kundennummer=20in=20der=20Auftragssuche?= =?utf8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/DN.pm | 5 +++++ SL/OE.pm | 2 +- bin/mozilla/dn.pl | 4 +++- bin/mozilla/oe.pl | 4 +++- templates/webpages/dunning/search_de.html | 18 ++++++++++++++++-- templates/webpages/dunning/search_master.html | 16 +++++++++++++++- templates/webpages/oe/search_de.html | 4 ++++ templates/webpages/oe/search_master.html | 4 ++++ 8 files changed, 51 insertions(+), 6 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index 0ac071c6f..45248a55a 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -600,6 +600,11 @@ sub get_dunning { push(@values, $form->{dunningto}); } + if ($form->{salesman_id}) { + $where .= qq| AND a.salesman_id = ?|; + push(@values, conv_i($form->{salesman_id})); + } + my %sort_columns = ( 'dunning_description' => [ qw(dn.dunning_description customername invnumber) ], 'customername' => [ qw(customername invnumber) ], diff --git a/SL/OE.pm b/SL/OE.pm index b40c06a74..dcfca7a05 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -90,7 +90,7 @@ sub transactions { qq| ex.$rate AS exchangerate, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee, s.name AS salesman, | . - qq| ct.country, ct.ustid | . + qq| ct.customernumber, ct.country, ct.ustid | . qq|FROM oe o | . qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | . qq|LEFT JOIN employee e ON (o.employee_id = e.id) | . diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 651698c3e..d6684dd96 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -284,7 +284,8 @@ sub search { $main::auth->assert('dunning_edit'); $form->get_lists("customers" => "ALL_CUSTOMERS", - "departments" => "ALL_DEPARTMENTS"); + "departments" => "ALL_DEPARTMENTS", + "salesmen" => "ALL_SALESMEN"); DN->get_config(\%myconfig, \%$form); @@ -295,6 +296,7 @@ sub search { $form->{jsscript} = 1; $form->{title} = $locale->text('Dunnings'); $form->{fokus} = "search.customer"; + $form->{salesman_labels} = sub { $_[0]->{"name"} || $_[0]->{"login"} }; $form->header(); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index d68c04fd5..d33db6264 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -745,7 +745,8 @@ sub orders { "shipvia", "globalprojectnumber", "transaction_description", "open", "delivered", "marge_total", "marge_percent", - "country", "ustid", + "customernumber", "ustid", + "country", ); # only show checkboxes if gotten here via sales_order form. @@ -807,6 +808,7 @@ sub orders { 'delivered' => { 'text' => $locale->text('Delivered'), }, 'marge_total' => { 'text' => $locale->text('Ertrag'), }, 'marge_percent' => { 'text' => $locale->text('Ertrag prozentual'), }, + 'customernumber' => { 'text' => $locale->text('Customer Number'), }, 'country' => { 'text' => $locale->text('Country'), }, 'ustid' => { 'text' => $locale->text('USt-IdNr.'), }, ); diff --git a/templates/webpages/dunning/search_de.html b/templates/webpages/dunning/search_de.html index c43b85d75..9ad0dd835 100644 --- a/templates/webpages/dunning/search_de.html +++ b/templates/webpages/dunning/search_de.html @@ -92,7 +92,21 @@ - + + Verkäufer/in + + [%- INCLUDE 'generic/multibox.html' + name = 'salesman_id', + style = 'width: 250px', + DATA = ALL_SALESMEN, + id_key = 'id', + label_sub = 'salesman_labels', + limit = vclimit, + show_empty = 1, + allow_textbox = 0, + -%] + + @@ -105,7 +119,7 @@ Alte Mahnungen anzeigen - Show Salesman + Verkäufer anzeigen diff --git a/templates/webpages/dunning/search_master.html b/templates/webpages/dunning/search_master.html index f2f7c91a0..20ebb91e4 100644 --- a/templates/webpages/dunning/search_master.html +++ b/templates/webpages/dunning/search_master.html @@ -92,7 +92,21 @@ - + + Salesman + + [%- INCLUDE 'generic/multibox.html' + name = 'salesman_id', + style = 'width: 250px', + DATA = ALL_SALESMEN, + id_key = 'id', + label_sub = 'salesman_labels', + limit = vclimit, + show_empty = 1, + allow_textbox = 0, + -%] + + diff --git a/templates/webpages/oe/search_de.html b/templates/webpages/oe/search_de.html index 0358b0b01..d2cca794b 100644 --- a/templates/webpages/oe/search_de.html +++ b/templates/webpages/oe/search_de.html @@ -230,6 +230,10 @@ Kunde + + + + diff --git a/templates/webpages/oe/search_master.html b/templates/webpages/oe/search_master.html index 32d766f74..9a3df3978 100644 --- a/templates/webpages/oe/search_master.html +++ b/templates/webpages/oe/search_master.html @@ -230,6 +230,10 @@ Customer + + + + -- 2.20.1