[Bug 40871] New: voided payments still appear as bankable in the register
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Bug ID: 40871 Summary: voided payments still appear as bankable in the register Change sponsored?: --- Product: Koha Version: 25.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Point of Sale Assignee: koha-bugs@lists.koha-community.org Reporter: bdaeuber@cityoffargo.com QA Contact: testopia@bugs.koha-community.org CC: martin.renvoize@openfifth.co.uk When voiding a payment, the payment still appears as bankable in the register. To recreate: 1. Make sure registers are turned on and you know the current bankable amount. 2. Make a cash payment on a patron account. 3. Observe the bankable amount on that register has increased (as expected). 4. Void this payment on the patron account. 5. Note that the bankable amount has not decreased. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Cheryl <clackman@fargolibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clackman@fargolibrary.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #1 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 192331 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192331&action=edit Bug 40871: filter out VOID and VOID adjustments in outstanding_accountlines -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #2 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Created attachment 192332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=192332&action=edit Bug 40871: Exclude void payments from cashup/bankable transactions -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |Laura.escamilla@bywatersolu |ity.org |tions.com Status|NEW |ASSIGNED Severity|enhancement |normal CC| |Laura.escamilla@bywatersolu | |tions.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #3 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- To test: 1. Make sure registers are turned on and you know the current bankable amount. 2. Make a cash payment on a patron account. 3. Observe the bankable amount on that register has increased (as expected). 4. Void this payment on the patron account. 5. Note that the bankable amount has not decreased. 6. Apply the patch. 7. Repeat steps 2-4. Notice that this time the bankable amount remains the same / it does not show the amount that was voided. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Failed QA --- Comment #4 from David Nind <david@davidnind.com> --- I attempted to test, but after applying the patches I get a 500: Internal Server Error when accessing the transaction history for the register. Developer tools says: Got 500 (Internal Server Error) DataTables warning: table id=table_cashups - Ajax error. Lots of these warnings in /var/log/koha/kohadev/plack-intranet-error.log: [WARN] Use of uninitialized value $CGI::Compile::ROOT::kohadevbox_koha_members_pay_2epl:: change_given in concatenation (.) or string at /kohadevbox/koha/members/pay.pl line 194. Note: I'm not sure what the result expected here is, for example, is this what the result should be after the patches? 1. Two $10 manual transactions added to a patron's account. 2. Two payments made. 3. Cash register bankable total = $20 (More > Tools > Cash management > Cash summary for Centerville) 4. One of the payments voided. 5. Cash register bankable total now = $10 Testing notes (using KTD): 1. Set UseCashRegisters to "Use". 2. Set up a cash register (Administration > Accounting > Cash registers > New cash register). 3. Add two $10 manual transactions to a patron's account. 4. Pay the two amounts. 5. Void one of the payments. 6. Cash register bankable total = $10 (More > Tools > Cash management > Cash summary for Centerville). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|voided payments still |Voided payments still |appear as bankable in the |appear as bankable in the |register |cash register -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Juliet Heltibridle <jheltibridle@rcplib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jheltibridle@rcplib.org --- Comment #5 from Juliet Heltibridle <jheltibridle@rcplib.org> --- I'm not sure if this patch addresses it, but the cashup summary also does weird things with voided credit card transactions. In this case: 1. Make a credit payment on a patron account for $10. 2. Note that the bankable amount is $0 (because you didn't take cash) but the total income (cash) is $10. 3. Void the transaction: note that the total income (cash) is still $10. 4. Run the cashup: it won't tell you to remove any $$ from the drawer (because you didn't take cash) 4. Look at the Cashup Summary. It will say that the total amount for the day was $10, but the Total Credit was -$10. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #6 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- Created attachment 206490 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206490&action=edit voided payments in the transactions history (cash register history summary) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marie-luce.laflamme@inlibro | |.com --- Comment #7 from Marie-Luce Laflamme <marie-luce.laflamme@inlibro.com> --- I noticed an issue a while back that is still present in the 26.06 version, in Transactions history (Tools > Cash management > Cash summary for... > Cash register). In short, when a payment is voided from a patron's account, the voided amount is still included in the total income, which can give a misleading picture of the actual income. However, payments voided through the Point of sale module are correctly subtracted from the total. Would it make sense to have voided payments shown as a separate total on this page, without affecting the actual income amount? I've included a screenshot to illustrate the situation (see 'voided payment' attachment). Perhaps this could also be considered as part of the improvements to the new template. Here a suggested test plan: Test plan prerequisites - Enable the Point of sale module -enable the system preference EnablePointOfSale - Add some debit types (Administration > Patrons and circulation > Debit types) - Add a new debit type that allows "Can be sold" - Enable a cash register with the system preference "UseCashRegisters" - Then, create and configure a cash register (Administration > Patrons and circulation > Cash register> "New..." ) Test 1 - voiding payment from a patron account 1. Find a patron account 2. Add a manual invoice to this account 2. Pay the invoice 3. Go to Tools module > Cash management > Cash summany for ... > Cash register name > Transactions history - Confirm that the the payment appears in the Transactions history 4. From the patron's account, void the payment 5. Return to the Transactions history in the Tools module ---> current behaviour: the voided payment is still included in the total income (bug) ---> expected behaviour: the voided amount should be deducted from the total income in order to reflect the adjustment. Test 2 - Payment voided from the Point of sale ---> expected behaviour: the voided payment should be removed from the total income 6. Go to the Point of sale module 7. Add fees and proceed with the payment 8. Go to Tools module > Cash management > Cash summany for ... > Cash register name > Transactions history - Confirm that the the payment appears in the Transactions history 9. Void the Point of sale payment 9.1 Go to the Tools > Cash management > Cash summany for ... > Cash register name) 9.2. Find the payment in the Transactions to date summary 9.3 Click on "Issue refund" 10. Check the transactions history again in the Tool module ---> the refunded payment is displayed in red and its amount is removed from the total as it should be. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sally.healey@cheshireshared | |services.gov.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #192331|0 |1 is obsolete| | Attachment #192332|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #8 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 209011 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209011&action=edit Bug 40871: filter out VOID and VOID adjustments in outstanding_accountlines -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #9 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 209012 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209012&action=edit Bug 40871: Exclude void payments from cashup/bankable transactions -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #10 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 209013 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209013&action=edit Bug 40871: (follow-up) Fix cashups(), exclude voids from outstanding_accountlines and list them separately The first patch adds its VOID filter to Koha::Cash::Register->cashups instead of outstanding_accountlines. cashups() searches cash_register_actions, which has no status or debit_type_code columns, so every call dies with "Unknown column 'debit_type_code' in 'WHERE'": the register's cashup history returns a 500 and most of Register.t fails. The bankable amount itself was never changed. This follow-up: - removes the filter from cashups() - applies it where it belongs: outstanding_accountlines no longer returns voided payments, so they are left out of the transactions list, the bankable amount, the cashup totals and the expected amount for a cashup - adds Koha::Cash::Register->voided_accountlines, the voided payments for the current period, so they stay reachable - on pos/register.pl, leaves voided payments out of the "Older transactions" list and total too, and shows a collapsed "Voided transactions (N)" section under both the current and the older transactions, listing date, description, payment type and amount with a link to the account line details A void only ever happens before the money is banked, so excluding voids from the live figures and from the summary of a completed cashup (the second patch) cannot change what was reconciled. To test: 1. Enable UseCashRegisters and create a register for your library 2. Take two payments of 10.00 cash on a patron's account, with the register selected 3. Void one of the payments from the patron's account 4. Open the register's page (pos/register.pl) => Total bankable is 10.00, not 20.00, and the transactions total is 10.00 => A collapsed "Voided transactions (1)" section lists the voided payment; expanding it shows its date, description, payment type and amount 5. Record a cashup for 10.00 => It balances, with no surplus or deficit line 6. Under "Older transactions" choose a range that includes the payments => The list and total exclude the voided payment, and the voided payment is listed under the table 7. prove t/db_dependent/Koha/Cash/Register.t Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #11 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- I have reworked this against current main. Summary of what I found and what I did. Why this failed QA: the first patch (192331) is titled as a change to outstanding_accountlines, but the hunk is in Koha::Cash::Register->cashups. That method searches cash_register_actions, which has no status or debit_type_code columns, so with the patch applied every call dies with "Unknown column 'debit_type_code' in 'WHERE'". That is the 500 David saw in comment 4, and it also makes most of t/db_dependent/Koha/Cash/Register.t fail (8 of its 12 subtests). The patch does not change the bankable amount. The second patch (192332) no longer applies to current main, because Cashup::summary has since gained the CASHUP_DEFICIT and CASHUP_SURPLUS conditions. I have rebased it, merging both sets of conditions. I have added a follow-up on top of the two patches. It: - removes the filter from cashups() - applies it in outstanding_accountlines, so voided payments are left out of the transactions list, the bankable amount, the cashup totals and the expected amount for a cashup - adds Koha::Cash::Register->voided_accountlines, and on pos/register.pl a collapsed "Voided transactions (N)" section under both the current and the older transactions, so voided payments stay reachable - leaves voided payments out of the "Older transactions" list and total A void only happens before the money is banked, so excluding voids from the live figures and from the summary of a completed cashup cannot change what was reconciled. This also covers the "total income" concern in comment 7: voided payments are no longer in that total, and they are listed separately. Test plan is in the follow-up commit message. Two payments of 10.00 with one voided give a bankable amount of 10.00, and a cashup of 10.00 balances. Comment 5 (a voided card payment shown in the summary) should be covered by the second patch, but I have not tested it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40871 --- Comment #12 from Benjamin Daeuber <bdaeuber@cityoffargo.com> --- When I walked through the test plan, I'm getting an odd behavior when doing the "start cashup" (not sure what that feature is supposed to be called). 1. I create two payments (say $7.50 and $20 to keep the amounts obvious), the bankable amount is $27.50. 2. Then I void the $20 payment and the bankable amount drops to $7.50. 3. A quick cashup works without issue. The report says I took $7.50 out of the drawer. However, when I do the same steps with a "start cashup" function and tell it I'm taking $7.50 out of the drawer, the summary still tells me I have a cashup deficit of $20. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org