use C4::Auth;
use CGI;
use C4::Context;
-
+use C4::Reports;
use C4::Output;
use C4::Koha;
use C4::Circulation;
my $output = $input->param("output");
my $basename = $input->param("basename");
my $mime = $input->param("MIME");
-my $del = $input->param("sep");
#warn "calcul : ".$calc;
my ($template, $borrowernumber, $cookie)
flagsrequired => {reports => 1},
debug => 1,
});
+our $sep = $input->param("sep");
+$sep = "\t" if ($sep eq 'tabulation');
$template->param(do_it => $do_it,
DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
);
);
my $cols = @$results[0]->{loopcol};
my $lines = @$results[0]->{looprow};
- my $sep;
- $sep = C4::Context->preference("delimiter");
print @$results[0]->{line} . "/" . @$results[0]->{column} . $sep;
foreach my $col (@$cols) {
print $col->{coltitle} . $sep;
-multiple => 0
);
- my @dels = ( C4::Context->preference("delimiter") );
- my $CGIsepChoice = CGI::scrolling_list(
- -name => 'sep',
- -id => 'sep',
- -values => \@dels,
- -size => 1,
- -multiple => 0
- );
+ my $CGIsepChoice = GetDelimiterChoices;
$template->param(
CGIBookSeller => $CGIBookSellers,
$colfield .= "Year($column)";
}
- elsif ( ( $column =~ /deliverydate/ ) and ( $rodsp == 1 ) ) {
+ elsif ( ( $column =~ /received/ ) and ( $rodsp == 1 ) ) {
#Display by day
$colfield .= "dayname($column)";
}
- elsif ( ( $column =~ /deliverydate/ ) and ( $rodsp == 2 ) ) {
+ elsif ( ( $column =~ /received/ ) and ( $rodsp == 2 ) ) {
#Display by Month
$colfield .= "monthname($column)";
}
- elsif ( ( $column =~ /deliverydate/ ) and ( $rodsp == 3 ) ) {
+ elsif ( ( $column =~ /received/ ) and ( $rodsp == 3 ) ) {
#Display by Year
$colfield .= "Year($column)";
while ( my ( $row, $col, $value ) = $dbcalc->fetchrow ) {
next if ($row eq undef || $col eq undef);
#warn "filling table $row / $col / $value ";
- $emptycol = 1 if ( $col eq undef );
- $col = "zzEMPTY" if ( $col eq undef );
- $row = "zzEMPTY" if ( $row eq undef );
+ $emptycol = 1 if ( !defined($col) );
+ $col = "zzEMPTY" if ( !defined($col) );
+ $row = "zzEMPTY" if ( !defined($row) );
$table{$row}->{$col} += $value;
$table{$row}->{totalrow} += $value;