Lines 233-245
sub printbasketgrouppdf{
Link Here
|
233 |
my $op = $input->param('op') || 'display'; |
233 |
my $op = $input->param('op') || 'display'; |
234 |
# possible values of $op : |
234 |
# possible values of $op : |
235 |
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup |
235 |
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup |
236 |
# - mod_basket : modify an individual basket of the basketgroup |
236 |
# - mod_basket : puts a basket in the basketgroup and redirect to basket page (called from basket page) |
237 |
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list |
237 |
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list |
238 |
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list |
238 |
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list |
239 |
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list |
239 |
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list |
240 |
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list |
240 |
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list |
241 |
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list |
241 |
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list |
242 |
# - attachbasket : save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page |
242 |
# - save : saves a modified or newly created basketgroup |
243 |
# - display : display the list of all basketgroups for a vendor |
243 |
# - display : display the list of all basketgroups for a vendor |
244 |
my $booksellerid = $input->param('booksellerid'); |
244 |
my $booksellerid = $input->param('booksellerid'); |
245 |
$template->param(booksellerid => $booksellerid); |
245 |
$template->param(booksellerid => $booksellerid); |
Lines 296-302
if ( $op eq "add" ) {
Link Here
|
296 |
displaybasketgroups($basketgroups, $bookseller, $baskets); |
296 |
displaybasketgroups($basketgroups, $bookseller, $baskets); |
297 |
} elsif ($op eq 'mod_basket') { |
297 |
} elsif ($op eq 'mod_basket') { |
298 |
# |
298 |
# |
299 |
# edit an individual basket contained in this basketgroup |
299 |
# put a basket in the basketgroup and redirect to basket page (called from basket page) |
300 |
# |
300 |
# |
301 |
my $basketno=$input->param('basketno'); |
301 |
my $basketno=$input->param('basketno'); |
302 |
my $basketgroupid=$input->param('basketgroupid'); |
302 |
my $basketgroupid=$input->param('basketgroupid'); |
Lines 345-353
if ( $op eq "add" ) {
Link Here
|
345 |
ReOpenBasketgroup($basketgroupid); |
345 |
ReOpenBasketgroup($basketgroupid); |
346 |
my $redirectpath = ((defined $input->param('mode'))&& ($input->param('mode') eq 'singlebg')) ?'/cgi-bin/koha/acqui/basketgroup.pl?op=add&basketgroupid='.$basketgroupid.'&booksellerid='.$booksellerid : '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' .$booksellerid.'&listclosed=1'; |
346 |
my $redirectpath = ((defined $input->param('mode'))&& ($input->param('mode') eq 'singlebg')) ?'/cgi-bin/koha/acqui/basketgroup.pl?op=add&basketgroupid='.$basketgroupid.'&booksellerid='.$booksellerid : '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' .$booksellerid.'&listclosed=1'; |
347 |
print $input->redirect($redirectpath); |
347 |
print $input->redirect($redirectpath); |
348 |
} elsif ( $op eq 'attachbasket') { |
348 |
} elsif ( $op eq 'save') { |
349 |
# |
349 |
# |
350 |
# save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page |
350 |
# saves a modified or newly created basketgroup |
351 |
# |
351 |
# |
352 |
# Getting parameters |
352 |
# Getting parameters |
353 |
my $basketgroup = {}; |
353 |
my $basketgroup = {}; |
Lines 373-383
if ( $op eq "add" ) {
Link Here
|
373 |
closed => $closedbg, |
373 |
closed => $closedbg, |
374 |
}; |
374 |
}; |
375 |
ModBasketgroup($basketgroup); |
375 |
ModBasketgroup($basketgroup); |
376 |
if($closedbg){ |
|
|
377 |
# FIXME |
378 |
} |
379 |
}else{ |
376 |
}else{ |
380 |
# we create a new basketgroup (whith a closed basket) |
377 |
# we create a new basketgroup |
381 |
$basketgroup = { |
378 |
$basketgroup = { |
382 |
name => $basketgroupname, |
379 |
name => $basketgroupname, |
383 |
booksellerid => $booksellerid, |
380 |
booksellerid => $booksellerid, |