https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40445

--- Comment #127 from Martin Renvoize (ashimema) 
<[email protected]> ---
Created attachment 193140
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193140&action=edit
Bug 40445: (follow-up) Set payment_type for CASHUP_SURPLUS and CASHUP_DEFICIT
accountlines

When creating CASHUP_SURPLUS and CASHUP_DEFICIT accountlines during
cashup reconciliation, the payment_type was not being set. This
resulted in accountlines with NULL payment_type values, which should
be 'CASH' to properly indicate these are cash-related transactions.

This patch:
- Sets payment_type to 'CASH' for both CASHUP_SURPLUS and CASHUP_DEFICIT
  accountlines created during the reconciliation process
- Adds test coverage to verify payment_type is correctly set
- Adds preference mocking to prevent test failures in subtests that
  don't specifically test reconciliation note requirements

All required fields are now properly set for reconciliation accountlines:
- payment_type (CASH)
- manager_id
- branchcode (from earlier follow-up)
- register_id

Test plan:
1. Apply patch
2. Run prove t/db_dependent/Koha/Cash/Register.t
3. Verify all tests pass, including new payment_type checks
4. In the staff interface, perform a cashup with a surplus or deficit
5. Verify the created CASHUP_SURPLUS or CASHUP_DEFICIT accountline has
   payment_type set to 'CASH'

Signed-off-by: Jackie Usher <[email protected]>

-- 
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/

Reply via email to