use Exporter;
use Carp;
-use Sys::Syslog qw(syslog);
+use C4::SIP::Sip qw(syslog);
use Data::Dumper;
use C4::SIP::Sip qw(add_field);
use C4::Koha;
use C4::Members;
use C4::Reserves;
-use C4::Items qw( GetItemnumbersForBiblio);
use C4::Auth qw(checkpw);
use Koha::Items;
# FIXME: populate fine_items recall_items
$ilspatron{unavail_holds} = _get_outstanding_holds($kp->{borrowernumber});
- $ilspatron{items} = $patron->pending_checkouts->unblessed;
+
+ my $pending_checkouts = $patron->pending_checkouts;
+ my @barcodes;
+ while ( my $c = $pending_checkouts->next ) {
+ push @barcodes, { barcode => $c->item->barcode };
+ }
+ $ilspatron{items} = \@barcodes;
+
$self = \%ilspatron;
$debug and warn Dumper($self);
syslog("LOG_DEBUG", "new ILS::Patron(%s): found patron '%s'", $patron_id,$self->{id});
# We need to return a barcode for the biblio so the client
# can request the biblio info
my $items = $hold->biblio->items;
- $item = $items->count ? $item->next : undef;
+ $item = $items->count ? $items->next : undef;
}
my $unblessed_hold = $hold->unblessed;