Index: Circulate.pm
===================================================================
--- Circulate.pm (revision 12971)
+++ Circulate.pm (working copy)
@@ -2307,17 +2307,25 @@
# Make sure there is an open circ to renew that is not
# marked as LOST, CLAIMSRETURNED, or LONGOVERDUE
- my $circ = $self->editor->search_action_circulation(
- { target_copy => $self->copy->id, stop_fines => undef } )->[0];
+ my $usrid = $self->patron->id;
+ my $circ;
+ if ($usrid) {
+ # If we have a patron, match them to the circ
+ $circ = $self->editor->search_action_circulation(
+ {target_copy => $self->copy->id, usr => $usrid, stop_fines => undef})->[0];
+ } else {
+ $circ = $self->editor->search_action_circulation(
+ {target_copy => $self->copy->id, stop_fines => undef})->[0];
+ }
if(!$circ) {
+ if ($usrid) {
$circ = $self->editor->search_action_circulation(
- {
- target_copy => $self->copy->id,
- stop_fines => OILS_STOP_FINES_MAX_FINES,
- checkin_time => undef
- }
- )->[0];
+ {target_copy => $self->copy->id, usr => $usrid, stop_fines => OILS_STOP_FINES_MAX_FINES, checkin_time => undef})->[0];
+ } else {
+ $circ = $self->editor->search_action_circulation(
+ {target_copy => $self->copy->id, stop_fines => OILS_STOP_FINES_MAX_FINES, checkin_time => undef})->[0];
+ }
}
return $self->bail_on_events($self->editor->event) unless $circ;
Change to verify an item requested for renewal is actually being
circulated by the renewal patron - if we have the patron info. This is
against the 1_4_0 svn tree.
- [OPEN-ILS-DEV] Rewrite of build-db.sh Aaron Joyner
- Re: [OPEN-ILS-DEV] Rewrite of build-db.sh Dan Scott
- Re: [OPEN-ILS-DEV] Rewrite of build-db.sh Aaron Joyner
- Re: [OPEN-ILS-DEV] Rewrite of build-db.sh Dan Scott
- Re: [OPEN-ILS-DEV] Rewrite of build-db.sh Aaron Joyner
- Re: [OPEN-ILS-DEV] Rewrite of build-db... Aaron Joyner
- Re: [OPEN-ILS-DEV] Rewrite of buil... Dan Scott
- Re: [OPEN-ILS-DEV] Rewrite of ... Aaron Joyner
- [OPEN-ILS-DEV] matching users... Doug Kyle
- Re: [OPEN-ILS-DEV] matching us... Mike Rylander
- Re: [OPEN-ILS-DEV] matching us... Doug Kyle
- Re: [OPEN-ILS-DEV] matching us... Bill Erickson
