|
Lines 188-193
sub calculate {
Link Here
|
| 188 |
my $barcodelike = @$filters[13]; |
188 |
my $barcodelike = @$filters[13]; |
| 189 |
my $barcodefilter = @$filters[14]; |
189 |
my $barcodefilter = @$filters[14]; |
| 190 |
my $not; |
190 |
my $not; |
|
|
191 |
my $colors = get_colors(); |
| 191 |
|
192 |
|
| 192 |
# extract parameters |
193 |
# extract parameters |
| 193 |
my $dbh = C4::Context->dbh; |
194 |
my $dbh = C4::Context->dbh; |
|
Lines 476-482
if($barcodefilter){
Link Here
|
| 476 |
# my %cell; |
477 |
# my %cell; |
| 477 |
# %cell = {coltitle => "zzEMPTY"}; |
478 |
# %cell = {coltitle => "zzEMPTY"}; |
| 478 |
push @loopcol,{coltitle => "NULL"} if ($emptycol); |
479 |
push @loopcol,{coltitle => "NULL"} if ($emptycol); |
| 479 |
|
480 |
|
|
|
481 |
my $loopcount = '0'; |
| 480 |
foreach my $row ( sort keys %table ) { |
482 |
foreach my $row ( sort keys %table ) { |
| 481 |
my @loopcell; |
483 |
my @loopcell; |
| 482 |
#@loopcol ensures the order for columns is common with column titles |
484 |
#@loopcol ensures the order for columns is common with column titles |
|
Lines 488-495
if($barcodefilter){
Link Here
|
| 488 |
push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row, |
490 |
push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row, |
| 489 |
'loopcell' => \@loopcell, |
491 |
'loopcell' => \@loopcell, |
| 490 |
'hilighted' => ($hilighted *= -1 > 0), |
492 |
'hilighted' => ($hilighted *= -1 > 0), |
| 491 |
'totalrow' => $table{$row}->{totalrow} |
493 |
'totalrow' => $table{$row}->{totalrow}, |
|
|
494 |
'fill' => ${$colors}[$loopcount]->{fill}, |
| 495 |
'stroke' => ${$colors}[$loopcount]->{stroke}, |
| 496 |
'point' => ${$colors}[$loopcount]->{point}, |
| 497 |
'highlight' => ${$colors}[$loopcount]->{highlight}, |
| 498 |
|
| 492 |
}; |
499 |
}; |
|
|
500 |
$loopcount++; |
| 501 |
if ( $loopcount == '6' ) { |
| 502 |
$loopcount = '0'; |
| 503 |
} |
| 493 |
} |
504 |
} |
| 494 |
|
505 |
|
| 495 |
# warn "footer processing"; |
506 |
# warn "footer processing"; |
|
Lines 518-521
if($barcodefilter){
Link Here
|
| 518 |
return \@mainloop; |
529 |
return \@mainloop; |
| 519 |
} |
530 |
} |
| 520 |
|
531 |
|
|
|
532 |
sub get_colors { |
| 533 |
my $colors = [ |
| 534 |
{ |
| 535 |
fill => "rgba(151,187,205,0.2)", |
| 536 |
stroke => "rgba(151,187,205,1)", |
| 537 |
point => "rgba(151,187,205,1)", |
| 538 |
highlight => "rgba(151,187,205,1)", |
| 539 |
}, |
| 540 |
{ |
| 541 |
fill => "rgba(216,191,216,0.2)", |
| 542 |
stroke => "rgba(216,191,216,1)", |
| 543 |
point => "rgba(216,191,216,1)", |
| 544 |
highlight => "rgba(216,191,216,1)", |
| 545 |
}, |
| 546 |
{ |
| 547 |
fill => "rgba(240,128,128,0.2)", |
| 548 |
stroke => "rgba(240,128,128,1)", |
| 549 |
point => "rgba(240,128,128,1)", |
| 550 |
highlight => "rgba(240,128,128,1)", |
| 551 |
}, |
| 552 |
{ |
| 553 |
fill => "rgba(240,230,140,0.2)", |
| 554 |
stroke => "rgba(240,230,140,1)", |
| 555 |
point => "rgba(240,230,140,1)", |
| 556 |
highlight => "rgba(240,230,140,1)", |
| 557 |
}, |
| 558 |
{ |
| 559 |
fill => "rgba(152,251,152,0.2)", |
| 560 |
stroke => "rgba(152,251,152,1)", |
| 561 |
point => "rgba(152,251,152,1)", |
| 562 |
highlight => "rgba(152,251,152,1)", |
| 563 |
}, |
| 564 |
{ |
| 565 |
fill => "rgba(216,191,216,0.2)", |
| 566 |
stroke => "rgba(216,191,216,1)", |
| 567 |
point => "rgba(216,191,216,1)", |
| 568 |
highlight => "rgba(216,191,216,1)", |
| 569 |
}, |
| 570 |
]; |
| 571 |
|
| 572 |
return $colors; |
| 573 |
} |
| 574 |
|
| 521 |
1; |
575 |
1; |
| 522 |
- |
|
|