https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23415
--- Comment #236 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 193090 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193090&action=edit Bug 23415: (follow-up) Respect OPACFineNoRenewalsIncludeCredits preference This patch fixes a regression introduced in the previous commits where we changed FineNoRenewals checking to use non_issues_charges instead of balance. While this change was correct for focusing on blocking charges, we inadvertently removed the handling of the OPACFineNoRenewalsIncludeCredits preference. The OPACFineNoRenewalsIncludeCredits preference controls whether unapplied account credits should be included when calculating if a patron exceeds the FineNoRenewals threshold. When this preference is enabled, the patron's net balance (debits minus credits) should be used instead of just their outstanding debits. This patch restores the preference handling for both: 1. Manual renewals in CanBookBeRenewed() 2. Auto renewals in _CanBookBeAutoRenewed() When OPACFineNoRenewalsIncludeCredits = 1: Use balance (all charges net of credits) When OPACFineNoRenewalsIncludeCredits = 0: Use non_issues_charges (only blocking charges, no credits) This ensures that patrons with sufficient credits can renew their items when the preference is enabled, while still maintaining the focus on non-issuing charges introduced in the previous commits. Test plan: 1. Run prove t/db_dependent/Circulation.t 2. All tests should pass, particularly the "auto_too_much_owing | OPACFineNoRenewalsBlockAutoRenew & OPACFineNoRenewalsIncludeCredits" subtest Sponsored-by: OpenFifth <https://openfifth.co.uk/> Signed-off-by: Andrew Fuerste Henry <[email protected]> Signed-off-by: Martin Renvoize <[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/
