Bug fixing :
authorhdl <hdl>
Tue, 2 Aug 2005 15:49:25 +0000 (15:49 +0000)
committerhdl <hdl>
Tue, 2 Aug 2005 15:49:25 +0000 (15:49 +0000)
Using holdingbranch and not Location to locate an item.

koha-tmpl/intranet-tmpl/default/en/reports/catalogue_stats.tmpl
reports/catalogue_stats.pl

index d5c38ee..1e4bf1e 100644 (file)
                        </tr>
                        <!--TMPL_IF Name="hglghtLOC"--><tr class="hilighted"> <!--TMPL_ELSE --><tr><!--/TMPL_IF-->
                                <td>Location</td>
-                               <td align="center"><input type="radio" name="Line" value="items.location"></td>
-                               <td align="center"><input type="radio" name="Column" value="items.location"></td>
+                               <td align="center"><input type="radio" name="Line" value="items.holdingbranch"></td>
+                               <td align="center"><input type="radio" name="Column" value="items.holdingbranch"></td>
                                <td><!-- TMPL_VAR NAME="CGILocation" --> </td>
                        </tr>
                </tbody>
index 432e50b..7d3f90c 100755 (executable)
@@ -216,12 +216,12 @@ if ($do_it) {
                                -size     => 1,
                                -multiple => 0 );
        
-       $req = $dbh->prepare("select distinctrow location from items order by location");
+       $req = $dbh->prepare("select distinctrow holdingbranch from items order by holdingbranch");
        $req->execute;
        undef @select;
        push @select,"";
-       my $CGIlocation=CGI::scrolling_list( -name     => 'Filter',
-                               -id => 'location',
+       my $CGIholdingbranch=CGI::scrolling_list( -name     => 'Filter',
+                               -id => 'holdingbranch',
                                -values   => \@select,
                                -size     => 1,
                                -multiple => 0 );
@@ -267,7 +267,7 @@ if ($do_it) {
 #                                      CGIToPublicationYear => $CGIpublicationyear,
 #                                      CGIPublisher => $CGIpublisher,
                                        CGIBranch => $CGIbranch,
-                                       CGILocation => $CGIlocation,
+                                       CGILocation => $CGIholdingbranch,
                                        CGIextChoice => $CGIextChoice,
                                        CGIsepChoice => $CGIsepChoice
                                        );
@@ -333,7 +333,7 @@ sub calculate {
        $linefilter[0] = @$filters[8] if ($line =~ /publicationyear/ ) ;
        $linefilter[1] = @$filters[9] if ($line =~ /publicationyear/ ) ;
        @linefilter[0] = @$filters[10] if ($line =~ /items.homebranch/ ) ;
-       @linefilter[0] = @$filters[11] if ($line =~ /items.location/ ) ;
+       @linefilter[0] = @$filters[11] if ($line =~ /items.holdingbranch/ ) ;
 # 
        my @colfilter ;
        $colfilter[0] = @$filters[0] if ($column =~ /dewey/ )  ;
@@ -347,7 +347,7 @@ sub calculate {
        $colfilter[0] = @$filters[8] if ($column =~ /publicationyear/ ) ;
        $colfilter[1] = @$filters[9] if ($column =~ /publicationyear/ ) ;
        @colfilter[0] = @$filters[10] if ($column =~ /items.homebranch/ ) ;
-       @colfilter[0] = @$filters[11] if ($column =~ /items.location/ ) ;
+       @colfilter[0] = @$filters[11] if ($column =~ /items.holdingbranch/ ) ;
 
 # 1st, loop rows.
        my $linefield;
@@ -559,9 +559,9 @@ sub calculate {
        if (@$filters[11]){
                @$filters[11]=~ s/\*/%/g;
                if ($cond){
-                       $strcalc .= " AND items.location like '" . @$filters[11] ."'" if ( @$filters[11] );
+                       $strcalc .= " AND items.holdingbranch like '" . @$filters[11] ."'" if ( @$filters[11] );
                } else {
-                       $strcalc .= " WHERE items.location like '" . @$filters[11] ."'" if ( @$filters[11] );
+                       $strcalc .= " WHERE items.holdingbranch like '" . @$filters[11] ."'" if ( @$filters[11] );
                }
        }