From 6c9c012e74984b7992fc4bad93c58960744f16d2 Mon Sep 17 00:00:00 2001 From: "G. Richardson" Date: Wed, 24 Apr 2013 11:59:24 +0200 Subject: [PATCH] =?utf8?q?Bilanz-Bericht:=20eigene=20EB/SB-Filter=20f?= =?utf8?q?=C3=BCr=20Gegen=C3=BCberstellung?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Jetzt kann man sowohl die Bilanz zum Stichtag, als auch zum Gegenüberstellungstag, mit Filtern für EB- und SB-Buchungen ziehen. Ein nützlicher Vergleich ist z.B.: Zum Stand: 31.12.2012 (keine Haken gesetzt) Gegenüberstellen zu: 01.01.2013 Haken bei: "nur EB-Buchungen" um zu sehen ob alle Salden korrekt übertragen worden sind. --- SL/RP.pm | 20 ++++++++++++++++---- templates/webpages/rp/report.html | 11 ++++++----- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/SL/RP.pm b/SL/RP.pm index 1afd180e3..7890ecd89 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -211,13 +211,25 @@ sub get_accounts { $sth->finish; + # filter for opening and closing bookings # if l_ob is selected l_cb is always ignored - if ( $form->{l_ob} ) { - $where .= ' AND ac.ob_transaction is true ' - } elsif ( not $form->{l_cb} ) { - $where .= ' AND ac.cb_transaction is false '; + if ( $last_period ) { + # ob/cb-settings for "as of" balance + if ( $form->{l_ob_compared} ) { + $where .= ' AND ac.ob_transaction is true ' + } elsif ( not $form->{l_cb_compared} ) { + $where .= ' AND ac.cb_transaction is false '; + }; + } else { + # ob/cb-settings for "compared to" balance + if ( $form->{l_ob} ) { + $where .= ' AND ac.ob_transaction is true ' + } elsif ( not $form->{l_cb} ) { + $where .= ' AND ac.cb_transaction is false '; + }; }; + if ($fromdate) { $fromdate = conv_dateq($fromdate); if ($form->{method} eq 'cash') { diff --git a/templates/webpages/rp/report.html b/templates/webpages/rp/report.html index 753bc80b5..daeaf46c9 100644 --- a/templates/webpages/rp/report.html +++ b/templates/webpages/rp/report.html @@ -137,8 +137,14 @@ [% 'as at' | $T8 %] [% L.date_tag('asofdate', asofdate) %] +  [% 'CB Transactions' | $T8 %] +  [% 'only OB Transactions' | $T8 %] + + [% 'Compare to' | $T8 %] [% L.date_tag('compareasofdate', compareasofdate) %] +  [% 'CB Transactions' | $T8 %] +  [% 'only OB Transactions' | $T8 %] [% 'Decimalplaces' | $T8 %] @@ -153,11 +159,6 @@  [% 'Subtotal' | $T8 %]  [% 'Account Number' | $T8 %] - - -  [% 'CB Transactions' | $T8 %] -  [% 'only OB Transactions' | $T8 %] - [%- END %] [%- IF is_trial_balance %] -- 2.20.1