[Koha-bugs] [Bug 29664] Do not show voided payments in cash register statistics wizard
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Wed Aug 2 01:15:11 CEST 2023
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29664
Andrii Nugged <nugged at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |nugged at gmail.com
--- Comment #20 from Andrii Nugged <nugged at gmail.com> ---
Follow-up bug note:
$whereTType .= q{ AND status != 'VOID' };
This makes MariaDB act unexpectedly: statuses with NULL are also skipped!
When I added this to our piloting production:
$whereTType .= q{ AND (status IS NULL OR status != 'VOID') };
it started to show those accountlines which has NULLs.
Reasoning: https://mariadb.com/kb/en/null-values/
SELECT NULL != 'VOID', 'VOID' != 'VOID', 'TOTAL' != 'VOID';
+----------------+------------------+-------------------+
| NULL != 'VOID' | 'VOID' != 'VOID' | 'TOTAL' != 'VOID' |
+----------------+------------------+-------------------+
| NULL | 0 | 1 |
+----------------+------------------+-------------------+
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list