mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-27 03:10:23 -06:00
Check all known report templates instead of just custom reports.
Allows users to run any report from the command-line.
This commit is contained in:
parent
3884e24eb9
commit
30450e4d87
@ -801,12 +801,13 @@ not found.")))
|
||||
|
||||
(define-public (gnc:cmdline-run-report report export-type output-file dry-run?)
|
||||
(let ((template (or (gnc:find-report-template report)
|
||||
(let lp ((custom-templates (gnc:custom-report-templates-list)))
|
||||
(cond
|
||||
((null? custom-templates) #f)
|
||||
((equal? (gnc:report-template-name (cdar custom-templates))
|
||||
report) (cdar custom-templates))
|
||||
(else (lp (cdr custom-templates))))))))
|
||||
(let ((retval #f))
|
||||
(hash-for-each
|
||||
(lambda (report-guid template)
|
||||
(when (equal? (gnc:report-template-name template) report)
|
||||
(set! retval template)))
|
||||
*gnc:_report-templates_*)
|
||||
retval))))
|
||||
|
||||
(define (run-report output-port)
|
||||
(display
|
||||
|
Loading…
Reference in New Issue
Block a user