From dd8e8b4efaa04dfa7f6c085f568116686cba4ff6 Mon Sep 17 00:00:00 2001 From: John Ralls Date: Fri, 30 Jul 2021 13:20:48 -0700 Subject: [PATCH] Evaluate the getter for making invoice options. --- libgnucash/app-utils/options.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libgnucash/app-utils/options.scm b/libgnucash/app-utils/options.scm index 1ade4370f8..214458dec9 100644 --- a/libgnucash/app-utils/options.scm +++ b/libgnucash/app-utils/options.scm @@ -250,7 +250,8 @@ (gnc-make-owner-option section name key docstring defval ui-type))) (define-public (gnc:make-invoice-option section name key docstring getter validator) (issue-deprecation-warning "gnc:make-invoice-option is deprecated. Make and register the option in one command with gnc-register-ionvoice-option.") - (gnc-make-qofinstance-option section name key docstring #f (GncOptionUIType-INVOICE))) + (let ((defval (if getter (getter) #f))) + (gnc-make-qofinstance-option section name key docstring defval (GncOptionUIType-INVOICE)))) (define-public (gnc:make-taxtable-option section name key docstring default) (issue-deprecation-warning "gnc:make-taxtable-option is deprecated. Make and register the option in one command with gnc-register-taxtable-option.") (gnc-make-qofinstance-option section name key docstring default (GncOptionUIType-TAX_TABLE)))