Bug 14570: Make it possible to add multiple guarantors to a record
[koha-ffzg.git] / C4 / SIP / ILS / Patron.pm
index 01bac98..eb8e30b 100644 (file)
@@ -130,12 +130,13 @@ sub new {
 
     # FIXME: populate fine_items recall_items
     $ilspatron{unavail_holds} = _get_outstanding_holds($kp->{borrowernumber});
+
     my $pending_checkouts = $patron->pending_checkouts;
-    my @items_infos;
+    my @barcodes;
     while ( my $c = $pending_checkouts->next ) {
-        push @items_infos, $c->unblessed_all_relateds;
+        push @barcodes, { barcode => $c->item->barcode };
     }
-    $ilspatron{items} = \@items_infos;
+    $ilspatron{items} = \@barcodes;
 
     $self = \%ilspatron;
     $debug and warn Dumper($self);
@@ -247,7 +248,7 @@ sub fee_amount {
     if ( $self->{fines} ) {
         return $self->{fines};
     }
-    return;
+    return 0;
 }
 
 sub fines_amount {
@@ -626,7 +627,6 @@ __END__
 | contactname         | mediumtext   | YES  |     | NULL    |                |
 | contactfirstname    | text         | YES  |     | NULL    |                |
 | contacttitle        | text         | YES  |     | NULL    |                |
-| guarantorid         | int(11)      | YES  | MUL | NULL    |                |
 | borrowernotes       | mediumtext   | YES  |     | NULL    |                |
 | relationship        | varchar(100) | YES  |     | NULL    |                |
 | ethnicity           | varchar(50)  | YES  |     | NULL    |                |