|
Lines 194-199
sub calculate {
Link Here
|
| 194 |
my $barcodelike = @$filters[13]; |
194 |
my $barcodelike = @$filters[13]; |
| 195 |
my $barcodefilter = @$filters[14]; |
195 |
my $barcodefilter = @$filters[14]; |
| 196 |
my $not; |
196 |
my $not; |
|
|
197 |
my $colors = get_colors(); |
| 197 |
|
198 |
|
| 198 |
# extract parameters |
199 |
# extract parameters |
| 199 |
my $dbh = C4::Context->dbh; |
200 |
my $dbh = C4::Context->dbh; |
|
Lines 493-499
if($barcodefilter){
Link Here
|
| 493 |
# my %cell; |
494 |
# my %cell; |
| 494 |
# %cell = {coltitle => "zzEMPTY"}; |
495 |
# %cell = {coltitle => "zzEMPTY"}; |
| 495 |
push @loopcol,{coltitle => "NULL"} if ($emptycol); |
496 |
push @loopcol,{coltitle => "NULL"} if ($emptycol); |
| 496 |
|
497 |
|
|
|
498 |
my $loopcount = '0'; |
| 497 |
foreach my $row ( sort keys %table ) { |
499 |
foreach my $row ( sort keys %table ) { |
| 498 |
my @loopcell; |
500 |
my @loopcell; |
| 499 |
#@loopcol ensures the order for columns is common with column titles |
501 |
#@loopcol ensures the order for columns is common with column titles |
|
Lines 505-512
if($barcodefilter){
Link Here
|
| 505 |
push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row, |
507 |
push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row, |
| 506 |
'loopcell' => \@loopcell, |
508 |
'loopcell' => \@loopcell, |
| 507 |
'hilighted' => ($hilighted *= -1 > 0), |
509 |
'hilighted' => ($hilighted *= -1 > 0), |
| 508 |
'totalrow' => $table{$row}->{totalrow} |
510 |
'totalrow' => $table{$row}->{totalrow}, |
|
|
511 |
'fill' => ${$colors}[$loopcount]->{fill}, |
| 512 |
'stroke' => ${$colors}[$loopcount]->{stroke}, |
| 513 |
'point' => ${$colors}[$loopcount]->{point}, |
| 514 |
'highlight' => ${$colors}[$loopcount]->{highlight}, |
| 515 |
|
| 509 |
}; |
516 |
}; |
|
|
517 |
$loopcount++; |
| 518 |
if ( $loopcount == '6' ) { |
| 519 |
$loopcount = '0'; |
| 520 |
} |
| 510 |
} |
521 |
} |
| 511 |
|
522 |
|
| 512 |
# warn "footer processing"; |
523 |
# warn "footer processing"; |
|
Lines 535-538
if($barcodefilter){
Link Here
|
| 535 |
return \@mainloop; |
546 |
return \@mainloop; |
| 536 |
} |
547 |
} |
| 537 |
|
548 |
|
|
|
549 |
sub get_colors { |
| 550 |
my $colors = [ |
| 551 |
{ |
| 552 |
fill => "rgba(151,187,205,0.2)", |
| 553 |
stroke => "rgba(151,187,205,1)", |
| 554 |
point => "rgba(151,187,205,1)", |
| 555 |
highlight => "rgba(151,187,205,1)", |
| 556 |
}, |
| 557 |
{ |
| 558 |
fill => "rgba(216,191,216,0.2)", |
| 559 |
stroke => "rgba(216,191,216,1)", |
| 560 |
point => "rgba(216,191,216,1)", |
| 561 |
highlight => "rgba(216,191,216,1)", |
| 562 |
}, |
| 563 |
{ |
| 564 |
fill => "rgba(240,128,128,0.2)", |
| 565 |
stroke => "rgba(240,128,128,1)", |
| 566 |
point => "rgba(240,128,128,1)", |
| 567 |
highlight => "rgba(240,128,128,1)", |
| 568 |
}, |
| 569 |
{ |
| 570 |
fill => "rgba(240,230,140,0.2)", |
| 571 |
stroke => "rgba(240,230,140,1)", |
| 572 |
point => "rgba(240,230,140,1)", |
| 573 |
highlight => "rgba(240,230,140,1)", |
| 574 |
}, |
| 575 |
{ |
| 576 |
fill => "rgba(152,251,152,0.2)", |
| 577 |
stroke => "rgba(152,251,152,1)", |
| 578 |
point => "rgba(152,251,152,1)", |
| 579 |
highlight => "rgba(152,251,152,1)", |
| 580 |
}, |
| 581 |
{ |
| 582 |
fill => "rgba(216,191,216,0.2)", |
| 583 |
stroke => "rgba(216,191,216,1)", |
| 584 |
point => "rgba(216,191,216,1)", |
| 585 |
highlight => "rgba(216,191,216,1)", |
| 586 |
}, |
| 587 |
]; |
| 588 |
|
| 589 |
return $colors; |
| 590 |
} |
| 591 |
|
| 538 |
1; |
592 |
1; |
| 539 |
- |
|
|