[commodity-utilities] prevent crash if end-date is #f

crash happens when (I think) no valid splits found.
This commit is contained in:
Christopher Lam 2018-07-01 15:38:15 +08:00 committed by John Ralls
parent eb0256e3e7
commit d12ee9a4fc

View File

@ -48,8 +48,9 @@
(xaccQueryAddAccountMatch query
currency-accounts
QOF-GUID-MATCH-ANY QOF-QUERY-AND)
(xaccQueryAddDateMatchTT
query #f end-date #t end-date QOF-QUERY-AND)
(if end-date
(xaccQueryAddDateMatchTT
query #f end-date #t end-date QOF-QUERY-AND))
;; Get the query result, i.e. all splits in currency
;; accounts.