Koha/reports
Fridolin Somers ffb40290f8 Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation
There is nearly the same code in misc/cronjobs/gather_print_notices.pl and reports/guided_reports.pl.
This patch creates a new module with subroutine called by both scripts.

If file path or content is undefined, subroutine will just return undef.
If content is an empty arrayref, empty ods file is still generated.

Unicode encoding is kept outisde because it may not be necessary.

Note that for print notices the first line of message is always the column names so it is extracted only from first message.

Test plan :
Run previous patches test plans and check ODS files are the same.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
2019-03-15 12:02:46 +00:00
..
acquisitions_stats.pl Bug 19096: Make Default authoritative in core modules 2017-12-07 14:44:15 -03:00
bor_issues_top.pl Bug 17925: Disable debugging in reports/bor_issues_top.pl 2017-05-12 09:09:15 -04:00
borrowers_out.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
borrowers_stats.pl Bug 22082: ambiguous column in patron stats 2019-01-18 20:31:58 +00:00
cash_register_stats.pl Bug 19551: Fix wrong order of operations in cash register report 2017-12-07 10:09:51 -03:00
cat_issues_top.pl Bug 16653: (QA follow-up) Avoid a warning and remove unused variables 2018-06-29 19:38:50 +00:00
catalogue_out.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
catalogue_stats.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
dictionary.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
guided_reports.pl Bug 21560: create Koha::Util::OpenDocument with subroutine for ODS generation 2019-03-15 12:02:46 +00:00
issues_avg_stats.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
issues_stats.pl Bug 19671: Map itemtypes to hash for correct display in issues_stats.pl 2018-02-13 12:50:18 -03:00
itemslost.pl Bug 9573: Add missing use statement 2018-02-17 18:32:14 -03:00
itemtypes.plugin Bug 20274: Itemtypes report gives zero results if item-level_itypes set to bibliographic records 2019-01-18 20:46:12 +00:00
manager.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
orders_by_fund.pl Bug 18260: Koha::Biblio - Remove GetBiblio 2017-07-10 13:03:38 -03:00
reports-home.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00
reserves_stats.pl Bug 17835: Replace GetItemTypes with Koha::ItemTypes 2017-04-14 10:43:51 -04:00
serials_stats.pl Bug 20012: use Modern::Perl in Reports perl scripts 2018-02-05 09:46:44 -03:00