[Bug 29923] New: Do not generate overpayment refund from writeoff of fine
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Bug ID: 29923 Summary: Do not generate overpayment refund from writeoff of fine Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org To recreate: 1 - turn finesmode on 2 - set circ rule a circ rule to charge fines 3 - perform a checkout that follows your circ rule, setting the due date in the past 4 - run the fines cron and confirm that it generates an accruing fine for your patron 5 - write off that fine 6 - edit your circ rule to remove the fine amount and interval 7 - check your item in 8 - see your patron now has a credit in the amount of the writeoff The overpayment credit should only be generated if we've taken payment on the fine. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=28432 CC| |nick@bywatersolutions.com -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Benjamin Daeuber <bdaeuber@cityoffargo.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |bdaeuber@cityoffargo.com --- Comment #1 from Benjamin Daeuber <bdaeuber@cityoffargo.com> --- I would and cancellations to this. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Juliet Heltibridle <jheltibridle@rcplib.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jheltibridle@rcplib.org --- Comment #2 from Juliet Heltibridle <jheltibridle@rcplib.org> --- It would be helpful to our library to be able to choose how refunds apply. We would like lost items to be refunded to the account only if the charge hasn't already been written off, canceled, or paid. So long overdue items that are returned without having been cleared up by staff or patrons first are the only ones refunded (and the patron is returned to a zero balance). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #3 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- (In reply to Juliet Heltibridle from comment #2)
It would be helpful to our library to be able to choose how refunds apply. We would like lost items to be refunded to the account only if the charge hasn't already been written off, canceled, or paid. So long overdue items that are returned without having been cleared up by staff or patrons first are the only ones refunded (and the patron is returned to a zero balance).
You may want to look at Bug 28575 - Add ability to choose if lost fee is refunded based on when lost fee was paid off -- 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=29923 Lisette Scheer <lisette.scheer@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette.scheer@bywatersolut | |ions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 hebah@bywatersolutions.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |hebah@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #4 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- (In reply to Benjamin Daeuber from comment #1)
I would and cancellations to this.
In my testing on koha main just now, an overpayment refund is not generated if an accruing fine is cancelled and the fine is later reduced at checkin (due to backdated checkin, "forgive overdue fines" mode, or a change in the circ rules). -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |martin.renvoize@openfifth.c |ity.org |o.uk CC| |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #5 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 194457 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194457&action=edit Bug 29923: Prevent overpayment credit when written-off accruing fine is adjusted on check-in When a staff member writes off an accruing fine and the item is subsequently checked in (backdated or in fine-free mode), the fine amount is recalculated downward via adjust(). The previous code unconditionally created an OVERPAYMENT credit whenever the adjusted outstanding went negative, regardless of whether the existing credits were reversible payments or non-reversible writeoffs/discounts. This caused patrons to receive an erroneous credit equal to the written-off amount, since writeoffs should simply be absorbed when the underlying fine shrinks - no refund is due. The fix calculates the total non-reversible credits (writeoffs, discounts, cancellations) applied to the debit using the existing filter_by_non_reversible method, and only generates an OVERPAYMENT credit for the portion attributable to reversible cash payments that exceed the recalculated fine amount. Test plan: 1. Write off an accruing fine in full 2. Check the item in (backdated or fine-free) 3. Confirm no overpayment credit is generated for the patron -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #6 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- This works great! I'm looking for a librarian to supply a sign-off so that I can then QA. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |andrew@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194457|0 |1 is obsolete| | --- Comment #7 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 194555 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194555&action=edit Bug 29923: Prevent overpayment credit when written-off accruing fine is adjusted on check-in When a staff member writes off an accruing fine and the item is subsequently checked in (backdated or in fine-free mode), the fine amount is recalculated downward via adjust(). The previous code unconditionally created an OVERPAYMENT credit whenever the adjusted outstanding went negative, regardless of whether the existing credits were reversible payments or non-reversible writeoffs/discounts. This caused patrons to receive an erroneous credit equal to the written-off amount, since writeoffs should simply be absorbed when the underlying fine shrinks - no refund is due. The fix calculates the total non-reversible credits (writeoffs, discounts, cancellations) applied to the debit using the existing filter_by_non_reversible method, and only generates an OVERPAYMENT credit for the portion attributable to reversible cash payments that exceed the recalculated fine amount. Test plan: 1. Write off an accruing fine in full 2. Check the item in (backdated or fine-free) 3. Confirm no overpayment credit is generated for the patron Signed-off-by: Benjamin Daeuber <BDaeuber@fargolibrary.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #194555|0 |1 is obsolete| | --- Comment #8 from Andrew Fuerste-Henry <andrew@bywatersolutions.com> --- Created attachment 194556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194556&action=edit Bug 29923: Prevent overpayment credit when written-off accruing fine is adjusted on check-in When a staff member writes off an accruing fine and the item is subsequently checked in (backdated or in fine-free mode), the fine amount is recalculated downward via adjust(). The previous code unconditionally created an OVERPAYMENT credit whenever the adjusted outstanding went negative, regardless of whether the existing credits were reversible payments or non-reversible writeoffs/discounts. This caused patrons to receive an erroneous credit equal to the written-off amount, since writeoffs should simply be absorbed when the underlying fine shrinks - no refund is due. The fix calculates the total non-reversible credits (writeoffs, discounts, cancellations) applied to the debit using the existing filter_by_non_reversible method, and only generates an OVERPAYMENT credit for the portion attributable to reversible cash payments that exceed the recalculated fine amount. Test plan: 1. Write off an accruing fine in full 2. Check the item in (backdated or fine-free) 3. Confirm no overpayment credit is generated for the patron Signed-off-by: Benjamin Daeuber <BDaeuber@fargolibrary.org> Signed-off-by: Andrew Fuerste Henry <andrew@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=31200 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=40779 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |26.05.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #9 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #10 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Laura Escamilla <Laura.escamilla@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|26.05.00,25.11.04 |26.05.00,25.11.04,25.05.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #11 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.05.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 --- Comment #12 from Laura Escamilla <Laura.escamilla@bywatersolutions.com> --- Correction: this was pushed for 25.05.11. --LE -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29923 Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |baptiste.wojtkowski@biblibr | |e.com Status|Pushed to oldstable |Needs documenting Version(s)|26.05.00,25.11.04,25.05.11 |26.05.00,25.11.04,25.05.11, released in| |24.11.16 --- Comment #13 from Baptiste Wojtkowski (bwoj) <baptiste.wojtkowski@biblibre.com> --- Pushed into 24.11.x for 24.11.16 nice work everyone -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org