Bug 40871 - Voided payments still appear as bankable in the cash register
Summary: Voided payments still appear as bankable in the cash register
Status: Failed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Point of Sale (show other bugs)
Version: 25.05
Hardware: All All
: P5 - low normal
Assignee: Laura Escamilla
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-09-24 14:16 UTC by Benjamin Daeuber
Modified: 2026-02-06 10:22 UTC (History)
4 users (show)

See Also:
GIT URL:
Initiative type: ---
Sponsorship status: ---
Comma delimited list of Sponsors:
Crowdfunding goal: 0
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40871: filter out VOID and VOID adjustments in outstanding_accountlines (1.02 KB, patch)
2026-02-02 15:27 UTC, Laura Escamilla
Details | Diff | Splinter Review
Bug 40871: Exclude void payments from cashup/bankable transactions (1.21 KB, patch)
2026-02-02 15:27 UTC, Laura Escamilla
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Benjamin Daeuber 2025-09-24 14:16:29 UTC
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.
Comment 1 Laura Escamilla 2026-02-02 15:27:36 UTC
Created attachment 192331 [details] [review]
Bug 40871: filter out VOID and VOID adjustments in outstanding_accountlines
Comment 2 Laura Escamilla 2026-02-02 15:27:38 UTC
Created attachment 192332 [details] [review]
Bug 40871: Exclude void payments from cashup/bankable transactions
Comment 3 Laura Escamilla 2026-02-02 16:36:47 UTC
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.
Comment 4 David Nind 2026-02-06 10:21:48 UTC
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).