View | Details | Raw Unified | Return to bug 21284
Collapse All | Expand All

(-)a/C4/ILSDI/Services.pm (-1 / +17 lines)
Lines 28-33 use C4::Biblio; Link Here
28
use C4::Reserves qw(AddReserve CanBookBeReserved CanItemBeReserved IsAvailableForItemLevelRequest);
28
use C4::Reserves qw(AddReserve CanBookBeReserved CanItemBeReserved IsAvailableForItemLevelRequest);
29
use C4::Context;
29
use C4::Context;
30
use C4::AuthoritiesMarc;
30
use C4::AuthoritiesMarc;
31
use C4::Reserves;
31
use XML::Simple;
32
use XML::Simple;
32
use HTML::Entities;
33
use HTML::Entities;
33
use CGI qw ( -utf8 );
34
use CGI qw ( -utf8 );
Lines 470-475 sub GetPatronInfo { Link Here
470
        while ( my $c = $pending_checkouts->next ) {
471
        while ( my $c = $pending_checkouts->next ) {
471
            # FIXME We should only retrieve what is needed in the template
472
            # FIXME We should only retrieve what is needed in the template
472
            my $issue = $c->unblessed_all_relateds;
473
            my $issue = $c->unblessed_all_relateds;
474
475
            # Is the item already on hold by another user?
476
            my $rs = Koha::Database->new()->schema()->resultset('Reserve');
477
            $issue->{'itemonhold'} = $rs->count(
478
                {
479
                    itemnumber => $issue->{'itemnumber'}
480
                }
481
            );
482
483
            # Is the record (next available item) on hold by another user?
484
            $issue->{'recordonhold'} = $rs->count(
485
                {
486
                    biblionumber => $issue->{'biblionumber'}
487
                }
488
            );
489
473
            push @checkouts, $issue
490
            push @checkouts, $issue
474
        }
491
        }
475
        $borrower->{'loans'}->{'loan'} = \@checkouts;
492
        $borrower->{'loans'}->{'loan'} = \@checkouts;
476
- 

Return to bug 21284