[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Koha-cvs] CVS: koha/reports catalogue_stats.pl,1.7,1.8
From: |
Henri-Damien LAURENT |
Subject: |
[Koha-cvs] CVS: koha/reports catalogue_stats.pl,1.7,1.8 |
Date: |
Tue, 08 Mar 2005 10:14:43 -0800 |
Update of /cvsroot/koha/koha/reports
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13140/reports
Modified Files:
catalogue_stats.pl
Log Message:
including Null Values and improving result display
Index: catalogue_stats.pl
===================================================================
RCS file: /cvsroot/koha/koha/reports/catalogue_stats.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -r1.7 -r1.8
*** catalogue_stats.pl 8 Mar 2005 16:31:43 -0000 1.7
--- catalogue_stats.pl 8 Mar 2005 18:14:40 -0000 1.8
***************
*** 584,590 ****
while (my ($row, $col, $value) = $dbcalc->fetchrow) {
# warn "filling table $row / $col / $value ";
- $row = "zzEMPTY" if ($row eq undef);
- $col = "zzEMPTY" if ($col eq undef);
$emptycol = 1 if ($col eq undef);
$table{$row}->{$col}+=$value;
--- 584,590 ----
while (my ($row, $col, $value) = $dbcalc->fetchrow) {
# warn "filling table $row / $col / $value ";
$emptycol = 1 if ($col eq undef);
+ $col = "zzEMPTY" if ($col eq undef);
+ $row = "zzEMPTY" if ($row eq undef);
$table{$row}->{$col}+=$value;
***************
*** 598,602 ****
# my %cell;
# %cell = {coltitle => "zzEMPTY"};
! push @loopcol,{coltitle => "zzEMPTY"} if ($emptycol);
foreach my $row ( sort keys %table ) {
--- 598,602 ----
# my %cell;
# %cell = {coltitle => "zzEMPTY"};
! push @loopcol,{coltitle => "NULL"} if ($emptycol);
foreach my $row ( sort keys %table ) {
***************
*** 605,613 ****
# and the number matches the number of columns
foreach my $col ( @loopcol ) {
! push @loopcell, {value =>
$table{$row}->{$col->{coltitle}}} ;
}
! push @looprow,{ 'rowtitle' => $row,
'loopcell' => address@hidden,
! 'hilighted' => 1 ,
'totalrow' =>
$table{$row}->{totalrow}
};
--- 605,614 ----
# and the number matches the number of columns
foreach my $col ( @loopcol ) {
! my $value =$table{$row}->{($col->{coltitle} eq
"NULL")?"zzEMPTY":$col->{coltitle}};
! push @loopcell, {value => ($value)?$value:"" } ;
}
! push @looprow,{ 'rowtitle' => ($row eq "zzEMPTY")?"NULL":$row,
'loopcell' => address@hidden,
! 'hilighted' => ($hilighted >0),
'totalrow' =>
$table{$row}->{totalrow}
};
***************
*** 619,623 ****
my $total=0;
foreach my $row ( @looprow ) {
! $total += $table{$row->{rowtitle}}->{$col->{coltitle}};
# warn "value added
".$table{$row->{rowtitle}}->{$col->{coltitle}}. "for line ".$row->{rowtitle};
}
--- 620,624 ----
my $total=0;
foreach my $row ( @looprow ) {
! $total += $table{($row->{rowtitle} eq
"NULL")?"zzEMPTY":$row->{rowtitle}}->{($col->{coltitle} eq
"NULL")?"zzEMPTY":$col->{coltitle}};
# warn "value added
".$table{$row->{rowtitle}}->{$col->{coltitle}}. "for line ".$row->{rowtitle};
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Koha-cvs] CVS: koha/reports catalogue_stats.pl,1.7,1.8,
Henri-Damien LAURENT <=