From 25517b3d6cab7eb6c01a512979970ea4075e4a34 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bernd=20Ble=C3=9Fmann?= Date: Mon, 23 Sep 2019 14:05:44 +0200 Subject: [PATCH] =?utf8?q?Bericht=20EK-Rg/Kreditorenbuchungen:=20Abteilung?= =?utf8?q?en=20anzeigen=20k=C3=B6nnen?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- SL/AP.pm | 6 ++++-- bin/mozilla/ap.pl | 5 +++-- templates/webpages/ap/search.html | 2 ++ 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index b1608020b..96e0c70a4 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -454,6 +454,7 @@ sub ap_transactions { qq| v.vendornumber, v.country, v.ustid, | . qq| tz.description AS taxzone, | . qq| pt.description AS payment_terms, | . + qq| department.description AS department, | . qq{ ( SELECT ch.accno || ' -- ' || ch.description FROM acc_trans at LEFT JOIN chart ch ON ch.id = at.chart_id @@ -467,7 +468,8 @@ sub ap_transactions { qq|LEFT JOIN employee e ON (a.employee_id = e.id) | . qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id) | . qq|LEFT JOIN tax_zones tz ON (tz.id = a.taxzone_id)| . - qq|LEFT JOIN payment_terms pt ON (pt.id = a.payment_id)|; + qq|LEFT JOIN payment_terms pt ON (pt.id = a.payment_id)| . + qq|LEFT JOIN department ON (department.id = a.department_id)|; my $where = ''; @@ -590,7 +592,7 @@ SQL 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 direct_debit))) { + if (grep({ $_ eq $form->{sort} } qw(transdate id invnumber ordnumber name netamount tax amount paid datepaid due duedate notes employee transaction_description direct_debit department))) { $sortorder = $form->{sort} . " $sortdir"; } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 6b83d385e..a3869d13b 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1001,7 +1001,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 + due duedate transaction_description notes employee globalprojectnumber department vendornumber country ustid taxzone payment_terms charts direct_debit); my @hidden_variables = map { "l_${_}" } @columns; @@ -1028,6 +1028,7 @@ sub ap_transactions { 'notes' => { 'text' => $locale->text('Notes'), }, 'employee' => { 'text' => $locale->text('Employee'), }, 'globalprojectnumber' => { 'text' => $locale->text('Document Project Number'), }, + 'department' => { 'text' => $locale->text('Department'), }, 'vendornumber' => { 'text' => $locale->text('Vendor Number'), }, 'country' => { 'text' => $locale->text('Country'), }, 'ustid' => { 'text' => $locale->text('USt-IdNr.'), }, @@ -1037,7 +1038,7 @@ sub ap_transactions { 'direct_debit' => { 'text' => $locale->text('direct debit'), }, ); - foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description direct_debit)) { + foreach my $name (qw(id transdate duedate invnumber ordnumber name datepaid employee shippingpoint shipvia transaction_description direct_debit department)) { my $sortdir = $form->{sort} eq $name ? 1 - $form->{sortdir} : $form->{sortdir}; $column_defs{$name}->{link} = $href . "&sort=$name&sortdir=$sortdir"; } diff --git a/templates/webpages/ap/search.html b/templates/webpages/ap/search.html index 3ee796ff7..5b6eb3a6a 100644 --- a/templates/webpages/ap/search.html +++ b/templates/webpages/ap/search.html @@ -103,6 +103,8 @@ [% 'Notes' | $T8 %] [% 'Employee' | $T8 %] + + [% 'Department' | $T8 %] -- 2.20.1