use C4::Biblio;
use C4::Items;
use C4::Auth qw/:DEFAULT get_session/;
-use C4::Branch; # GetBranches
use C4::Koha;
use C4::Members;
}
);
-my $branches = GetBranches;
-
my $messages;
my $found;
my $reserved;
my @trsfitemloop;
my $transfered;
my $barcode = $query->param('barcode');
-# strip whitespace
-defined $barcode and $barcode =~ s/\s*//g; # FIXME: barcodeInputFilter
+# remove leading/trailing whitespace
+defined $barcode and $barcode =~ s/^\s*|\s*$//g; # FIXME: barcodeInputFilter
# warn "barcode : $barcode";
if ($barcode) {
$item{'ccode'} = $iteminformation->{'ccode'};
$item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'};
$item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
- $item{'frbrname'} = $branches->{$frbranchcd}->{'branchname'};
- $item{'tobrname'} = $branches->{$tobranchcd}->{'branchname'};
# }
$item{counter} = 0;
$item{barcode} = $barcode;
$item{'ccode'} = $iteminformation->{'ccode'};
$item{'itemcallnumber'} = $iteminformation->{'itemcallnumber'};
$item{'location'} = GetKohaAuthorisedValueLib("LOC",$iteminformation->{'location'});
- $item{'frbrname'} = $branches->{$frbcd}->{'branchname'};
- $item{'tobrname'} = $branches->{$tobcd}->{'branchname'};
push( @trsfitemloop, \%item );
}
$err{errbadcode} = 1;
}
elsif ( $code eq "NotAllowed" ) {
- warn "NotAllowed: $messages->{'NotAllowed'} to " . $branches->{ $messages->{'NotAllowed'} }->{'branchname'};
+ warn "NotAllowed: $messages->{'NotAllowed'} to branchcode " . $messages->{'NotAllowed'};
# Do we really want a error log message here? --atz
$err{errnotallowed} = 1;
my ( $tbr, $typecode ) = split( /::/, $messages->{'NotAllowed'} );
- $err{tbr} = $branches->{ $tbr }->{'branchname'};
+ $err{tbr} = $tbr;
$err{code} = $typecode;
}
elsif ( $code eq 'IsPermanent' ) {
$err{errispermanent} = 1;
- $err{msg} = $branches->{ $messages->{'IsPermanent'} }->{'branchname'};
+ $err{msg} = $messages->{'IsPermanent'};
}
elsif ( $code eq 'WasReturned' ) {
$err{errwasreturned} = 1;
cancelled => $cancelled,
setwaiting => $setwaiting,
trsfitemloop => \@trsfitemloop,
- branchoptionloop => GetBranchesLoop($tobranchcd),
errmsgloop => \@errmsgloop,
CircAutocompl => C4::Context->preference("CircAutocompl")
);