Bug 12448: Follow-up: Only ask confirmation when rental charge > 0
[koha.git] / reports / catalogue_stats.pl
index 6c368f0..a19334a 100755 (executable)
@@ -19,7 +19,7 @@
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
 use strict;
-# use warnings;  # FIXME
+#use warnings; FIXME - Bug 2505
 use C4::Auth;
 use CGI;
 use C4::Context;
@@ -41,7 +41,7 @@ plugin that shows a stats on borrowers
 
 our $debug = 0;
 my $input = new CGI;
-my $fullreportname = "reports/catalogue_stats.tmpl";
+my $fullreportname = "reports/catalogue_stats.tt";
 my $do_it       = $input->param('do_it');
 my $line        = $input->param("Line");
 my $column      = $input->param("Column");
@@ -51,7 +51,6 @@ my $lccndigits  = $input->param("lccndigits");
 my $cotedigits  = $input->param("cotedigits");
 my $output      = $input->param("output");
 my $basename    = $input->param("basename");
-my $mime        = $input->param("MIME");
 our $sep        = $input->param("sep");
 $sep = "\t" if ($sep eq 'tabulation');
 my $item_itype;
@@ -75,7 +74,7 @@ if ($do_it) {
        if ($output eq "screen"){
                $template->param(mainloop => $results);
                output_html_with_http_headers $input, $cookie, $template->output;
-               exit(1);
+               exit;
        } else {
                print $input->header(-type => 'application/vnd.sun.xml.calc',
                                      -encoding    => 'utf-8',
@@ -103,7 +102,7 @@ if ($do_it) {
                        print $sep.$col->{totalcol};
                }
                print $sep.@$results[0]->{total};
-               exit(1);
+               exit;
        }
 } else {
        my $dbh = C4::Context->dbh;
@@ -131,11 +130,9 @@ if ($do_it) {
 #              $count++ if (($value) and (! $haslccn));
 #              push @select, $value;
 #      }
-#      my $CGIlccn=CGI::scrolling_list( -name     => 'Filter',
-#                              -id => 'Filter',
-#                              -values   => \@select,
-#                              -size     => 1,
-#                              -multiple => 0 );
+#   my $CGIlccn = {
+#       values   => \@select,
+#   };
 
 # No need to test for data here.  If you don't have itemcallnumbers, you probably know it.
 # FIXME: Hardcoding to 5 chars on itemcallnum. 
@@ -159,7 +156,7 @@ if ($do_it) {
                push @locations, { code => $_, description => "$_ - " . $locations->{$_} };
        }
        
-       my @mime  = ( map { +{type =>$_} } (split /[;:]/,C4::Context->preference("MIME")) );
+       my @mime  = ( map { +{type =>$_} } (split /[;:]/, 'CSV') ); # FIXME translation
        
        $template->param(hasdewey=>$hasdewey,
                                        haslccn   => $haslccn,