Bug 7678: Adds extended patron attributes in patron reports
authorJulian Maurice <julian.maurice@biblibre.com>
Mon, 10 Dec 2012 11:23:09 +0000 (12:23 +0100)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Tue, 22 Jan 2013 23:35:07 +0000 (18:35 -0500)
Fix bug that prevented zero values to be shown in the results.

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Fixes the problem with differentiating 0 and NULL values.
Passes all tests.
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
reports/borrowers_stats.pl

index eca9b3a..9454fc5 100755 (executable)
@@ -354,7 +354,7 @@ sub calculate {
     $sth2->execute(@strparams2);
        while (my ($celvalue) = $sth2->fetchrow) {
                my %cell;
-               if ($celvalue) {
+             if (defined $celvalue) {
                        $cell{coltitle} = $celvalue;
                        # $cell{coltitle_display} = ($colfield eq 'branchcode') ? $branches->{$celvalue}->{branchname} : $celvalue;
                        $cell{coltitle_display} = $cathash{$celvalue} if ($column eq 'categorycode');