Comment 2 for bug 793550

Revision history for this message
Steve Callender (stevecallender) wrote :

It looks like it's not just claims returns, but if there is any stop_fines set on a transaction, the transaction will close if the billing is balanced out.

For example, an overdue item hits MAXFINES. The billing is paid before the item is checked in. At the point the billing hits 0, the transaction is closed. The item still remains checked out. Now if an attempt is made to renew the item, there will be an error. "No open transaction found". If the item is checked in, the system treats it as if it was an available copy being checked in and puts it in reshelving. The old transaction that was prematurely closed never gets a checkin_time.

It looks like the problem may be in the make_payments sub in Money.pm,

            if(!$circ || $circ->stop_fines) {
                # If this is a circulation, we can't close the transaction
                # unless stop_fines is set.
                $trans = $e->retrieve_money_billable_transaction($transid);
                $trans->xact_finish("now");
                if (!$e->update_money_billable_transaction($trans)) {
                    return _recording_failure(
                        $e, "update_money_billable_transaction() failed",
                        $payment, $cc_payload
                    )
                }
            }

It's a fairly important bug, since technically a patron could keep an item forever if they just pay the maxfines on it and never bring it back to the library.