mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
[net-charts] CSV export uses ISO dates
* also add CSV export-error if no export-string
This commit is contained in:
parent
3296da001c
commit
d149042d74
@ -444,14 +444,19 @@
|
||||
|
||||
(cond
|
||||
((eq? export-type 'csv)
|
||||
(gnc:html-document-set-export-string
|
||||
document
|
||||
(gnc:lists->csv
|
||||
(cons (if inc-exp?
|
||||
(map G_ '("Date" "Income" "Expense" "Net Profit"))
|
||||
(map G_ '("Date" "Assets" "Liabilities" "Net Worth")))
|
||||
(map list date-string-list minuend-balances
|
||||
subtrahend-balances difference-balances)))))))
|
||||
(let ((old-fmt (qof-date-format-get)))
|
||||
(qof-date-format-set QOF-DATE-FORMAT-ISO)
|
||||
(gnc:html-document-set-export-string
|
||||
document
|
||||
(gnc:lists->csv
|
||||
(cons (if inc-exp?
|
||||
(map G_ '("Date" "Income" "Expense" "Net Profit"))
|
||||
(map G_ '("Date" "Assets" "Liabilities" "Net Worth")))
|
||||
(map list
|
||||
(map qof-print-date dates-list)
|
||||
minuend-balances
|
||||
subtrahend-balances difference-balances))))
|
||||
(qof-date-format-set old-fmt)))))
|
||||
(gnc:html-document-add-object!
|
||||
document
|
||||
(gnc:html-make-empty-data-warning
|
||||
@ -463,6 +468,9 @@
|
||||
(gnc:html-make-no-account-warning
|
||||
report-title (gnc:report-id report-obj))))
|
||||
|
||||
(unless (gnc:html-document-export-string document)
|
||||
(gnc:html-document-set-export-error document (G_ "No exportable data")))
|
||||
|
||||
(gnc:report-finished)
|
||||
document))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user