From e410e05da7d89b8076ad953b28d0ea790b0002e6 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Fri, 4 Dec 2015 18:50:49 +0100 Subject: [PATCH] Followup on bug 682800 to fix row balances in register reports Due to the changes done for bug 682800 the row balances for the account report no longer matched the row balances of the original register. This commit should fix that for a consistent experience. --- src/report/standard-reports/register.scm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/report/standard-reports/register.scm b/src/report/standard-reports/register.scm index ada86451fb..da9bd8e584 100644 --- a/src/report/standard-reports/register.scm +++ b/src/report/standard-reports/register.scm @@ -323,6 +323,9 @@ (gnc:make-gnc-monetary trans-currency (gnc-numeric-neg (xaccSplitGetValue split)))) " "))) + ; For single account registers, use the split's cached balance to remain + ; consistent with the balances shown in the register itself + ; For others, use the cumulated balance from the totals-collector (if (balance-col column-vector) (addto! row-contents (if transaction-info? @@ -331,7 +334,10 @@ (gnc:html-split-anchor split (gnc:make-gnc-monetary - currency (cadr (total-collector 'getpair currency #f))))) + currency + (if ledger-type? + (cadr (total-collector 'getpair currency #f)) + (xaccSplitGetBalance split))))) " "))) (gnc:html-table-append-row/markup! table row-style