[open-ils-commits] r18999 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ (miker)
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Dec 15 12:11:27 EST 2010
Author: miker
Date: 2010-12-15 12:11:24 -0500 (Wed, 15 Dec 2010)
New Revision: 18999
Modified:
trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
Log:
Two bug fixes: 1) only allow one fine generator call per circulation during a given transaction; 2) require that a circulation be open, based on the xact_finish field, in order to be the parent of a renewal (I suspect this used to depend on the open-circ view)
Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2010-12-13 21:42:33 UTC (rev 18998)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Circ/Circulate.pm 2010-12-15 17:11:24 UTC (rev 18999)
@@ -2903,12 +2903,14 @@
my $id = $reservation ? $self->reservation->id : $self->circ->id;
- $self->{_gen_fines_req} = OpenSRF::AppSession->create('open-ils.storage')
- ->request(
- 'open-ils.storage.action.circulation.overdue.generate_fines',
- undef,
- $id
- );
+ if (!exists($self->{_gen_fines_req})) {
+ $self->{_gen_fines_req} = OpenSRF::AppSession->create('open-ils.storage')
+ ->request(
+ 'open-ils.storage.action.circulation.overdue.generate_fines',
+ undef,
+ $id
+ );
+ }
return undef;
}
@@ -2920,6 +2922,7 @@
my $id = $reservation ? $self->reservation->id : $self->circ->id;
$self->{_gen_fines_req}->wait_complete;
+ delete($self->{_gen_fines_req});
# refresh the circ in case the fine generator set the stop_fines field
$self->reservation($self->editor->retrieve_booking_reservation($id)) if $reservation;
@@ -3205,6 +3208,7 @@
my $usrid = $self->patron->id if $self->patron;
my $circ = $self->editor->search_action_circulation({
target_copy => $self->copy->id,
+ xact_finish => undef,
($usrid ? (usr => $usrid) : ()),
'-or' => [
{stop_fines => undef},
More information about the open-ils-commits
mailing list