To recreate: - take a payment of $1 - void that payment - go to reports, Cash Register (cash_register_stats.pl) and run a report for all payments taken today, see your voided payment We should not included voided credits, it throws off the totals.
We actively have a ticket for this issue, from Nov 2021. Duplicates being shown in our reports is affecting the information that is available to show the county that controls our funds. At the moment we are simply not using the function, and making notes elsewhere. But with multiple branches there is always the risk it gets used and shows our money as incorrect.
I have just verified that this is still the beahviour on master. When limiting the search to payments, the voided payments show and the total given is wrong.
Created attachment 148689 [details] [review] Bug 29664: Removing void payments from cash_register_stats Test Plan: 1. In a patron account create a manual fee of $1 2. Pay the amount of $1 3. Under Transactions, void the payment of $1. 4. Go to Reports > Cash Register > Run the report. A payment of $1 will show despite having voided the payment. 5. Apply patch and restart services. 6. Repeat step 4. Void payment should no longer show in the report. 7. Sign off!
Created attachment 148690 [details] [review] Bug 29664: Removing void payments from the cash register report Test Plan: 1. In a patron account create a manual fee of $1 2. Pay the amount of $1 3. Under Transactions, void the payment of $1. 4. Go to Reports > Cash Register > Run the report. A payment of $1 will show despite having voided the payment. 5. Apply patch and restart services. 6. Repeat step 4. Void payment should no longer show in the report. 7. Sign off!
Created attachment 148691 [details] [review] Bug 29664: Removing void payments from the cash register report Test Plan: 1. In a patron account create a manual fee of $1 2. Pay the amount of $1 3. Under Transactions, void the payment of $1. 4. Go to Reports > Cash Register > Run the report. A payment of $1 will show despite having voided the payment. 5. Apply patch and restart services. 6. Repeat step 4. Void payment should no longer show in the report. 7. Sign off!
Created attachment 148692 [details] [review] Bug 29664: Removing void payments from the cash register report Test plan: 1. In a patron account create a manual fee of $1 2. Pay the amount of $1 3. Under Transactions, void the payment of $1. 4. Go to Reports > Cash Register > Run the report. A payment of $1 will show despite having voided the payment. 5. Apply patch and restart services. 6. Repeat step 4. Void payment should no longer show in the report. 7. Sign off!
Created attachment 148693 [details] [review] Bug 29664: Removing void payments from the cash register report Test plan: 1. In a patron account create a manual fee of $1 2. Pay the amount of $1 3. Under Transactions, void the payment of $1. 4. Go to Reports > Cash Register > Run the report. A payment of $1 will show despite having voided the payment. 5. Apply patch and restart services. 6. Repeat step 4. Void payment should no longer show in the report. 7. Sign off!
Created attachment 148694 [details] [review] Bug 29664: Removing void payments from the cash register report Test plan: 1. In a patron account create a manual fee of $1 2. Pay the amount of $1 3. Under Transactions, void the payment of $1. 4. Go to Reports > Cash Register > Run the report. A payment of $1 will show despite having voided the payment. 5. Apply patch and restart services. 6. Repeat step 4. Void payment should no longer show in the report. 7. Sign off!
Created attachment 149102 [details] [review] Bug 29664: WIP Test Patch Test plan: 1. In a patron account create a manual fee of $5.00 - save and pay. 2. In the same patron account, create a manual fee of $1.00 - save and pay. 3. Under Transactions, void the payment of $5. Ensure that the “Account Type” shows that the $5 amount has been voided. 4. Go to Reports > Cash Register > Make sure that the “Transaction Type” is showing as “All payments to the library” > Run the report. 1. Check that both the $5.00 voided payment and the $1.00 regular payment are shown in the report. 5. Run the report again, but this time change the “Transaction Type” to “Credit has been voided”. Only the $5.00 voided payment should appear. 6. Apply the patch and restart services. 7. Repeat step 4. The report should only show the $1 payment. 8. Repeat step 5. No changes should occur - the $5.00 voided payment should still show.
Created attachment 150456 [details] [review] 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
Created attachment 150580 [details] [review] 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>
There is an entry in the pull downs "Credit has been voided" that makes me wonder if we should still show the voided payments somehow, but marked as such. Maybe give them their own entry in the list of types? I understand what you don't want to see them in payments. Would love to get another set of eyes on this one. Martin maybe?
QA: Looking here
Created attachment 152887 [details] [review] 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>
Created attachment 152888 [details] [review] Bug 29664: (QA follow-up) Typo transacton Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
(In reply to Katrin Fischer from comment #12) > There is an entry in the pull downs "Credit has been voided" that makes me > wonder if we should still show the voided payments somehow, but marked as > such. Maybe give them their own entry in the list of types? > > I understand what you don't want to see them in payments. > > Would love to get another set of eyes on this one. Martin maybe? The filter is applied to PAYMENT and ACT. You could still see them with ALL or VOID? Seems that we overload VOID a bit btw: Koha/Account/Line.pm: debit_type_code => 'VOID', Koha/Account/Line.pm: status => 'VOID' Koha/Account/Line.pm: type => 'VOID', No reason to keep this here now. Last word to RM.
Pushed to master for 23.11. Nice work everyone, thanks!
Thanks for all the hard work! Pushed to 23.05.x for the next release
Nice work everyone! Pushed to oldstable for 22.11.x
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 | +----------------+------------------+-------------------+
(In reply to Andrii Nugged from comment #20) > 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: Make sure to file a new bug once an issue has been pushed. See bug 34552