use C4::Acquisition qw(GetOrdersByBiblionumber);
use Koha::Biblios;
+use Koha::Patrons;
my $query = new CGI;
my ( $template, $borrowernumber, $cookie ) = get_template_and_user(
}
if ( $query->cookie("holdfor") ) {
- my $holdfor_patron =
- GetMember( 'borrowernumber' => $query->cookie("holdfor") );
+ my $holdfor_patron = Koha::Patrons->find( $query->cookie("holdfor") );
$template->param(
holdfor => $query->cookie("holdfor"),
- holdfor_surname => $holdfor_patron->{'surname'},
- holdfor_firstname => $holdfor_patron->{'firstname'},
- holdfor_cardnumber => $holdfor_patron->{'cardnumber'},
+ holdfor_surname => $holdfor_patron->surname,
+ holdfor_firstname => $holdfor_patron->firstname,
+ holdfor_cardnumber => $holdfor_patron->cardnumber,
);
}
my $count_deletedorders_using_biblio = scalar @deletedorders_using_biblio ;
$template->param (countdeletedorders => $count_deletedorders_using_biblio);
-$biblio = Koha::Biblios->find( $biblionumber );
my $hold_count = $biblio ? $biblio->holds->count : 0;
$template->param( holdcount => $hold_count );