Summary: | Forgiving charge should apply to item's last fine. | ||
---|---|---|---|
Product: | Koha | Reporter: | Blou <philippe.blouin> |
Component: | Fines and fees | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED WORKSFORME | QA Contact: | Testopia <testopia> |
Severity: | minor | ||
Priority: | P5 - low | CC: | alexbuckley, eric.begin, francois.charbonnier, gmcharlt, hannah.co, kyle.m.hall, martin.renvoize, maryse.simard, philippe.blouin, veron |
Version: | 18.05 | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22200 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 17483 - Forgiving charge should apply to item's last fine.
Bug 17483: Forgiving charge should apply to item's last fine. |
Description
Blou
2016-10-21 15:49:36 UTC
Created attachment 56725 [details] [review] Bug 17483 - Forgiving charge should apply to item's last fine. When returning an item with a fine, if the Forgive checkbox is clicked, this forgives the first accountline associated to the item/user, not the current/latest as it should. Scenario (Real world): - A patron returns a book late, ensuring a 5$ fine. Does not pay it. - The patron borrows the book again 3 months later. Gets late again, and fined 2$. - Great timing: The library offers amnesty for a week. Bring back your book and we'll forget that they're late. - On checkin, the librarian clicks "Forgive overdue charges" and scan the book. - Koha cancels the 3-months-ago 5$ fine. Test scenario: - Find a user with an unpaid fine (accounttype = 'FU' in db) on a returned item. - Checkout the same item for the same user. - CHOICE 1: - Force it being late by modifying the date_due to last year. - Run fines.pl to generate another fine. - CHOICE 2: - Create directly another accountlines entry in the DB with the same info - You may change the amounts to help differentiate - Go to the returns.pl screen, check the Forgive checkbox. Return the item. - Look at the DB, the first line got paid. Not the latest one. - APPLY THE PATCH - Redo scenario, this time the latest entry (by the timestamp column) is paid. Hi Blou I ran through your test plan and your patch works fine, however I notice on the current master branch the latest overdue fine gets paid correctly as well, and so I wonder if this patch is necessary? Created attachment 77311 [details] [review] Bug 17483: Forgiving charge should apply to item's last fine. When returning an item with a fine, if the Forgive checkbox is clicked, this forgives the first accountline associated to the item/user, not the current/latest as it should. Scenario (Real world): - A patron returns a book late, ensuring a 5$ fine. Does not pay it. - The patron borrows the book again 3 months later. Gets late again, and fined 2$. - Great timing: The library offers amnesty for a week. Bring back your book and we'll forget that they're late. - On checkin, the librarian clicks "Forgive overdue charges" and scan the book. - Koha cancels the 3-months-ago 5$ fine. Test scenario: - Find a user with an unpaid fine (accounttype = 'FU' in db) on a returned item. - Checkout the same item for the same user. - CHOICE 1: - Force it being late by modifying the date_due to last year. - Run fines.pl to generate another fine. - CHOICE 2: - Create directly another accountlines entry in the DB with the same info - You may change the amounts to help differentiate - Go to the returns.pl screen, check the Forgive checkbox. Return the item. - Look at the DB, the first line got paid. Not the latest one. - APPLY THE PATCH - Redo scenario, this time the latest entry (by the timestamp column) is paid. I tested on the current master and the error still occurs, which means this patch is still needed. I can't replicate this... I can't see how one can manage to get two 'FU' state fines on the item to be able to come up with the scenario where the older fine would be picked. Could you clarify what settings you are using for fines so we can more accurately replicate this before I signoff on it. (at this point it's a case of 'does no harm, does no good' for me) OK, tried again and still can't replicate this one.. I'm going to close it with WORKSFORME.. if you can still replicate it please open a new bug with a reproducible test plan. |