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

(-)a/C4/ILSDI/Services.pm (-3 / +7 lines)
Lines 421-435 sub GetPatronInfo { Link Here
421
421
422
            my $unblessed_hold = $hold->unblessed;
422
            my $unblessed_hold = $hold->unblessed;
423
            # Get additional informations
423
            # Get additional informations
424
            my $item = GetBiblioFromItemNumber( $hold->itemnumber, undef );
424
            my $item = Koha::Items->find( $hold->itemnumber );
425
            my $biblio = $item->biblio;
426
            my $biblioitem = $biblio->biblioitem;
425
            my $library = Koha::Libraries->find( $hold->branchcode ); # Should $hold->get_library
427
            my $library = Koha::Libraries->find( $hold->branchcode ); # Should $hold->get_library
426
            my $branchname = $library ? $library->branchname : '';
428
            my $branchname = $library ? $library->branchname : '';
427
429
428
            # Remove unwanted fields
430
            # Remove unwanted fields
431
            $item = $item->unblessed;
429
            delete $item->{'more_subfields_xml'};
432
            delete $item->{'more_subfields_xml'};
433
            $biblio = $biblio->unblessed;
434
            $biblioitem = $biblioitem->unblessed;
430
435
431
            # Add additional fields
436
            # Add additional fields
432
            $unblessed_hold->{item}       = $item;
437
            $unblessed_hold->{item}       = { %$item, %$biblio, %$biblioitem };
433
            $unblessed_hold->{branchname} = $branchname;
438
            $unblessed_hold->{branchname} = $branchname;
434
            $unblessed_hold->{title}      = GetBiblio( $hold->biblionumber )->{'title'}; # Should be $hold->get_biblio
439
            $unblessed_hold->{title}      = GetBiblio( $hold->biblionumber )->{'title'}; # Should be $hold->get_biblio
435
440
436
- 

Return to bug 18276