Lines 273-278
if ( $op eq "add" ) {
Link Here
|
273 |
my $basketgroupid = $input->param('basketgroupid'); |
273 |
my $basketgroupid = $input->param('basketgroupid'); |
274 |
my $billingplace; |
274 |
my $billingplace; |
275 |
my $deliveryplace; |
275 |
my $deliveryplace; |
|
|
276 |
my $freedeliveryplace; |
276 |
if ( $basketgroupid ) { |
277 |
if ( $basketgroupid ) { |
277 |
# Get the selected baskets in the basketgroup to display them |
278 |
# Get the selected baskets in the basketgroup to display them |
278 |
my $selecteds = GetBasketsByBasketgroup($basketgroupid); |
279 |
my $selecteds = GetBasketsByBasketgroup($basketgroupid); |
Lines 287-295
if ( $op eq "add" ) {
Link Here
|
287 |
$template->param( |
288 |
$template->param( |
288 |
name => $basketgroup->{name}, |
289 |
name => $basketgroup->{name}, |
289 |
deliverycomment => $basketgroup->{deliverycomment}, |
290 |
deliverycomment => $basketgroup->{deliverycomment}, |
|
|
291 |
freedeliveryplace => $basketgroup->{freedeliveryplace}, |
290 |
); |
292 |
); |
291 |
$billingplace = $basketgroup->{billingplace}; |
293 |
$billingplace = $basketgroup->{billingplace}; |
292 |
$deliveryplace = $basketgroup->{deliveryplace}; |
294 |
$deliveryplace = $basketgroup->{deliveryplace}; |
|
|
295 |
$freedeliveryplace = $basketgroup->{freedeliveryplace}; |
293 |
} |
296 |
} |
294 |
|
297 |
|
295 |
# determine default billing and delivery places depending on librarian homebranch and existing basketgroup data |
298 |
# determine default billing and delivery places depending on librarian homebranch and existing basketgroup data |
Lines 405-429
if ( $op eq "add" ) {
Link Here
|
405 |
} elsif ( $op eq 'attachbasket') { |
408 |
} elsif ( $op eq 'attachbasket') { |
406 |
|
409 |
|
407 |
# Getting parameters |
410 |
# Getting parameters |
408 |
my $basketgroup = {}; |
411 |
my $basketgroup = {}; |
409 |
my @baskets = $input->param('basket'); |
412 |
my @baskets = $input->param('basket'); |
410 |
my $basketgroupid = $input->param('basketgroupid'); |
413 |
my $basketgroupid = $input->param('basketgroupid'); |
411 |
my $basketgroupname = $input->param('basketgroupname'); |
414 |
my $basketgroupname = $input->param('basketgroupname'); |
412 |
my $booksellerid = $input->param('booksellerid'); |
415 |
my $booksellerid = $input->param('booksellerid'); |
413 |
my $billingplace = $input->param('billingplace'); |
416 |
my $billingplace = $input->param('billingplace'); |
414 |
my $deliveryplace = $input->param('deliveryplace'); |
417 |
my $deliveryplace = $input->param('deliveryplace'); |
415 |
my $deliverycomment = $input->param('deliverycomment'); |
418 |
my $freedeliveryplace = $input->param('freedeliveryplace'); |
416 |
my $close = $input->param('close') ? 1 : 0; |
419 |
my $deliverycomment = $input->param('deliverycomment'); |
|
|
420 |
my $close = $input->param('close') ? 1 : 0; |
417 |
# If we got a basketgroupname, we create a basketgroup |
421 |
# If we got a basketgroupname, we create a basketgroup |
418 |
if ($basketgroupid) { |
422 |
if ($basketgroupid) { |
419 |
$basketgroup = { |
423 |
$basketgroup = { |
420 |
name => $basketgroupname, |
424 |
name => $basketgroupname, |
421 |
id => $basketgroupid, |
425 |
id => $basketgroupid, |
422 |
basketlist => \@baskets, |
426 |
basketlist => \@baskets, |
423 |
billingplace => $billingplace, |
427 |
billingplace => $billingplace, |
424 |
deliveryplace => $deliveryplace, |
428 |
deliveryplace => $deliveryplace, |
425 |
deliverycomment => $deliverycomment, |
429 |
freedeliveryplace => $freedeliveryplace, |
426 |
closed => $close, |
430 |
deliverycomment => $deliverycomment, |
|
|
431 |
closed => $close, |
427 |
}; |
432 |
}; |
428 |
ModBasketgroup($basketgroup); |
433 |
ModBasketgroup($basketgroup); |
429 |
if($close){ |
434 |
if($close){ |
Lines 431-442
if ( $op eq "add" ) {
Link Here
|
431 |
} |
436 |
} |
432 |
}else{ |
437 |
}else{ |
433 |
$basketgroup = { |
438 |
$basketgroup = { |
434 |
name => $basketgroupname, |
439 |
name => $basketgroupname, |
435 |
booksellerid => $booksellerid, |
440 |
booksellerid => $booksellerid, |
436 |
basketlist => \@baskets, |
441 |
basketlist => \@baskets, |
437 |
deliveryplace => $deliveryplace, |
442 |
deliveryplace => $deliveryplace, |
438 |
deliverycomment => $deliverycomment, |
443 |
freedeliveryplace => $freedeliveryplace, |
439 |
closed => $close, |
444 |
deliverycomment => $deliverycomment, |
|
|
445 |
closed => $close, |
440 |
}; |
446 |
}; |
441 |
$basketgroupid = NewBasketgroup($basketgroup); |
447 |
$basketgroupid = NewBasketgroup($basketgroup); |
442 |
} |
448 |
} |