Reports: Fix two parameter names that apparently were missed during the switch to report GUID's. In both cases, the parameter needed is a template ID, not a template name.

BP


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17367 57a11ea4-9604-0410-9ed3-97b8803252fd
2.4
Charles Day 18 years ago
parent 3022fddbf1
commit 2e07dd82d5

@ -326,11 +326,11 @@
;; gnc:make-report instantiates a report from a report-template.
;; The actual report is stored away in a hash-table -- only the id is returned.
(define (gnc:make-report template-name . rest)
(let* ((template-parent (gnc:report-template-parent-type (hash-ref *gnc:_report-templates_* template-name)))
(define (gnc:make-report template-id . rest)
(let* ((template-parent (gnc:report-template-parent-type (hash-ref *gnc:_report-templates_* template-id)))
(report-type (if template-parent
template-parent
template-name))
template-id))
(r ((record-constructor <report>)
report-type ;; type
#f ;; id
@ -340,7 +340,7 @@
#f ;; editor-widget
#f ;; ctext
))
(template (hash-ref *gnc:_report-templates_* template-name))
(template (hash-ref *gnc:_report-templates_* template-id))
)
(let ((options
(if (not (null? rest))
@ -381,8 +381,8 @@
#f))
)
(define (gnc:make-report-options template-name)
(let ((template (hash-ref *gnc:_report-templates_* template-name)))
(define (gnc:make-report-options template-id)
(let ((template (hash-ref *gnc:_report-templates_* template-id)))
(if template
(gnc:report-template-new-options template)
#f)))

Loading…
Cancel
Save