From: David Ohlbrecht Date: Tue, 17 Nov 2009 09:49:51 +0000 (+0100) Subject: Suche nach Verkäufer in Mahnungen und Anzeige von Kundennummer in der Auftragssuche. X-Git-Tag: release-2.6.1beta1~90 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=8145351db7044546499d15e3147a3f59f988310d;p=kivitendo-erp.git Suche nach Verkäufer in Mahnungen und Anzeige von Kundennummer in der Auftragssuche. --- 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 + + + +