From 8f1fb2d695599019da043422cc3314b2a3f4fede Mon Sep 17 00:00:00 2001 From: Roman Karushka Date: Fri, 6 Nov 2009 12:50:27 +0100 Subject: [PATCH] Neue Funktion: Checkbox fuer Verkaeuferanzeige in Mahnungsberichten. --- SL/DN.pm | 6 ++++-- bin/mozilla/dn.pl | 13 +++++++++---- locale/de/dn | 1 + locale/en/dn | 1 + templates/webpages/dunning/search_de.html | 2 ++ 5 files changed, 17 insertions(+), 6 deletions(-) diff --git a/SL/DN.pm b/SL/DN.pm index e1a634202..0ac071c6f 100644 --- a/SL/DN.pm +++ b/SL/DN.pm @@ -618,9 +618,11 @@ sub get_dunning { qq|SELECT a.id, a.ordnumber, a.invoice, a.transdate, a.invnumber, a.amount, ct.name AS customername, ct.id AS customer_id, a.duedate, da.fee, da.interest, dn.dunning_description, da.transdate AS dunning_date, - da.duedate AS dunning_duedate, da.dunning_id, da.dunning_config_id + da.duedate AS dunning_duedate, da.dunning_id, da.dunning_config_id, + e2.name AS salesman FROM ar a - JOIN customer ct ON (a.customer_id = ct.id), dunning da + JOIN customer ct ON (a.customer_id = ct.id) + LEFT JOIN employee e2 ON (a.salesman_id = e2.id), dunning da LEFT JOIN dunning_config dn ON (da.dunning_config_id = dn.id) $where ORDER BY $sortorder|; diff --git a/bin/mozilla/dn.pl b/bin/mozilla/dn.pl index 180765cba..872919cfc 100644 --- a/bin/mozilla/dn.pl +++ b/bin/mozilla/dn.pl @@ -319,7 +319,7 @@ sub show_dunning { $main::auth->assert('dunning_edit'); my @filter_field_list = qw(customer_id customer dunning_level department_id invnumber ordnumber - transdatefrom transdateto dunningfrom dunningto notes showold); + transdatefrom transdateto dunningfrom dunningto notes showold salesman); report_generator_set_default_sort('customername', 1); @@ -360,21 +360,26 @@ sub show_dunning { 'interest' => { 'text' => $locale->text('Interest') }, ); + if ($form->{l_salesman}) { + # Show salesman column + $column_defs{'salesman'} = ( { 'text' => $locale->text('Salesperson') } ); + } + $report->set_columns(%column_defs); $report->set_column_order(qw(checkbox dunning_description customername invnumber transdate - duedate amount dunning_date dunning_duedate fee interest)); + duedate amount dunning_date dunning_duedate fee interest salesman)); $report->set_sort_indicator($form->{sort}, $form->{sortdir}); my $edit_url = build_std_url('script=is.pl', 'action=edit', 'callback') . '&id='; my $print_url = build_std_url('action=print_dunning', 'format=pdf', 'media=screen') . '&dunning_id='; my $sort_url = build_std_url('action=show_dunning', grep { $form->{$_} } @filter_field_list); - foreach my $name (qw(dunning_description customername invnumber transdate duedate dunning_date dunning_duedate)) { + foreach my $name (qw(dunning_description customername invnumber transdate duedate dunning_date dunning_duedate salesman)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $sort_url . "&sort=$name&sortdir=$sortdir"; } - my %alignment = map { $_ => 'right' } qw(transdate duedate amount dunning_date dunning_duedate fee interest); + my %alignment = map { $_ => 'right' } qw(transdate duedate amount dunning_date dunning_duedate fee interest salesman); my ($current_dunning_rows, $previous_dunning_id, $first_row_for_dunning); diff --git a/locale/de/dn b/locale/de/dn index a4896c7c8..45e3c04be 100644 --- a/locale/de/dn +++ b/locale/de/dn @@ -218,6 +218,7 @@ $self->{texts} = { 'SAVED FOR DUNNING' => 'Gespeichert', 'SCREENED' => 'Angezeigt', 'Sales Invoice' => 'Rechnung', + 'Salesperson' => 'Verkäufer/in', 'Sales Order' => 'Kundenauftrag', 'Sales quotation' => 'Angebot', 'Screen' => 'Bildschirm', diff --git a/locale/en/dn b/locale/en/dn index 0689bbeda..d954e40c6 100644 --- a/locale/en/dn +++ b/locale/en/dn @@ -219,6 +219,7 @@ $self->{texts} = { 'SCREENED' => 'SCREENED', 'Sales Invoice' => 'Sales Invoice', 'Sales Order' => 'Sales Order', + 'Salesperson' => 'Salesperson', 'Sales quotation' => 'Sales quotation', 'Screen' => 'Screen', 'Select a Customer' => 'Select a Customer', diff --git a/templates/webpages/dunning/search_de.html b/templates/webpages/dunning/search_de.html index d9b10b0e4..5bd1b9d0d 100644 --- a/templates/webpages/dunning/search_de.html +++ b/templates/webpages/dunning/search_de.html @@ -105,6 +105,8 @@ Alte Mahnungen anzeigen + Verkäufer anzeigen + -- 2.20.1