Bugzilla – Attachment 114335 Details for
Bug 22038
When exporting account table to excel, decimal is lost
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 22038: Disable excel export if CurrencyFormat is FR
Bug-22038-Disable-excel-export-if-CurrencyFormat-i.patch (text/plain), 2.17 KB, created by
Didier Gautheron
on 2020-12-11 11:17:36 UTC
(
hide
)
Description:
Bug 22038: Disable excel export if CurrencyFormat is FR
Filename:
MIME Type:
Creator:
Didier Gautheron
Created:
2020-12-11 11:17:36 UTC
Size:
2.17 KB
patch
obsolete
>From b5868821ac4157955881975d31be501d6e556f09 Mon Sep 17 00:00:00 2001 >From: Didier Gautheron <didier.gautheron@biblibre.com> >Date: Fri, 11 Dec 2020 10:46:04 +0100 >Subject: [PATCH] Bug 22038: Disable excel export if CurrencyFormat is FR > >DataTables excel export is broken if number decimal separator is a comma. > >Test plan: >1 - Set syspref CurrencyFormat to US >2 - Export as excel a table with decimal numbers, patrons list with fines >for example. >3 - Open in libreoffice or excel, numbers are ok. >4 - Set syspref CurrencyFormat to FR >5 - Export and open again, number are wrong 25,10 is imported as 2510 >6 - Apply patch >7 - Redo 1 to 4 >8 - Excel export is not available with FR. >--- > .../prog/en/includes/columns_settings.inc | 21 +++++++++++++-------- > 1 file changed, 13 insertions(+), 8 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >index 9a5eb315f5..2287e66f34 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/columns_settings.inc >@@ -1,3 +1,4 @@ >+[% USE Koha %] > [% USE TablesSettings %] > <!-- columns_settings.inc --> > >@@ -43,14 +44,6 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > > var export_buttons = [ > { >- extend: 'excelHtml5', >- text: _("Excel"), >- exportOptions: { >- columns: exportColumns, >- format: export_format >- }, >- }, >- { > extend: 'csvHtml5', > text: _("CSV"), > exportOptions: { >@@ -75,6 +68,18 @@ function KohaTable(id_selector, dt_parameters, columns_settings, add_filters) { > }, > } > ]; >+ [% IF Koha.Preference("CurrencyFormat") != 'FR' %] >+ export_buttons.unshift ( >+ { >+ extend: 'excelHtml5', >+ text: _("Excel"), >+ exportOptions: { >+ columns: exportColumns, >+ format: export_format >+ }, >+ } >+ ) >+ [% END %] > > dt_parameters[ "buttons" ] = [ > { >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 22038
:
114335
|
114376
|
122350
|
128674
|
132301