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.