|
Lines 210-215
if ( $op eq 'delete_confirm' ) {
Link Here
|
| 210 |
print $query->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=$basketno"); |
210 |
print $query->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=$basketno"); |
| 211 |
exit; |
211 |
exit; |
| 212 |
} else { |
212 |
} else { |
|
|
213 |
my @branches_loop; |
| 213 |
# get librarian branch... |
214 |
# get librarian branch... |
| 214 |
if ( C4::Context->preference("IndependantBranches") ) { |
215 |
if ( C4::Context->preference("IndependantBranches") ) { |
| 215 |
my $userenv = C4::Context->userenv; |
216 |
my $userenv = C4::Context->userenv; |
|
Lines 223-238
if ( $op eq 'delete_confirm' ) {
Link Here
|
| 223 |
exit 1; |
224 |
exit 1; |
| 224 |
} |
225 |
} |
| 225 |
} |
226 |
} |
| 226 |
} |
227 |
if (!defined $basket->{branch} or $basket->{branch} eq $userenv->{branch}) { |
| 227 |
# get branches |
228 |
push @branches_loop, { |
| 228 |
my $branches = C4::Branch::GetBranches; |
229 |
branchcode => $userenv->{branch}, |
| 229 |
my @branches_loop; |
230 |
branchname => $userenv->{branchname}, |
| 230 |
foreach my $branch (sort keys %$branches) { |
231 |
selected => 1, |
| 231 |
push @branches_loop, { |
232 |
}; |
| 232 |
branchcode => $branch, |
233 |
} |
| 233 |
branchname => $branches->{$branch}->{branchname}, |
234 |
} else { |
| 234 |
selected => (defined $basket->{branch} and $branch eq $basket->{branch}) ? 1 : 0 |
235 |
# get branches |
| 235 |
}; |
236 |
my $branches = C4::Branch::GetBranches; |
|
|
237 |
my @branchcodes = sort { |
| 238 |
$branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} |
| 239 |
} keys %$branches; |
| 240 |
foreach my $branch (@branchcodes) { |
| 241 |
my $selected = 0; |
| 242 |
if (defined $basket->{branch}) { |
| 243 |
$selected = 1 if $branch eq $basket->{branch}; |
| 244 |
} else { |
| 245 |
$selected = 1 if $branch eq C4::Context->userenv->{branch}; |
| 246 |
} |
| 247 |
push @branches_loop, { |
| 248 |
branchcode => $branch, |
| 249 |
branchname => $branches->{$branch}->{branchname}, |
| 250 |
selected => $selected |
| 251 |
}; |
| 252 |
} |
| 236 |
} |
253 |
} |
| 237 |
|
254 |
|
| 238 |
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups |
255 |
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups |
|
Lines 417-422
if ( $op eq 'delete_confirm' ) {
Link Here
|
| 417 |
$template->param( |
434 |
$template->param( |
| 418 |
basketno => $basketno, |
435 |
basketno => $basketno, |
| 419 |
basketname => $basket->{'basketname'}, |
436 |
basketname => $basket->{'basketname'}, |
|
|
437 |
basketbranchname => C4::Branch::GetBranchName($basket->{branch}), |
| 420 |
basketnote => $basket->{note}, |
438 |
basketnote => $basket->{note}, |
| 421 |
basketbooksellernote => $basket->{booksellernote}, |
439 |
basketbooksellernote => $basket->{booksellernote}, |
| 422 |
basketcontractno => $basket->{contractnumber}, |
440 |
basketcontractno => $basket->{contractnumber}, |