Lost item return + restore overdues + due date change exceeds max fine

Bug #1900564 reported by Bill Erickson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
New
Undecided
Unassigned

Bug Description

Seen in Evergreen 3.4. Likely affects all supported versions with the same settings for lost / billing handling.

Steps to reproduce:

Enable the void-overdue-on-lost, restore-overdue-on-lost-return, and generate-new-overdues-on-lost-return settings.

* Check out item and accumulate overdue fines, but fewer than max-fines.
* Mark item as lost, causing overdues to be voided/adjusted.
* Modify the circ due date to some time in the future.
* Return the lost item.
* restore-overdue-on-lost causes the previously voided/adjusted overdues to be reinstated with a billing_ts matching final billing_ts of the original overdues.
* generate-new-overdues-on-lost-return causes the fine generation code to generate new overdues up to max fine amount.

The problem in this scenario is the fine generator is not taking the newly reinstated fines into account when generating new overdues, so it generates max-fines in new overdues on top of newly reinstated fines.

At issue is a check in the fine generator which limits existing billings to take into consideration to those created after the due date:

            my @fines = @{$e->search_money_billing([
                { xact => $c->id,
                  btype => 1,
                  billing_ts => { '>' => $c->$due_date_method } },
                { order_by => {mb => 'billing_ts DESC'},
                  flesh => 1,
                  flesh_fields => {mb => ['adjustments']} }
            ])};

However, since the due date was changed, this check causes the fine generator to ignore the reinstated fines which have a billing_ts from before the new due date.

Does anyone know why we have a billing_ts limit in the fine generator? Any reason not to simply look for all billings on a transaction with btype=1?

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.