From 0d9b17f67e43288d446815fe3b186b217accd1cd Mon Sep 17 00:00:00 2001 From: John Doe Date: Fri, 24 Mar 2023 18:16:36 +0000 Subject: [PATCH] Bug 29664: Removing void payments from the cash register report --- reports/cash_register_stats.pl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reports/cash_register_stats.pl b/reports/cash_register_stats.pl index c2b22f9db2..1e054c0679 100755 --- a/reports/cash_register_stats.pl +++ b/reports/cash_register_stats.pl @@ -111,6 +111,12 @@ if ($do_it) { LEFT JOIN account_credit_types act ON (al.credit_type_code = act.code) LEFT JOIN account_debit_types adt ON (al.debit_type_code = adt.code) WHERE CAST(al.date AS DATE) BETWEEN ? AND ? + AND al.borrowernumber NOT in ( + SELECT borrowernumber + FROM accountlines + WHERE debit_type_code = 'VOID' + WHERE credit_type_code = 'VOID' + ) $whereTType $whereBranchCode $whereRegister -- 2.30.2