C4::Search::new_record_from_zebra('biblioserver',$hit) );
# offer all barcodes individually
- foreach my $barcode ( sort split(/\s*\|\s*/, $chosen->{barcode}) ) {
- my %chosen_single = %{$chosen};
- $chosen_single{barcode} = $barcode;
- push( @options, \%chosen_single );
+ if ( $chosen->{barcode} ) {
+ foreach my $barcode ( sort split(/\s*\|\s*/, $chosen->{barcode}) ) {
+ my %chosen_single = %{$chosen};
+ $chosen_single{barcode} = $barcode;
+ push( @options, \%chosen_single );
+ }
}
}
$template->param( options => \@options );
($it->{'charge'}, $it->{'itemtype_charge'}) = GetIssuingCharges(
$it->{'itemnumber'}, $it->{'borrowernumber'}
);
- $it->{'charge'} = sprintf("%.2f", $it->{'charge'});
+ $it->{'charge'} = sprintf("%.2f", $it->{'charge'}) if defined $it->{'charge'};
my ($can_renew, $can_renew_error) = CanBookBeRenewed(
$it->{'borrowernumber'},$it->{'itemnumber'}
);
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
-if ( $borrower->{'category_type'} eq 'C') {
+if ( $borrowernumber && $borrower->{'category_type'} eq 'C') {
my ( $catcodes, $labels ) = GetborCatFromCatType( 'A', 'WHERE category_type = ?' );
my $cnt = scalar(@$catcodes);
$template->param( 'CATCODE_MULTI' => 1) if $cnt > 1;
relprevissues => \@relprevissues,
displayrelissues => $displayrelissues,
inprocess => $inprocess,
- is_child => ($borrower->{'category_type'} eq 'C'),
+ is_child => ($borrowernumber && $borrower->{'category_type'} eq 'C'),
circview => 1,
soundon => C4::Context->preference("SoundOn"),
fast_cataloging => $fast_cataloging,