https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33501
--- Comment #7 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 198837 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=198837&action=edit Bug 33501: Database update â Add CashupPaymentTypes system preference Adds a new system preference that lists, in order, which PAYMENT_TYPE authorised values participate in the cashup reconciliation workflow. The preference is rendered as a sortable multi-select picker in Administration > System preferences > Accounting using the 'multiple_sortable: authval' pattern (see Bug 42553). Order is significant: it drives the row order in the Complete cashup modal and the per-payment-type breakdown on the register page. Default value is 'CASH,SIP00' so that existing installations are unaffected — that matches the previously hardcoded list used for the expected-amount filter in the cashup workflow. Also backfills payment_type='CASH' on any historical CASHUP_SURPLUS / CASHUP_DEFICIT accountlines that pre-date this work and have no payment_type yet. Every cashup before this bug treated all takings as cash, so tagging those lines explicitly is safe and lets the cashup summary group them under 'CASH' without runtime fallback handling. Subsequent patches in this series consume the preference to drive the per-payment-type reconciliation flow. Depends on Bug 42553 for the dynamic 'authval' source on multiple_sortable. Test plan: 1. Apply this patch and run the database update. The output should confirm the syspref was added and report how many historical surplus/deficit lines (if any) were backfilled. 2. Visit Administration > System preferences > Accounting and find the new "CashupPaymentTypes" preference. Verify it renders as a sortable list of every value in the PAYMENT_TYPE authorised value category, with checkboxes and drag handles, defaulting to 'CASH,SIP00' selected. 3. Pick CASH and a couple of others (e.g. CHEQUE, SIP01), reorder by dragging, save. Reload and verify the order and selection are preserved as a comma-separated string in the systempreferences row. 4. Add a fresh PAYMENT_TYPE authorised value (e.g. VOUCHER) and confirm it appears in the picker without further configuration. 5. On a database with pre-existing CASHUP_SURPLUS / CASHUP_DEFICIT accountlines created before this patch, verify their payment_type column has been populated with 'CASH'. -- 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/
