[register.scm] prevent crash on running report on empty book

pull/785/head
Christopher Lam 6 years ago
parent c7b0aca44a
commit 3537415889

@ -573,7 +573,8 @@
(work-done 0)
(odd-row? #t))
(gnc:report-percent-done (* 100 (/ work-done work-to-do)))
(unless (zero? work-to-do)
(gnc:report-percent-done (* 100 (/ work-done work-to-do))))
(cond
@ -582,6 +583,7 @@
;; add debit/credit totals to the table
;; ----------------------------------
((null? splits)
(gnc:report-percent-done 100)
(when reg-report-show-totals?
(add-subtotal-row (G_ "Total Debits") leader table used-columns

Loading…
Cancel
Save