Lines 208-215
if (C4::Context->preference("marcflavour") eq "UNIMARC" ) {
Link Here
|
208 |
my $branches = GetBranches(); |
208 |
my $branches = GetBranches(); |
209 |
my @branch_loop; |
209 |
my @branch_loop; |
210 |
|
210 |
|
|
|
211 |
# we need to know the borrower branch code to set a default branch |
212 |
my $borrowerbranchcode = C4::Context->userenv->{'branch'}; |
213 |
|
211 |
for my $branch_hash (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { |
214 |
for my $branch_hash (sort { $branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} } keys %$branches) { |
212 |
push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, }; |
215 |
# if independantbranches is activated, set the default branch to the borrower branch |
|
|
216 |
my $selected = (C4::Context->preference("independantbranches") and ($borrowerbranchcode eq $branch_hash)) ? 1 : undef; |
217 |
push @branch_loop, {value => "$branch_hash" , branchname => $branches->{$branch_hash}->{'branchname'}, selected => $selected}; |
213 |
} |
218 |
} |
214 |
|
219 |
|
215 |
my $categories = GetBranchCategories(undef,'searchdomain'); |
220 |
my $categories = GetBranchCategories(undef,'searchdomain'); |