gnucash unstable: Fix typo, gnc-account-get-book not gnc:account-get-book
John Ralls
jralls at code.gnucash.org
Mon Feb 19 18:36:01 EST 2018
Updated via https://github.com/Gnucash/gnucash/commit/7e814ad0 (commit)
from https://github.com/Gnucash/gnucash/commit/50e2a3de (commit)
commit 7e814ad037dca79224b697a80654770aa35fd3bd
Author: John Ralls <jralls at ceridwen.us>
Date: Mon Feb 19 15:26:36 2018 -0800
Fix typo, gnc-account-get-book not gnc:account-get-book
And then deal with the crashes caused by not having any accounts
selected.
diff --git a/gnucash/report/locale-specific/us/taxtxf-de_DE.scm b/gnucash/report/locale-specific/us/taxtxf-de_DE.scm
index ee5aa2d..908c8fe 100644
--- a/gnucash/report/locale-specific/us/taxtxf-de_DE.scm
+++ b/gnucash/report/locale-specific/us/taxtxf-de_DE.scm
@@ -75,7 +75,7 @@
(use-modules (gnucash gnc-module))
(gnc:module-load "gnucash/tax/de_DE" 0)
(gnc:module-load "gnucash/report/report-system" 0)
-
+(gnc:module-load "gnucash/engine" 0)
(define reportname (N_ "Tax Report / TXF Export"))
@@ -505,7 +505,11 @@
(validate (reverse
(gnc-account-get-children-sorted
(gnc-get-current-root-account))))))
- (book (gnc:account-get-book (car selected-accounts)))
+ (book (if selected-accounts
+ (gnc-account-get-book (if (pair? selected-accounts)
+ (car selected-accounts)
+ selected-accounts))
+ #f))
(generations (if (pair? selected-accounts)
(apply max (map (lambda (x) (num-generations x 1))
selected-accounts))
@@ -770,9 +774,11 @@
(gnc-localtime
(time64CanonicalDayTime
(current-time)))))
- (tax-nr (or
- (gnc:option-get-value book gnc:*tax-label* gnc:*tax-nr-label*)
- ""))
+ (tax-nr (unless book
+ (or
+ (gnc:option-get-value book gnc:*tax-label* gnc:*tax-nr-label*)
+ "")
+ ""))
)
;; Now, the main body
Summary of changes:
gnucash/report/locale-specific/us/taxtxf-de_DE.scm | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
More information about the gnucash-changes
mailing list