From 99c3186c01e01a4a3b4efa32aec25578e77d3246 Mon Sep 17 00:00:00 2001 From: Colin Campbell Date: Wed, 16 Sep 2009 01:07:08 +0100 Subject: [PATCH] bug 3638 On CheckIn via SIP update the Hold status to waiting if Reserved Content-Type: text/plain; charset="utf-8" Hold status was unchanged when on-hold items were returned via the SIP2 interface. --- C4/SIP/ILS/Transaction/Checkin.pm | 12 +++++++++++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/C4/SIP/ILS/Transaction/Checkin.pm b/C4/SIP/ILS/Transaction/Checkin.pm index d3a4700..23d778d 100644 --- a/C4/SIP/ILS/Transaction/Checkin.pm +++ b/C4/SIP/ILS/Transaction/Checkin.pm @@ -14,6 +14,7 @@ use ILS::Transaction; use C4::Circulation; use C4::Debug; +use C4::Reserves; our @ISA = qw(ILS::Transaction); @@ -76,7 +77,16 @@ sub do_checkin { if ($messages->{ResFound}) { $self->hold($messages->{ResFound}); $debug and warn "Item returned at $branch reserved at $messages->{ResFound}->{branchcode}"; - $self->alert_type(($branch eq $messages->{ResFound}->{branchcode}) ? '01' : '02'); + my $do_transfer; + if ($branch eq $messages->{ResFound}->{branchcode}) { + $self->alert_type('01'); + } else { + $self->alert_type('02'); + $do_transfer = 1; + } + C4::Reserves::ModReserveAffect($messages->{ResFound}->{itemnumber}, + $messages->{ResFound}->{borrowernumber}, + $do_transfer); } $self->alert(1) if defined $self->alert_type; # alert_type could be "00", hypothetically $self->ok($return); -- 1.6.6