https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33501
--- Comment #9 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 198839 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198839&action=edit Bug 33501: Per-payment-type cashup summary modal Extends Koha::Cash::Register::Cashup->summary with a 'reconciliations_grouped' arrayref — one entry per payment type that has a CASHUP_SURPLUS and/or CASHUP_DEFICIT line for this cashup, with its surplus_total, deficit_total and note. Built directly from the reconciliation accountlines. The cashup summary modal (cashup_modal.js) renders one row per payment type with the relevant surplus or deficit amount and note. The legacy single-row fallback (using the older surplus_total / deficit_total fields without payment-type grouping) is dropped; the atomicupdate in the previous patch backfills payment_type on any historical surplus/deficit lines, so reconciliations_grouped is always populated when surplus or deficit lines exist. Adds a focused unit test 'reconciliations_grouped' covering a mixed cashup (cash deficit + cheque surplus). Existing summary fixtures that previously exercised the legacy single-amount add_cashup form have been mechanically migrated to the new reconciliations-array shape (all of them used CASH-only registers, so this is a syntactic change only). Test plan: 1. Apply the previous patches in this series. 2. Run prove t/db_dependent/Koha/Cash/Register/Cashup.t — all subtests should pass, including the new 'reconciliations_grouped'. 3. Configure CashupPaymentTypes to 'CASH,CHEQUE' and process some payments using each type. 4. Start a two-phase cashup, then complete it with a discrepant actual amount for both types, supplying a per-row note for each. 5. Click the Summary link on the completed cashup. Confirm the modal shows two reconciliation rows, one labelled "Cash deficit" and one labelled "Cheque surplus" (or similar), each with its own reconciliation note. 6. On a database that had CASHUP_SURPLUS / CASHUP_DEFICIT lines before this series, click Summary on one of those legacy cashups and confirm the modal still renders correctly — backfilled rows appear under the 'CASH' label. -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
