From d65373b5b0de90097d89a7f16e3d598457f65d09 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Wed, 16 Oct 2019 15:58:36 +0100 Subject: [PATCH] Bug 23827: Correction for missed 'F' and 'FU' case When replacing F and FU with 'OVERDUE' + status in bug 22521 I missed the cases inside the cash_register_stats template. This patch should correct that mistake. Signed-off-by: Andrew Fuerste-Henry --- .../en/modules/reports/cash_register_stats.tt | 16 ++++++++-------- reports/cash_register_stats.pl | 4 ++++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt index 1aca2fb209..25abde2da4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt @@ -78,16 +78,16 @@ [% END %] - [% IF transaction_type == "F" %] - + [% IF transaction_type == "OVERDUE" %] + [% ELSE %] - + [% END %] - [% IF transaction_type == "FU" %] - + [% IF transaction_type == "OVERDUEA" %] + [% ELSE %] - + [% END %] [% IF transaction_type == "PAY" %] @@ -201,9 +201,9 @@ Credit [% ELSIF loopresul.accounttype == "FORW" || loopresul.accounttype == "W" %] Write off - [% ELSIF loopresul.accounttype == "F" %] + [% ELSIF loopresul.accounttype == "OVERDUE" && loopresul.status != "UNRETURNED" %] Fine - [% ELSIF loopresul.accounttype == "FU" %] + [% ELSIF loopresul.accounttype == "OVERDUE" && loopresul.status == "UNRETURNED" %] Accruing fine [% ELSIF loopresul.accounttype == "Pay" %] Payment diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl index b030f6684e..d84f9bb195 100755 --- a/reports/cash_register_stats.pl +++ b/reports/cash_register_stats.pl @@ -76,6 +76,10 @@ if ($do_it) { } else { #Single transac type if ($transaction_type eq 'FORW') { $whereTType = q{ AND accounttype IN ('FOR','W') }; + } elsif ( $transaction_type eq 'OVERDUEA' ) { + $whereTType = q{ AND accounttype = 'OVERDUE' AND status = 'UNRETURNED' }; + } elsif ( $transaction_type eq 'OVERDUE' ) { + $whereTType = q{ AND accounttype = 'OVERDUE' AND status != 'UNRETURNED' }; } else { $whereTType = q{ AND accounttype = ? }; push @extra_params, $transaction_type; -- 2.20.1