use C4::Biblio;
use C4::Items;
use C4::Letters;
-use C4::Branch; # GetBranches
use Koha::DateUtils;
use Koha::Holds;
use Koha::Database;
if ( $debar ne "9999-12-31" ) {
$borr->{'userdebarreddate'} = $debar;
}
+ # FIXME looks like $available is not needed
+ # If a patron is discharged he has a validated discharge available
my $available = Koha::Patron::Discharge::count({
borrowernumber => $borrowernumber,
validated => 1,
}
$template->param( show_barcode => 1 ) if $show_barcode;
-# load the branches
-my $branches = GetBranches();
-my @branch_loop;
-for my $branch_hash ( sort keys %{$branches} ) {
- my $selected;
- if ( C4::Context->preference('SearchMyLibraryFirst') ) {
- $selected =
- ( C4::Context->userenv
- && ( $branch_hash eq C4::Context->userenv->{branch} ) );
- }
- push @branch_loop,
- { value => "branch: $branch_hash",
- branchname => $branches->{$branch_hash}->{'branchname'},
- selected => $selected,
- };
-}
-$template->param( branchloop => \@branch_loop );
-
# now the reserved items....
my $reserves = Koha::Holds->search( { borrowernumber => $borrowernumber } );