booksellerpostal => $bookseller->{postal},
contractnumber => $contract->{contractnumber},
contractname => $contract->{contractname},
+ };
+ my $temp = {
basketgroupdeliveryplace => $basketgroup->{deliveryplace},
basketgroupbillingplace => $basketgroup->{billingplace},
basketdeliveryplace => $basket->{deliveryplace},
basketbillingplace => $basket->{billingplace},
};
for my $place (qw( basketgroupdeliveryplace basketgroupbillingplace basketdeliveryplace basketbillingplace )) {
- if ( my $library = Koha::Libraries->find( $row->{deliveryplace} ) ) {
+ if ( my $library = Koha::Libraries->find( $temp->{$place} ) ) {
$row->{$place} = $library->branchname;
}
}
use Koha::AuthUtils qw(get_script_name hash_password);
use Koha::Libraries;
use Koha::LibraryCategories;
-use Koha::Libraries;
use POSIX qw/strftime/;
use List::MoreUtils qw/ any /;
use Encode qw( encode is_utf8);
# if they specify at login, use that
if ( $query->param('branch') ) {
$branchcode = $query->param('branch');
- $branchname = Koha::Libraries->find($branchcode)->branchname;
+ my $library = Koha::Libraries->find($branchcode);
+ $branchname = $library? $library->branchname: '';
}
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search };
if ( C4::Context->boolean_preference('IndependentBranches') && C4::Context->boolean_preference('Autolocation') ) {
# if they specify at login, use that
if ( $query->param('branch') ) {
$branchcode = $query->param('branch');
- $branchname = Koha::Libraries->find($branchcode)->branchname;
+ my $library = Koha::Libraries->find($branchcode);
+ $branchname = $library? $library->branchname: '';
}
my $branches = { map { $_->branchcode => $_->unblessed } Koha::Libraries->search };
foreach my $br ( keys %$branches ) {