[Koha-patches] [PATCH] bug 3638 On CheckIn via SIP update the Hold status to waiting if Reserved
Colin Campbell
colin.campbell at ptfs-europe.com
Wed Sep 16 10:25:47 CEST 2009
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.2.5
More information about the Koha-patches
mailing list