Browse Source

Fixing Bug : Not Opening the spreadsheet manager software on file exports.

3.0.x
hdl 18 years ago
parent
commit
397688c20e
  1. 6
      reports/acquisitions_stats.pl
  2. 6
      reports/borrowers_stats.pl
  3. 6
      reports/catalogue_stats.pl
  4. 18
      reports/issues_stats.pl

6
reports/acquisitions_stats.pl

@ -71,7 +71,9 @@ if ($do_it) {
output_html_with_http_headers $input, $cookie, $template->output;
exit(1);
} else {
print $input->header(-type => 'application/vnd.sun.xml.calc', -name=>"$basename.csv" );
print $input->header(-type => 'application/vnd.sun.xml.calc',
-attachment=>"$basename.csv",
-name=>"$basename.csv" );
my $cols = @$results[0]->{loopcol};
my $lines = @$results[0]->{looprow};
my $sep;
@ -80,7 +82,7 @@ if ($do_it) {
foreach my $col ( @$cols ) {
print $col->{coltitle}.$sep;
}
print "\n";
print "Total\n";
foreach my $line ( @$lines ) {
my $x = $line->{loopcell};
print $line->{rowtitle}.$sep;

6
reports/borrowers_stats.pl

@ -70,7 +70,9 @@ if ($do_it) {
output_html_with_http_headers $input, $cookie, $template->output;
exit(1);
} else {
print $input->header(-type => 'application/vnd.sun.xml.calc', -name=>"$basename.csv" );
print $input->header(-type => 'application/vnd.sun.xml.calc',
-name=>"$basename.csv",
-attachment=>"$basename.csv");
my $cols = @$results[0]->{loopcol};
my $lines = @$results[0]->{looprow};
my $sep;
@ -79,7 +81,7 @@ if ($do_it) {
foreach my $col ( @$cols ) {
print $col->{coltitle}.$sep;
}
print "\n";
print "Total\n";
foreach my $line ( @$lines ) {
my $x = $line->{loopcell};
print $line->{rowtitle}.$sep;

6
reports/catalogue_stats.pl

@ -71,7 +71,9 @@ if ($do_it) {
output_html_with_http_headers $input, $cookie, $template->output;
exit(1);
} else {
print $input->header(-type => 'application/vnd.sun.xml.calc', -name=>"$basename.csv" );
print $input->header(-type => 'application/vnd.sun.xml.calc',
-attachment=>"$basename.csv",
-name=>"$basename.csv" );
my $cols = @$results[0]->{loopcol};
my $lines = @$results[0]->{looprow};
my $sep;
@ -80,7 +82,7 @@ if ($do_it) {
foreach my $col ( @$cols ) {
print $col->{coltitle}.$sep;
}
print "\n";
print "Total\n";
foreach my $line ( @$lines ) {
my $x = $line->{loopcell};
print $line->{rowtitle}.$sep;

18
reports/issues_stats.pl

@ -76,11 +76,9 @@ if ($do_it) {
exit(1);
} else {
# Printing to a csv file
print $input->header(-type => 'application/vnd.ms-excel',
-disposition=>'inline',
# -title=>"$basename.csv",
# -file=>"$basename.csv",
-filename=>"$basename.csv" );
print $input->header(-type => 'application/vnd.sun.xml.calc',
-attachment=>"$basename.csv",
-filename=>"$basename.csv" );
my $cols = @$results[0]->{loopcol};
my $lines = @$results[0]->{looprow};
my $sep;
@ -91,7 +89,7 @@ if ($do_it) {
foreach my $col ( @$cols ) {
print $col->{coltitle}.$sep;
}
print "\n";
print "Total\n";
# Table
foreach my $line ( @$lines ) {
my $x = $line->{loopcell};
@ -270,10 +268,10 @@ sub calculate {
push @loopfilter, \%cell;
}
}
push @loopfilter,{crit=>"Issue|Return : ",filter=>$type};
push @loopfilter,{crit=>"Display by :",filter=>$dsp} if ($dsp);
push @loopfilter,{crit=>"Select Day :",filter=>$daysel} if ($daysel);
push @loopfilter,{crit=>"Select Month :",filter=>$daysel} if ($monthsel);
push @loopfilter,{crit=>"Issue|Return ",filter=>$type};
push @loopfilter,{crit=>"Display by ",filter=>$dsp} if ($dsp);
push @loopfilter,{crit=>"Select Day ",filter=>$daysel} if ($daysel);
push @loopfilter,{crit=>"Select Month ",filter=>$daysel} if ($monthsel);
my @linefilter;

Loading…
Cancel
Save