|
Lines 217-222
if ( $op eq 'delete_confirm' ) {
Link Here
|
| 217 |
print $query->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=$basketno"); |
217 |
print $query->redirect("/cgi-bin/koha/acqui/basket.pl?basketno=$basketno"); |
| 218 |
exit; |
218 |
exit; |
| 219 |
} else { |
219 |
} else { |
|
|
220 |
my @branches_loop; |
| 220 |
# get librarian branch... |
221 |
# get librarian branch... |
| 221 |
if ( C4::Context->preference("IndependantBranches") ) { |
222 |
if ( C4::Context->preference("IndependantBranches") ) { |
| 222 |
my $userenv = C4::Context->userenv; |
223 |
my $userenv = C4::Context->userenv; |
|
Lines 230-245
if ( $op eq 'delete_confirm' ) {
Link Here
|
| 230 |
exit 1; |
231 |
exit 1; |
| 231 |
} |
232 |
} |
| 232 |
} |
233 |
} |
| 233 |
} |
234 |
if (!defined $basket->{branch} or $basket->{branch} eq $userenv->{branch}) { |
| 234 |
# get branches |
235 |
push @branches_loop, { |
| 235 |
my $branches = C4::Branch::GetBranches; |
236 |
branchcode => $userenv->{branch}, |
| 236 |
my @branches_loop; |
237 |
branchname => $userenv->{branchname}, |
| 237 |
foreach my $branch (sort keys %$branches) { |
238 |
selected => 1, |
| 238 |
push @branches_loop, { |
239 |
}; |
| 239 |
branchcode => $branch, |
240 |
} |
| 240 |
branchname => $branches->{$branch}->{branchname}, |
241 |
} else { |
| 241 |
selected => (defined $basket->{branch} and $branch eq $basket->{branch}) ? 1 : 0 |
242 |
# get branches |
| 242 |
}; |
243 |
my $branches = C4::Branch::GetBranches; |
|
|
244 |
my @branchcodes = sort { |
| 245 |
$branches->{$a}->{branchname} cmp $branches->{$b}->{branchname} |
| 246 |
} keys %$branches; |
| 247 |
foreach my $branch (@branchcodes) { |
| 248 |
my $selected = 0; |
| 249 |
if (defined $basket->{branch}) { |
| 250 |
$selected = 1 if $branch eq $basket->{branch}; |
| 251 |
} else { |
| 252 |
$selected = 1 if $branch eq C4::Context->userenv->{branch}; |
| 253 |
} |
| 254 |
push @branches_loop, { |
| 255 |
branchcode => $branch, |
| 256 |
branchname => $branches->{$branch}->{branchname}, |
| 257 |
selected => $selected |
| 258 |
}; |
| 259 |
} |
| 243 |
} |
260 |
} |
| 244 |
|
261 |
|
| 245 |
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups |
262 |
#if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups |
|
Lines 424-429
if ( $op eq 'delete_confirm' ) {
Link Here
|
| 424 |
$template->param( |
441 |
$template->param( |
| 425 |
basketno => $basketno, |
442 |
basketno => $basketno, |
| 426 |
basketname => $basket->{'basketname'}, |
443 |
basketname => $basket->{'basketname'}, |
|
|
444 |
basketbranchname => C4::Branch::GetBranchName($basket->{branch}), |
| 427 |
basketnote => $basket->{note}, |
445 |
basketnote => $basket->{note}, |
| 428 |
basketbooksellernote => $basket->{booksellernote}, |
446 |
basketbooksellernote => $basket->{booksellernote}, |
| 429 |
basketcontractno => $basket->{contractnumber}, |
447 |
basketcontractno => $basket->{contractnumber}, |