[% USE KohaDates %]
+[% USE Price %]
+[% USE ItemTypes %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
-[% INCLUDE 'datatables-strings.inc' %]
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
<script type="text/javascript" id="js">
$(document).ready(function() {
[% END %]
</td>
<td>[% loopresul.note %]</td>
- <td style="text-align:right;">[% loopresul.amount %]</td>
+ <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber %]">[% loopresul.title %]</a></td>
<td>[% loopresul.barcode %]</td>
- <td>[% loopresul.itype %]</td>
+ <td>[% ItemTypes.GetDescription(loopresul.itype) %]</td>
</tr>
[% END %]
<tfoot>
my $reportfilename = $reportname ? "$reportname.$format" : "reportresults.$format" ;
#my $reportfilename = "$reportname.html" ;
my $delimiter = C4::Context->preference('delimiter') || ',';
- my ( $type, $content );
+ my ( $content );
if ( $format eq 'csv' ) {
- my $type = 'application/csv';
my $csv = Text::CSV::Encoded->new({ encoding_out => 'UTF-8', sep_char => $delimiter});
$csv or die "Text::CSV::Encoded->new({binary => 1}) FAILED: " . Text::CSV::Encoded->error_diag();
my @headers = ();
$row->{accounttype},
$row->{amount},
$row->{title},
- $row->{barcode};
+ $row->{barcode},
$row->{itype};
if ($csv->combine(@rowValues)) {
$content .= Encode::decode('UTF-8',$csv->string()) . "\n";
}
}
print $input->header(
- -type => $type,
+ -type => 'text/csv',
-attachment=> $reportfilename
);
print $content;