From c98c318c449f157e7085301f564b03c4f8cb2d56 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 21 Sep 2015 16:51:51 +0200 Subject: [PATCH] Einkaufsrechnungssuche: Spalte Lastschrifteinzug optional anzeigen --- SL/AP.pm | 4 ++-- bin/mozilla/ap.pl | 7 +++++-- templates/webpages/ap/search.html | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index d8cd5d77b..f551b34ae 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -416,7 +416,7 @@ sub ap_transactions { my $query = qq|SELECT a.id, a.invnumber, a.transdate, a.duedate, a.amount, a.paid, | . qq| a.ordnumber, v.name, a.invoice, a.netamount, a.datepaid, a.notes, | . - qq| a.globalproject_id, a.storno, a.storno_id, | . + qq| a.globalproject_id, a.storno, a.storno_id, a.direct_debit, | . qq| pr.projectnumber AS globalprojectnumber, | . qq| e.name AS employee, | . qq| v.vendornumber, v.country, v.ustid, | . @@ -513,7 +513,7 @@ sub ap_transactions { my $sortdir = !defined $form->{sortdir} ? 'ASC' : $form->{sortdir} ? 'ASC' : 'DESC'; my $sortorder = join(', ', map { "$_ $sortdir" } @a); - if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description))) { + if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description direct_debit))) { $sortorder = $form->{sort} . " $sortdir"; } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 04604831e..7e7fbdebc 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -871,7 +871,7 @@ sub ap_transactions { my @columns = qw(transdate id type invnumber ordnumber name netamount tax amount paid datepaid due duedate transaction_description notes employee globalprojectnumber - vendornumber country ustid taxzone payment_terms charts); + vendornumber country ustid taxzone payment_terms charts direct_debit); my @hidden_variables = map { "l_${_}" } @columns; push @hidden_variables, "l_subtotal", qw(open closed vendor invnumber ordnumber transaction_description notes project_id transdatefrom transdateto department); @@ -902,9 +902,10 @@ sub ap_transactions { 'taxzone' => { 'text' => $locale->text('Steuersatz'), }, 'payment_terms' => { 'text' => $locale->text('Payment Terms'), }, 'charts' => { 'text' => $locale->text('Buchungskonto'), }, + 'direct_debit' => { 'text' => $locale->text('direct debit'), }, ); - 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 name datepaid employee shippingpoint shipvia transaction_description direct_debit)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } @@ -980,6 +981,8 @@ sub ap_transactions { : $locale->text("AP Transaction (abbreviation)"); } + $ap->{direct_debit} = $ap->{direct_debit} ? $::locale->text('yes') : $::locale->text('no'); + my $row = { }; foreach my $column (@columns) { diff --git a/templates/webpages/ap/search.html b/templates/webpages/ap/search.html index daee315cd..ba2c11869 100644 --- a/templates/webpages/ap/search.html +++ b/templates/webpages/ap/search.html @@ -150,6 +150,8 @@ [% 'Payment Terms' | $T8 %] [% 'Buchungskonto' | $T8 %] + + [% 'direct debit' | $T8 %] [% 'Vendor' | $T8 %] -- 2.20.1