Bug 18734 - Internal server error in cash_register_stats.pl when exporting to file

To test:
Output cash reigster stats report to file
Internal server error
Apply patch
Export to file
File is generated and correctly formed

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Nick Clemens 2017-06-09 10:17:25 -04:00 committed by Jonathan Druart
parent a38ffe2d48
commit 855ff0fb9a
3 changed files with 3 additions and 3 deletions

View file

@ -1 +1 @@
mfirstname[% sep %]card number[% sep %]firstname[% sep %]branchname[% sep %]date[% sep %]accounttype[% sep %]amount[% sep %]title[% sep %]barcode[% sep %]"itype"
mfirstname[% sep %]card number[% sep %]firstname[% sep %]branchname[% sep %]date[% sep %]accounttype[% sep %]amount[% sep %]title[% sep %]barcode[% sep %]itype

View file

@ -1,5 +1,5 @@
[% USE ItemTypes %]
[% INCLUDE csv_headers/reports/cash_register_stats.tt %]
[%- INCLUDE csv_headers/reports/cash_register_stats.tt %]
[%- FOREACH row IN rows %]
[%- FOREACH field IN row;
field IF !loop.last;

View file

@ -169,7 +169,7 @@ if ($do_it) {
my $csvTemplate = C4::Templates::gettemplate('reports/csv/cash_register_stats.tt', 'intranet', $input);
$csvTemplate->param(sep => $delimiter, rows => \@rows, total => \@total );
print $csvTemplate->output;
exit(1);
exit;
}
}