Bug 29664: Do not show voided payments in cash_register_stats.pl

Test Plan:
1) Set up your cash register
2) Take a payment
3) Void that payment
4) Verify the voided fee shows for the "All payments to the library" and
   "Payment" transaction type filters
5) Apply this patch
6) Restart all the things!
7) Verify the voided fee no longer shows for the "All payments to the library" and
   "Payment" transaction type filters

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Kyle M Hall 2023-05-01 09:50:24 -04:00 committed by Tomas Cohen Arazi
parent 35c6d94d25
commit 65a45b761b
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
1 changed files with 4 additions and 0 deletions

View File

@ -82,6 +82,10 @@ if ($do_it) {
}
}
if ( $transaction_type eq 'PAYMENT' || $transaction_type eq 'ACT' ) {
$whereTType .= q{ AND status != 'VOID' };
}
my $whereBranchCode = q{};
if ($manager_branchcode ne 'ALL') {
$whereBranchCode = q{ AND m.branchcode = ?};