mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Ensure book returns current-book
fixes https://lists.gnucash.org/pipermail/gnucash-user/2019-September/086967.html because occasionally account will be null or #f, causing error when passed to gnc-account-get-book.
This commit is contained in:
parent
0ab0d23b00
commit
49372e76be
@ -748,8 +748,8 @@
|
||||
(end-date (gnc:time64-end-day-time
|
||||
(gnc:date-option-absolute-time
|
||||
(opt-val gnc:pagename-general optname-to-date))))
|
||||
(book (gnc-account-get-book account))
|
||||
(date-format (if (not (null? book)) (gnc:options-fancy-date book)))
|
||||
(book (gnc-get-current-book))
|
||||
(date-format (gnc:options-fancy-date book))
|
||||
(type (opt-val "__reg" "owner-type"))
|
||||
(owner-descr (owner-string type))
|
||||
(date-type (opt-val gnc:pagename-general optname-date-driver))
|
||||
|
@ -505,11 +505,7 @@
|
||||
(validate (reverse
|
||||
(gnc-account-get-children-sorted
|
||||
(gnc-get-current-root-account))))))
|
||||
(book (if selected-accounts
|
||||
(gnc-account-get-book (if (pair? selected-accounts)
|
||||
(car selected-accounts)
|
||||
selected-accounts))
|
||||
#f))
|
||||
(book (gnc-get-current-book))
|
||||
(generations (if (pair? selected-accounts)
|
||||
(apply max (map (lambda (x) (num-generations x 1))
|
||||
selected-accounts))
|
||||
|
Loading…
Reference in New Issue
Block a user