From dba6d1536dea1ce88abd6846f45faef90d564eed Mon Sep 17 00:00:00 2001 From: Christian Stimming Date: Fri, 3 Dec 2004 20:23:33 +0000 Subject: [PATCH] Fix division by zero error in tax report git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@10348 57a11ea4-9604-0410-9ed3-97b8803252fd --- src/report/locale-specific/us/taxtxf.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/report/locale-specific/us/taxtxf.scm b/src/report/locale-specific/us/taxtxf.scm index 74c0585acd..6fbb414de5 100644 --- a/src/report/locale-specific/us/taxtxf.scm +++ b/src/report/locale-specific/us/taxtxf.scm @@ -632,7 +632,9 @@ (gnc:account-get-type account) #f))) (set! work-done (+ 1 work-done)) - (gnc:report-percent-done (* 100 (/ work-done work-to-do))) + (gnc:report-percent-done (* 100 (if (> work-to-do 0) + (/ work-done work-to-do) + 1))) (if (gnc:account-is-inc-exp? account) (let* ((children (gnc:account-get-children account)) (to-special #f) ; clear special-splits-period