On Thu, Jan 14, 2010 at 10:45 PM, Bill Ott b...@grpl.org wrote:
On 1/14/10 4:46 PM, Dan Wells wrote:
Hello all,
We have noticed a small bug in the optional automatic voiding of Lost
Fees. The transaction is not marked as finished, as I believe it should be
if there are no other billings (it still shows in the LOST area on the
user's account). I am wondering if more logic will be needed for cases
where the fee has been paid and a refund is generated, but we haven't run
into that yet :)
This patch is against trunk. For bug fixes, does it makes sense (would it
be helpful) to provide a patch for the current branch as well?
Good catch Dan. I think this was my miss when I submitted some changes to
lost item handling some time ago. I've massaged your patch into our 1.4.?
code and it works as expected. In my original testing I apparently hadn't
taken into account items left with no charges at all.
I'd like to suggest an alternate approach. The attached diff just moves the
xact_finish logic in checkin_handle_circ() down below the call to
checkin_handle_lost(), so that it occurs only once, after all billings, etc.
have been modified.
-b
--
Bill Erickson
| VP, Software Development Integration
| Equinox Software, Inc. / The Evergreen Experts
| phone: 877-OPEN-ILS (673-6457)
| email: erick...@esilibrary.com
| web: http://esilibrary.com
Please come by and visit the Equinox team
and learn more about Evergreen
ALA MidWinter
January 15-18, 2010
booth # 2064
Index: Circulate.pm
===
--- Circulate.pm (revision 15334)
+++ Circulate.pm (working copy)
@@ -2651,12 +2651,6 @@
$circ-stop_fines_time($self-backdate) if $self-backdate;
}
- # see if there are any fines owed on this circ. if not, close it
-($obt) = $U-fetch_mbts($circ-id, $self-editor);
-$circ-xact_finish('now') if( $obt and $obt-balance_owed == 0 );
-
-$logger-debug(circulator: .$obt-balance_owed. is owed on this circulation);
-
# Set the checkin vars since we have the item
$circ-checkin_time( ($self-backdate) ? $self-backdate : 'now' );
@@ -2695,6 +2689,13 @@
$self-update_copy;
}
+
+# see if there are any fines owed on this circ. if not, close it
+($obt) = $U-fetch_mbts($circ-id, $self-editor);
+$circ-xact_finish('now') if( $obt and $obt-balance_owed == 0 );
+
+$logger-debug(circulator: .$obt-balance_owed. is owed on this circulation);
+
return $self-bail_on_events($self-editor-event)
unless $self-editor-update_action_circulation($circ);