push @itemtypeloop, { code => $itype , description => $itemtypes->{$itype}->{description} } ;
}
-my $branches=GetBranches();
-my @branchloop;
-foreach (sort {$branches->{$a}->{'branchname'} cmp $branches->{$b}->{'branchname'}} keys %$branches) {
- my $thisbranch = ''; # FIXME
- my %row = (
- branchcode => $_,
- selected => ($thisbranch eq $_ ? 1 : 0),
- code => $branches->{$_}->{'branchcode'},
- description => $branches->{$_}->{'branchname'},
- );
- push @branchloop, \%row;
-}
-
# location list
my @locations;
foreach (sort keys %$locations) {
itemtypeloop => \@itemtypeloop,
locationloop => \@locations,
ccodeloop => \@ccodes,
- branchloop => \@branchloop,
+ branchloop => GetBranchesLoop(C4::Context->userenv->{'branch'}),
hassort1=> $hassort1,
hassort2=> $hassort2,
Bsort1 => $Bsort1,
} else {
$colfield = $column;
}
- $colorder = ($colfield =~ /dayname/) ? "weekday($line)" :
- ($colfield =~ /^month/ ) ? " month($line)" : $colfield;
+ $colorder = ($colfield =~ /dayname/) ? "weekday($column)" :
+ ($colfield =~ /^month/ ) ? " month($column)" : $colfield;
my $strsth2 = "SELECT distinctrow $colfield FROM statistics, ";
# get stats on items if ccode or location, otherwise borrowers.
$strsth2 .= ($colsource eq 'items' ) ?