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

(-)a/C4/ILSDI/Services.pm (-3 / +7 lines)
Lines 416-430 sub GetPatronInfo { Link Here
416
        foreach my $reserve (@reserves) {
416
        foreach my $reserve (@reserves) {
417
417
418
            # Get additional informations
418
            # Get additional informations
419
            my $item = GetBiblioFromItemNumber( $reserve->{'itemnumber'}, undef );
419
            my $item = Koha::Items->find( $reserve->{itemnumber} );
420
            my $biblio = $item->biblio;
421
            my $biblioitem = $biblio->biblioitem;
420
            my $library = Koha::Libraries->find( $reserve->{branchcode} );
422
            my $library = Koha::Libraries->find( $reserve->{branchcode} );
421
            my $branchname = $library ? $library->branchname : '';
423
            my $branchname = $library ? $library->branchname : '';
422
424
423
            # Remove unwanted fields
425
            # Remove unwanted fields
426
            $item = $item->unblessed;
424
            delete $item->{'more_subfields_xml'};
427
            delete $item->{'more_subfields_xml'};
428
            $biblio = $biblio->unblessed;
429
            $biblioitem = $biblioitem->unblessed;
425
430
426
            # Add additional fields
431
            # Add additional fields
427
            $reserve->{'item'}       = $item;
432
            $reserve->{'item'}       = { %$item, %$biblio, %$biblioitem };
428
            $reserve->{'branchname'} = $branchname;
433
            $reserve->{'branchname'} = $branchname;
429
            $reserve->{'title'}      = GetBiblio( $reserve->{'biblionumber'} )->{'title'};
434
            $reserve->{'title'}      = GetBiblio( $reserve->{'biblionumber'} )->{'title'};
430
        }
435
        }
431
- 

Return to bug 18276