[Bug 43504] New: Extract Koha::Account->forgive_debit from _FixOverduesOnReturn
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43504 Bug ID: 43504 Summary: Extract Koha::Account->forgive_debit from _FixOverduesOnReturn Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Circulation Assignee: koha-bugs@lists.koha-community.org Reporter: chloe.zermatten@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle@bywatersolutions.com Target Milestone: --- In preparation for bug 39756, extract Koha::Account->forgive_debit from _FixOverduesOnReturn. The new method is also independent from userenv. This patch is also to do with bug 39756 not calling either LostItem or the methods it calls (in this case, _FixOverduesOnReturn) so that it is compatible with the trigger-based circulation rules around long overdue processing 39756 introduces. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43504 Chloé Zermatten <chloe.zermatten@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Blocks| |39756 Assignee|koha-bugs@lists.koha-commun |chloe.zermatten@openfifth.c |ity.org |o.uk Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39756 [Bug 39756] Long overdue cron configuration page -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43504 --- Comment #1 from Chloé Zermatten <chloe.zermatten@openfifth.co.uk> --- Created attachment 206650 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206650&action=edit Bug 43504: refactor: extract forgive_debit from _FixOverduesOnReturn In preparation for bug 39756, the forgive_debit method is introduced to Account.pm The choice of location is due to it calling Koha::Account::add_credit. This also removes the reliance on userenv. Test plan: 1) run prove -t t/db_dependent/Koha/Account.t (see next commit for the new tests) 2) run prove -t t/db_dependent/Circulation.t (regression check, targets '_FixOverduesOnReturn') 3) manually test forgiving a fine to ensure no regression was introduced. a) Set finesMode to 'Calculate and charge'. Give your staff user the updatecharges => writeoff permission. b) At admin/circulation-rules.pl, for the patron category, item type and library you will use, set: - Fine amount: 1 - Fine charging interval: 1 - Fine grace period: 0 c) Check an item out to a patron and backdate the due date by a week. d) perl misc/cronjobs/fines.pl -v Confirm an OVERDUE accountline with status UNRETURNED exists. e) Return the item with 'Forgive overdue charges' ticked on the returns page. f) Confirm a FORGIVEN credit exists for the amount outstanding and the overdue line is settled and now has status RETURNED. g) In accountlines, confirm the FORGIVEN credit's manager_id is your staff user's borrowernumber and branchcode is the library you are logged in at. h) Repeat step c) and d), and this time do not tick 'Forgive overdue charges'. i) Confirm the fine created in i) was left untouched Sponsored-by: Black Hills Library Consortium- http://www.rcgov.org/Library/ Assisted-by: Claude Opus 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43504 --- Comment #2 from Chloé Zermatten <chloe.zermatten@openfifth.co.uk> --- Created attachment 206651 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=206651&action=edit Bug 43504: test: Koha::Account->forgive_debit Sponsored-by: Black Hills Library Consortium- http://www.rcgov.org/Library/ Assisted-by: Claude Opus 5 (Anthropic) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43504 Chloé Zermatten <chloe.zermatten@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org