Bug 40015 - Exporting budget to Exel has error
Summary: Exporting budget to Exel has error
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 24.05
Hardware: All All
: P3 enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-28 09:55 UTC by Päivi Knuutinen
Modified: 2025-07-28 01:50 UTC (History)
2 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Päivi Knuutinen 2025-05-28 09:55:41 UTC
When you export acquisition data to Excel, and there are negative (minus) amounts in budget, Koha adds wrong symbol (') before the amount. It's not possible to count the rows that include this symbol.
Comment 1 Emmi Takkinen 2025-06-02 07:37:30 UTC
This comes from bug 37727, minus sign is considered as unsafe character and we add ' mark before them. Could we handle minus sign separately to determine if it's used in harmful context e.g. if it's added between strings or end of string or something like that?
Comment 2 David Cook 2025-07-28 01:50:31 UTC
This'll need some more thought.

Bug 37727 is a local workaround because support for "escapeExcelFormula" wasn't added to DataTables Buttons until 3.2.0:
https://github.com/DataTables/Buttons/blob/master/js/dataTables.buttons.js#L1998

I suppose for acquisitions tables or at least money columns that are calculated perhaps it would be possible to do a custom display. 

I've opened bug 40523 because there's a number of DataTables Buttons changes that we need to make to improve things...