use C4::Koha qw( GetAuthorisedValues );
use CGI qw ( -utf8 );
use HTML::Entities;
-use C4::Biblio qw( GetBiblioData GetFrameworkCode GetMarcBiblio );
+use C4::Biblio qw( GetBiblioData GetFrameworkCode );
use C4::Items qw( GetHostItemsInfo GetItemsInfo );
use C4::Acquisition qw( GetOrderFromItemnumber GetBasket GetInvoice );
use C4::Output qw( output_and_exit output_html_with_http_headers );
if($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 => $query->cookie("holdfor"),
+ holdfor_patron => $holdfor_patron,
);
}
($itemnumber != $itm->{itemnumber}));
}
-my $record=GetMarcBiblio({ biblionumber => $biblionumber });
+my $biblio = Koha::Biblios->find( $biblionumber );
+my $record = $biblio ? $biblio->metadata->record : undef;
output_and_exit( $query, $cookie, $template, 'unknown_biblio')
- unless $record;
+ unless $biblio && $record;
my $hostrecords;
# adding items linked via host biblios
push (@items,@hostitems);
}
-my $biblio = Koha::Biblios->find( $biblionumber );
-
my $totalcount=@all_items;
my $showncount=@items;
my $hiddencount = $totalcount - $showncount;
);
if ( my $accountline = $accountlines->next ) {
- my $payment_offsets = Koha::Account::Offsets->search(
+ my $payment_offsets = $accountline->debit_offsets(
{
- debit_id => $accountline->id,
credit_id => { '!=' => undef }, # it is not the debit itself
- type => { '!=' => [ 'Writeoff', 'Forgiven' ] },
- amount => { '<' => 0 } # credits are negative on the DB
+ 'credit.credit_type_code' =>
+ { '!=' => [ 'Writeoff', 'Forgiven' ] },
},
- { order_by => { '-desc' => 'created_on' } }
+ { join => 'credit', order_by => { '-desc' => 'created_on' } }
);
if ($payment_offsets->count) {
{
borrowernumber => $loggedinuser,
add_allowed => 1,
- category => 1,
+ public => 0,
}
);
my $some_public_shelves = Koha::Virtualshelves->get_some_shelves(
{
borrowernumber => $loggedinuser,
add_allowed => 1,
- category => 2,
+ public => 1,
}
);