Lines 417-437
sub GetPatronInfo {
Link Here
|
417 |
my @reserves = GetReservesFromBorrowernumber( $borrowernumber, undef ); |
417 |
my @reserves = GetReservesFromBorrowernumber( $borrowernumber, undef ); |
418 |
foreach my $reserve (@reserves) { |
418 |
foreach my $reserve (@reserves) { |
419 |
|
419 |
|
|
|
420 |
my ( $item, $biblio, $biblioitem ) = ( {}, {}, {} ); |
420 |
# Get additional informations |
421 |
# Get additional informations |
421 |
my $item = Koha::Items->find( $reserve->{itemnumber} ); |
422 |
if ( $reserve->{itemnumber} ) { # item level holds |
422 |
my $biblio = $item->biblio; |
423 |
$item = Koha::Items->find( $reserve->{itemnumber} ); |
423 |
my $biblioitem = $biblio->biblioitem; |
424 |
$biblio = $item->biblio; |
424 |
my $library = Koha::Libraries->find( $reserve->{branchcode} ); |
425 |
$biblioitem = $biblio->biblioitem; |
425 |
my $branchname = $library ? $library->branchname : ''; |
426 |
|
426 |
|
427 |
# Remove unwanted fields |
427 |
# Remove unwanted fields |
428 |
$item = $item->unblessed; |
428 |
$item = $item->unblessed; |
429 |
delete $item->{more_subfields_xml}; |
429 |
delete $item->{'more_subfields_xml'}; |
430 |
$biblio = $biblio->unblessed; |
430 |
$biblio = $biblio->unblessed; |
431 |
$biblioitem = $biblioitem->unblessed; |
431 |
$biblioitem = $biblioitem->unblessed; |
432 |
} |
432 |
|
433 |
|
433 |
# Add additional fields |
434 |
# Add additional fields |
434 |
$reserve->{'item'} = { %$item, %$biblio, %$biblioitem }; |
435 |
$reserve->{'item'} = { %$item, %$biblio, %$biblioitem }; |
|
|
436 |
my $library = Koha::Libraries->find( $reserve->{branchcode} ); |
437 |
my $branchname = $library ? $library->branchname : ''; |
435 |
$reserve->{'branchname'} = $branchname; |
438 |
$reserve->{'branchname'} = $branchname; |
436 |
$reserve->{'title'} = GetBiblio( $reserve->{'biblionumber'} )->{'title'}; |
439 |
$reserve->{'title'} = GetBiblio( $reserve->{'biblionumber'} )->{'title'}; |
437 |
} |
440 |
} |
438 |
- |
|
|