gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Mon Jun 24 08:32:16 EDT 2019


Updated	 via  https://github.com/Gnucash/gnucash/commit/72bdaeef (commit)
	 via  https://github.com/Gnucash/gnucash/commit/0c5f79a5 (commit)
	from  https://github.com/Gnucash/gnucash/commit/2d06d703 (commit)



commit 72bdaeefcdc561b078a540d46e7670f6de9d24a1
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon Jun 24 16:12:27 2019 +0800

    [register] eradicate gnc-default-currency from .scm code
    
    The conditional (null? (xaccSplitGetAccount split)) can never be true
    because it was already handled previously in code via the
    "(null? (xaccSplitGetAccount (car splits))" cond clause to handle bug
    639082

diff --git a/gnucash/report/standard-reports/register.scm b/gnucash/report/standard-reports/register.scm
index 213617c58..58f93da3a 100644
--- a/gnucash/report/standard-reports/register.scm
+++ b/gnucash/report/standard-reports/register.scm
@@ -180,9 +180,7 @@
   (let* ((row-contents '())
          (parent (xaccSplitGetParent split))
          (account (xaccSplitGetAccount split))
-         (currency (if (not (null? account))
-                       (xaccAccountGetCommodity account)
-                       (gnc-default-currency)))
+         (currency (xaccAccountGetCommodity account))
          (trans-currency (xaccTransGetCurrency parent))
          (damount (xaccSplitGetAmount split))
          (split-value (gnc:make-gnc-monetary currency damount)))
@@ -545,9 +543,7 @@
                              credit-amount credit-value)
     (let* ((parent (xaccSplitGetParent split))
            (account (xaccSplitGetAccount split))
-           (split-currency (if (not (null? account))
-                               (xaccAccountGetCommodity account)
-                               (gnc-default-currency)))
+           (split-currency (xaccAccountGetCommodity account))
            (split-amount (xaccSplitGetAmount split))
            (trans-currency (xaccTransGetCurrency parent))
            (split-value (xaccSplitGetValue split)))

commit 0c5f79a58f50a5dfb26ad6150ebf42b64aabe1f1
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Mon Jun 24 16:07:50 2019 +0800

    [job-report] bugfix display amounts with owner currency
    
    * eradicate gnc-default-currency from .scm code
    
    This parallels aec61497 whereby customer & vendor total amounts were
    rendered with default_currency instead of owner currency

diff --git a/gnucash/report/business-reports/job-report.scm b/gnucash/report/business-reports/job-report.scm
index e1901eed4..e0bc4053d 100644
--- a/gnucash/report/business-reports/job-report.scm
+++ b/gnucash/report/business-reports/job-report.scm
@@ -113,12 +113,11 @@
     (gnc:make-date-list begindate to-date ThirtyDayDelta)))
 
 
-(define (make-aging-table options query bucket-intervals reverse?)
+(define (make-aging-table options query bucket-intervals reverse? currency)
   (let ((lots (xaccQueryGetLots query QUERY-TXN-MATCH-ANY))
 	(buckets (new-bucket-vector))
 	(payments (gnc-numeric-zero))
-	(currency (gnc-default-currency)) ;XXX
-	(table (gnc:make-html-table)))
+        (table (gnc:make-html-table)))
 
     (define (in-interval this-date current-bucket)
       (< this-date current-bucket))
@@ -276,7 +275,7 @@
   (let ((txns (xaccQueryGetTransactions query QUERY-TXN-MATCH-ANY))
 	(used-columns (build-column-used options))
 	(total (gnc-numeric-zero))
-	(currency (gnc-default-currency)) ;XXX
+        (currency (xaccAccountGetCommodity acc))
 	(table (gnc:make-html-table))
 	(inv-str (gnc:option-value (gnc:lookup-option options "__reg"
 						      "inv-str")))
@@ -333,7 +332,7 @@
        (list (gnc:make-html-table-cell/size/markup
 	      1 (+ 1 (value-col used-columns))
 	      "centered-label-cell"
-	      (make-aging-table options query interval-vec reverse?)))))
+	      (make-aging-table options query interval-vec reverse? currency)))))
 
     table))
 



Summary of changes:
 gnucash/report/business-reports/job-report.scm | 9 ++++-----
 gnucash/report/standard-reports/register.scm   | 8 ++------
 2 files changed, 6 insertions(+), 11 deletions(-)



More information about the gnucash-changes mailing list