[Bug 22038] New: When exporting account table to excel, decimal is lost
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Bug ID: 22038 Summary: When exporting account table to excel, decimal is lost Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Fines and fees Assignee: koha-bugs@lists.koha-community.org Reporter: caroline.cyr-la-rose@inlibro.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- When you want to export a patron's account lines in Excel, the decimals are lost. So instead of having a fine of 3,75, the Excel file says the fine is 375. Note that I opened the Excel file in LibreOffice Calc. I'm not sure if that affects anything. Although I also opened the file in vim and got the same result: <c r="D2" s="63"><v>375</v></c><c r="E2" s="63"><v>375</v></c> To reproduce: 1) Find a patron with small fines (my patron had 3,75) or create some manual charges 2) In the patrons file, go to the Fines tab and then the Account tab 3) At the top of the account table, click on Excel 4) Open the file 5) Notice the fines are now multiplied by 100 -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Caroline, which CurrencyFormat are you using? Does it happen with US too? -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |didier.gautheron@biblibre.c | |om --- Comment #2 from Didier Gautheron <didier.gautheron@biblibre.com> --- Hi It's a known issue with datatables.js library. cf all regular expression in koha-tmpl/intranet-tmpl/lib/datatables/datatables.js The easiest workaround would be: disable excel export if not using US CurrencyFormat. Regards Didier -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #3 from Didier Gautheron <didier.gautheron@biblibre.com> --- Created attachment 114335 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114335&action=edit 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. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |didier.gautheron@biblibre.c |ity.org |om CC| |frederic@tamil.fr Status|NEW |Needs Signoff Component|Fines and fees |I18N/L10N -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I don't feel like taking away the whole export functionality is a good solution. Especially if done for all tables and even those not containing monetary values. We just promoted the functionality to our libraries after the last update. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |oleonard@myacpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #5 from Didier Gautheron <didier.gautheron@biblibre.com> --- Created attachment 114376 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=114376&action=edit Bug 22038: Fix 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, number is 25,10 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114335|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #6 from Didier Gautheron <didier.gautheron@biblibre.com> --- (In reply to Katrin Fischer from comment #4)
I don't feel like taking away the whole export functionality is a good solution. Especially if done for all tables and even those not containing monetary values. We just promoted the functionality to our libraries after the last update.
Ok, replace , with . in excel export if syspref CurrencyFormat is FR -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Didier Gautheron <didier.gautheron@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Hakam Almotlak <hakam.almotlak@inLibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #114376|0 |1 is obsolete| | --- Comment #7 from Hakam Almotlak <hakam.almotlak@inLibro.com> --- Created attachment 122350 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=122350&action=edit Bug 22038: Fix 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, number is 25,10 Signed-off-by: hakam <hakam@inlibro.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Florian <florian.bontemps@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Florian <florian.bontemps@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #122350|0 |1 is obsolete| | --- Comment #8 from Florian <florian.bontemps@biblibre.com> --- Created attachment 128674 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=128674&action=edit Bug 22038: Fix 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, number is 25,10 Signed-off-by: hakam <hakam@inlibro.com> Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Florian <florian.bontemps@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |florian.bontemps@biblibre.c | |om --- Comment #9 from Florian <florian.bontemps@biblibre.com> --- The patch fixed the problem (and also worked for CH currency btw), but it did introduce a weird but harmless glitch : for FR and CH currency, any sum higher than 999.99 is written from the left side of their cell rather than the usual right. For reference, I used LibreOffice calculator on Linux(ubuntu). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I am testing this with LibreOffice, but all amounts export with 00.00 for FR for me :( Not sure if this is because I am running my laptop with English default language or because LibreOffice is not Excel... could someone else give this a go? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #128674|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #11 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 132301 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=132301&action=edit Bug 22038: Fix 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, number is 25,10 Signed-off-by: hakam <hakam@inlibro.com> Signed-off-by: Florian Bontemps <florian.bontemps@biblibre.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Tested with LibreOffice and MS Excel. Confirmed the problem and the patch fixes it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #13 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Katrin Fischer from comment #10)
I am testing this with LibreOffice, but all amounts export with 00.00 for FR for me :( Not sure if this is because I am running my laptop with English default language or because LibreOffice is not Excel... could someone else give this a go?
I tried on LibreOffice, Excel and Numbers (the macOS counterpart). They all put zeroes when they detect is a numeric column. With and without this patch. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |22.05.00 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Passed QA |Pushed to master --- Comment #15 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to master for 22.05, thanks to everybody involved 🦄 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22038 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com Status|Pushed to master |Pushed to stable Version(s)|22.05.00 |22.05.00,21.11.05 released in| | --- Comment #16 from Kyle M Hall <kyle@bywatersolutions.com> --- Pushed to 21.11.x for 21.11.05 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org