gnucash maint: Bug 797136 - Balance sheet report "Show Exchange rate" broken when foreign currency is sold completely

Christopher Lam clam at code.gnucash.org
Wed Mar 13 07:38:57 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/9a0aaedc (commit)
	from  https://github.com/Gnucash/gnucash/commit/27985ee3 (commit)



commit 9a0aaedc052b46dd76eb63e177d99e5182c39153
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Mar 13 19:37:43 2019 +0800

    Bug 797136 - Balance sheet report "Show Exchange rate" broken when foreign currency is sold completely
    
    For cases where total(amount)/total(value) = 0/0, the price is
    reported as 0.

diff --git a/gnucash/report/report-system/commodity-utilities.scm b/gnucash/report/report-system/commodity-utilities.scm
index fcd373092..7df5a464a 100644
--- a/gnucash/report/report-system/commodity-utilities.scm
+++ b/gnucash/report/report-system/commodity-utilities.scm
@@ -696,7 +696,7 @@ construct with gnc:make-gnc-monetary and gnc:monetary->string instead.")
   (map
    (lambda (e)
      (list (car e)
-           (if (zero? ((caadr e) 'total #f)) #f
+           (if (zero? ((caadr e) 'total #f)) 0
            (abs
             (gnc-numeric-div ((cdadr e) 'total #f)
                              ((caadr e) 'total #f)



Summary of changes:
 gnucash/report/report-system/commodity-utilities.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



More information about the gnucash-changes mailing list