Backdate item check-in voids fines for an extra day?
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Undecided
|
Dan Wells | ||
1.6 |
Fix Released
|
Undecided
|
Dan Wells | ||
2.0 |
Fix Released
|
Undecided
|
Dan Wells |
Bug Description
Evergreen version: 1.6.1.4
OpenSRF version: 1.6.1
PostgreSQL version: 8.3
Linux distribution: Debian Lenny
When using the backdate option for the check-in interface, items that are returned with a backdate that have overdue fines seem to gain an extra day voided. Unsure what the source of the problem is, but testing on various 1.6.1.x platforms has shown the following to be true:
If an item is due on 2010-11-12 23:59:59-05 and there are fines in money.billing from 2010-11-13 23:59:59-05 through 2010-12-02 23:59:59-05 at a rate of $0.10 per day, then the patron supposedly owes a total of $2.10 for the time in between if returned on 2010-12-02. However, when using the backdate during checkin to check-in the item on 2010-11-30, it voids 2010-11-30, 2010-12-01, and 2010-12-02 (three days, instead of just two as expected) resulting in a revised fine of $1.70 (loss of $0.10).
Problem first noted in IRC log here: http://
Changed in evergreen: | |
milestone: | none → 1.6.1.7 |
Changed in evergreen: | |
assignee: | nobody → Dan Wells (dbw2) |
no longer affects: | evergreen/master |
Looking over the code, we have two different functions dealing with backdate voiding, but one understands the generated fine dating and one doesn't. In CircCommon.pm, I believe we have the correct interpretation of our current practice in void_overdues(), and a comment stating:
"Here, we add one fine interval to the backdate to ensure that we are not voiding fines that were applicable before the backdate."
So if an item is due on the 12th, returned on the 15th, but backdated to the 13th, we only void bills for the 14th on (backdate + one day, the fine interval in this example). This is correct, because if they actually returned it on the 13th, it was still a day late. In Circulate.pm, though, we have a checkin_ handle_ backdate( ) subroutine which does not account for this.
I believe we should scrap checkin_ handle_ backdate( ) and more or less use void_overdues() in its place.