Lines 296-309
sub printbasketgrouppdf{
Link Here
|
296 |
my $op = $input->param('op') || 'display'; |
296 |
my $op = $input->param('op') || 'display'; |
297 |
# possible values of $op : |
297 |
# possible values of $op : |
298 |
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup |
298 |
# - add : adds a new basketgroup, or edit an open basketgroup, or display a closed basketgroup |
299 |
# - mod_basket : modify an individual basket of the basketgroup |
299 |
# - mod_basket : puts a basket in the basketgroup and redirect to basket page (called from basket page) |
300 |
# - validate : FIXME dead code |
300 |
# - validate : FIXME dead code |
301 |
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list |
301 |
# - closeandprint : close and print an closed basketgroup in pdf. called by clicking on "Close and print" button in closed basketgroups list |
302 |
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list |
302 |
# - print : print a closed basketgroup. called by clicking on "Print" button in closed basketgroups list |
303 |
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list |
303 |
# - export : export in CSV a closed basketgroup. called by clicking on "Export" button in closed basketgroups list |
304 |
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list |
304 |
# - delete : delete an open basketgroup. called by clicking on "Delete" button in open basketgroups list |
305 |
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list |
305 |
# - reopen : reopen a closed basketgroup. called by clicking on "Reopen" button in closed basketgroup list |
306 |
# - attachbasket : save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page |
306 |
# - save : saves a modified or newly created basketgroup |
307 |
# - display : display the list of all basketgroups for a vendor |
307 |
# - display : display the list of all basketgroups for a vendor |
308 |
my $booksellerid = $input->param('booksellerid'); |
308 |
my $booksellerid = $input->param('booksellerid'); |
309 |
$template->param(booksellerid => $booksellerid); |
309 |
$template->param(booksellerid => $booksellerid); |
Lines 380-386
if ( $op eq "add" ) {
Link Here
|
380 |
displaybasketgroups($basketgroups, $bookseller, $baskets); |
380 |
displaybasketgroups($basketgroups, $bookseller, $baskets); |
381 |
} elsif ($op eq 'mod_basket') { |
381 |
} elsif ($op eq 'mod_basket') { |
382 |
# |
382 |
# |
383 |
# edit an individual basket contained in this basketgroup |
383 |
# put a basket in the basketgroup and redirect to basket page (called from basket page) |
384 |
# |
384 |
# |
385 |
my $basketno=$input->param('basketno'); |
385 |
my $basketno=$input->param('basketno'); |
386 |
my $basketgroupid=$input->param('basketgroupid'); |
386 |
my $basketgroupid=$input->param('basketgroupid'); |
Lines 470-478
if ( $op eq "add" ) {
Link Here
|
470 |
ReOpenBasketgroup($basketgroupid); |
470 |
ReOpenBasketgroup($basketgroupid); |
471 |
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'; |
471 |
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'; |
472 |
print $input->redirect($redirectpath); |
472 |
print $input->redirect($redirectpath); |
473 |
} elsif ( $op eq 'attachbasket') { |
473 |
} elsif ( $op eq 'save') { |
474 |
# |
474 |
# |
475 |
# save a modified basketgroup, or creates a new basketgroup when a basket is closed. called from basket page |
475 |
# saves a modified or newly created basketgroup |
476 |
# |
476 |
# |
477 |
# Getting parameters |
477 |
# Getting parameters |
478 |
my $basketgroup = {}; |
478 |
my $basketgroup = {}; |
Lines 498-508
if ( $op eq "add" ) {
Link Here
|
498 |
closed => $closedbg, |
498 |
closed => $closedbg, |
499 |
}; |
499 |
}; |
500 |
ModBasketgroup($basketgroup); |
500 |
ModBasketgroup($basketgroup); |
501 |
if($closedbg){ |
|
|
502 |
# FIXME |
503 |
} |
504 |
}else{ |
501 |
}else{ |
505 |
# we create a new basketgroup (whith a closed basket) |
502 |
# we create a new basketgroup |
506 |
$basketgroup = { |
503 |
$basketgroup = { |
507 |
name => $basketgroupname, |
504 |
name => $basketgroupname, |
508 |
booksellerid => $booksellerid, |
505 |
booksellerid => $booksellerid, |