Lost item return + restore overdues + due date change exceeds max fine
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-
* 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-
* generate-
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_
{ xact => $c->id,
{ order_by => {mb => 'billing_ts DESC'},
])};
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?