Bug 6934: fix problem when export it open in LibreOffice - show values of itype and use TT plugin
Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
f4ef34c136
commit
385563ca48
|
|
@ -1,10 +1,11 @@
|
|||
[% 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() {
|
||||
|
|
@ -276,10 +277,10 @@ $(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>
|
||||
|
|
|
|||
|
|
@ -144,9 +144,8 @@ if ($do_it) {
|
|||
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 = ();
|
||||
|
|
@ -175,7 +174,7 @@ if ($do_it) {
|
|||
$row->{accounttype},
|
||||
$row->{amount},
|
||||
$row->{title},
|
||||
$row->{barcode};
|
||||
$row->{barcode},
|
||||
$row->{itype};
|
||||
if ($csv->combine(@rowValues)) {
|
||||
$content .= Encode::decode('UTF-8',$csv->string()) . "\n";
|
||||
|
|
@ -185,7 +184,7 @@ if ($do_it) {
|
|||
}
|
||||
}
|
||||
print $input->header(
|
||||
-type => $type,
|
||||
-type => 'text/csv',
|
||||
-attachment=> $reportfilename
|
||||
);
|
||||
print $content;
|
||||
|
|
|
|||
Loading…
Reference in New Issue