From d333cdb7d855b572e138acfecfad31bcdb2e8440 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Tue, 27 Jul 2021 10:59:00 +0200 Subject: [PATCH] Einkaufsbericht um Anzeige erstes Sollkonto erweitert --- SL/AP.pm | 9 ++++++++- bin/mozilla/ap.pl | 3 ++- doc/changelog | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/SL/AP.pm b/SL/AP.pm index e21eb13ea..01f7e9b4c 100644 --- a/SL/AP.pm +++ b/SL/AP.pm @@ -463,7 +463,14 @@ sub ap_transactions { WHERE ch.link ~ 'AP[[:>:]]' AND at.trans_id = a.id LIMIT 1 - ) AS charts } . + ) AS charts, } . + qq{ ( SELECT ch.accno || ' -- ' || ch.description + FROM acc_trans at + LEFT JOIN chart ch ON ch.id = at.chart_id + WHERE ch.link ~ 'AP_amount' + AND at.trans_id = a.id + LIMIT 1 + ) AS debit_chart } . qq|FROM ap a | . qq|JOIN vendor v ON (a.vendor_id = v.id) | . qq|LEFT JOIN contacts cp ON (a.cp_id = cp.cp_id) | . diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index 2c886322f..8e507cede 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -1023,7 +1023,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 department - vendornumber country ustid taxzone payment_terms charts direct_debit); + vendornumber country ustid taxzone payment_terms charts debit_chart 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 @@ -1056,6 +1056,7 @@ sub ap_transactions { 'taxzone' => { 'text' => $locale->text('Tax rate'), }, 'payment_terms' => { 'text' => $locale->text('Payment Terms'), }, 'charts' => { 'text' => $locale->text('Chart'), }, + 'debit_chart' => { 'text' => $locale->text('Debit Account'), }, 'direct_debit' => { 'text' => $locale->text('direct debit'), }, ); diff --git a/doc/changelog b/doc/changelog index 8165151d5..b1381b440 100644 --- a/doc/changelog +++ b/doc/changelog @@ -28,6 +28,7 @@ Kleinere neue Features und Detailverbesserungen: in den Dokumenten-Tab gesprungen werden kann. - Seriennummer ist jetzt ein Pflichtfeld für Lieferscheine (Einkauf und Verkauf), falls die Ware im Beleg in den Stammdaten mit "Hat eine Serienummer" markiert ist. +- Einkaufsbericht um Anzeige erstes Sollkonto erweitert Bugfixes (Tracker: https://www.kivitendo.de/redmine): -- 2.20.1