Backdate item check-in voids fines for an extra day?

Bug #684491 reported by Ben Shum
6
This bug affects 1 person
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://www.open-ils.org/irc_logs/evergreen/2010-12/%23evergreen.02-Thu-2010.log

Ben Shum (bshum)
Changed in evergreen:
milestone: none → 1.6.1.7
Revision history for this message
Dan Wells (dbw2) wrote :

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.

Ben Shum (bshum)
Changed in evergreen:
assignee: nobody → Dan Wells (dbw2)
Revision history for this message
Dan Wells (dbw2) wrote :

A fix has been applied to trunk and rel_2_0, as seen here:

http://svn.open-ils.org/trac/ILS/changeset/19288

It is basically the solution as outlined in my previous comment. More testing always welcome!

Changed in evergreen:
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Dan Wells (dbw2) wrote :

Change has now been backported to active 1.6 branches.

Ben Shum (bshum)
no longer affects: evergreen/master
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.