From: Moritz Bunkus Date: Tue, 18 Feb 2014 14:32:49 +0000 (+0100) Subject: Berichte Verkaufsrechnungen: Bestellnummer des Kunden anzeigen/danach filtern X-Git-Tag: release-3.2.0beta~490^2 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=85b0c4abbd467480f39106241e9cbe037710a157;p=kivitendo-erp.git Berichte Verkaufsrechnungen: Bestellnummer des Kunden anzeigen/danach filtern --- diff --git a/SL/AR.pm b/SL/AR.pm index 3da550d68..a842b9da5 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -488,7 +488,7 @@ sub ar_transactions { my @values; my $query = - qq|SELECT DISTINCT a.id, a.invnumber, a.ordnumber, a.transdate, | . + qq|SELECT DISTINCT a.id, a.invnumber, a.ordnumber, a.cusordnumber, a.transdate, | . qq| a.duedate, a.netamount, a.amount, a.paid, | . qq| a.invoice, a.datepaid, a.terms, a.notes, a.shipvia, | . qq| a.shippingpoint, a.storno, a.storno_id, a.globalproject_id, | . @@ -550,7 +550,7 @@ sub ar_transactions { $where .= " AND d.description ILIKE ?"; push(@values, $department); } - foreach my $column (qw(invnumber ordnumber notes transaction_description)) { + foreach my $column (qw(invnumber ordnumber cusordnumber notes transaction_description)) { if ($form->{$column}) { $where .= " AND a.$column ILIKE ?"; push(@values, $form->like($form->{$column})); @@ -603,7 +603,7 @@ sub ar_transactions { my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; my $sortorder = join(', ', map { "$_ $sortdir" } @a); - if (grep({ $_ eq $form->{sort} } qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description))) { + if (grep({ $_ eq $form->{sort} } qw(id transdate duedate invnumber ordnumber cusordnumber name datepaid employee shippingpoint shipvia transaction_description))) { $sortorder = $form->{sort} . " $sortdir"; } diff --git a/bin/mozilla/ar.pl b/bin/mozilla/ar.pl index e0ed1e793..fcd9e83c6 100644 --- a/bin/mozilla/ar.pl +++ b/bin/mozilla/ar.pl @@ -902,12 +902,12 @@ sub ar_transactions { my $report = SL::ReportGenerator->new(\%myconfig, $form); @columns = - qw(transdate id type invnumber ordnumber name netamount tax amount paid + qw(transdate id type invnumber ordnumber cusordnumber name netamount tax amount paid datepaid due duedate transaction_description notes salesman employee shippingpoint shipvia marge_total marge_percent globalprojectnumber customernumber country ustid taxzone payment_terms charts customertype); my @hidden_variables = map { "l_${_}" } @columns; - push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber transaction_description notes project_id transdatefrom transdateto employee_id salesman_id business_id); + push @hidden_variables, "l_subtotal", qw(open closed customer invnumber ordnumber cusordnumber transaction_description notes project_id transdatefrom transdateto employee_id salesman_id business_id); $href = build_std_url('action=ar_transactions', grep { $form->{$_} } @hidden_variables); @@ -917,6 +917,7 @@ sub ar_transactions { 'type' => { 'text' => $locale->text('Type'), }, 'invnumber' => { 'text' => $locale->text('Invoice'), }, 'ordnumber' => { 'text' => $locale->text('Order'), }, + 'cusordnumber' => { 'text' => $locale->text('Customer Order Number'), }, 'name' => { 'text' => $locale->text('Customer'), }, 'netamount' => { 'text' => $locale->text('Amount'), }, 'tax' => { 'text' => $locale->text('Tax'), }, @@ -943,7 +944,7 @@ sub ar_transactions { 'customertype' => { 'text' => $locale->text('Customer type'), }, ); - foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description)) { + foreach my $name (qw(id transdate duedate invnumber ordnumber cusordnumber name datepaid employee shippingpoint shipvia transaction_description)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } @@ -977,6 +978,9 @@ sub ar_transactions { if ($form->{ordnumber}) { push @options, $locale->text('Order Number') . " : $form->{ordnumber}"; } + if ($form->{cusordnumber}) { + push @options, $locale->text('Customer Order Number') . " : $form->{cusordnumber}"; + } if ($form->{notes}) { push @options, $locale->text('Notes') . " : $form->{notes}"; } diff --git a/templates/webpages/ar/search.html b/templates/webpages/ar/search.html index a1f90343c..467d4b290 100644 --- a/templates/webpages/ar/search.html +++ b/templates/webpages/ar/search.html @@ -50,6 +50,10 @@ [% 'Order Number' | $T8 %] + + [% 'Customer Order Number' | $T8 %] + + [% 'Employee' | $T8 %] [% L.select_tag('employee_id', ALL_EMPLOYEES, title_key = 'safe_name', with_empty = 1, style = 'width:250px') %] @@ -132,10 +136,12 @@ [% 'Invoice Number' | $T8 %] [% 'Order Number' | $T8 %] - - [% 'Invoice Date' | $T8 %] + + [% 'Customer Order Number' | $T8 %] + + [% 'Invoice Date' | $T8 %] [% 'Customer' | $T8 %]