<td><select name="Filter" id="branch">
<option value=""> </option>
<!-- TMPL_LOOP NAME="branchloop" -->
-<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="code" -->" selected="selected"><!-- TMPL_VAR NAME="description" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="code" -->"><!-- TMPL_VAR NAME="description" --></option><!-- /TMPL_IF -->
+<!-- TMPL_IF NAME="selected" --><option value="<!-- TMPL_VAR NAME="value" -->" selected="selected"><!-- TMPL_VAR NAME="branchname" --></option><!-- TMPL_ELSE --><option value="<!-- TMPL_VAR NAME="value" -->"><!-- TMPL_VAR NAME="branchname" --></option><!-- /TMPL_IF -->
<!-- /TMPL_LOOP -->
</select>
</td>
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,