-my $branches = GetBranches;
-my @branchloop;
-if ( C4::Branch::onlymine ) {
- my $userenv = C4::Context->userenv;
- my $branch = C4::Branch::GetBranchDetail( $userenv->{'branch'} );
- push @branchloop, {
- value => $branch->{branchcode},
- branchcode => $branch->{branchcode},
- branchname => $branch->{branchname},
- selected => 1
- }
-} else {
- foreach (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %{$branches}) {
- push @branchloop, {
- value => $_,
- selected => ($branches->{$_}->{branchcode} eq $branch),
- branchname => $branches->{$_}->{branchname},
- };
- }
-}
-
-my @categories;
-my $no_categories;