gnucash unstable: fix reconcile dialog always showing ending balance of zero

Geert Janssens gjanssens at code.gnucash.org
Fri Oct 20 04:52:05 EDT 2017


Updated	 via  https://github.com/Gnucash/gnucash/commit/968956d2 (commit)
	from  https://github.com/Gnucash/gnucash/commit/5e7c2106 (commit)



commit 968956d271e724569cb50c60da1e8b43f5a8ad6e
Author: Jose Marino <jmarino at users.noreply.github.com>
Date:   Thu Oct 19 09:26:59 2017 -0600

    fix reconcile dialog always showing ending balance of zero
    
    The reconcile account dialog always displays a value of 0.00 as the
    Ending Balance, regardless of account and statement date.
    This is caused by function xaccAccountGetReconcilePostponeBalance
    returning the wrong value, returning TRUE when it should return FALSE,
    and setting balance to the default {0,1}.
    
    The code uses bal.denom!=0 as an indicator that a valid balance was
    received in variable v. However, bal is initialized to {0,1}
    making the test always true even when we didn't receive a valid
    value in variable v.
    Thus, this function returns TRUE with *balance={0,1} when no valid
    balance was found in "reconcile-info/postpone/balance".
    
    This patch fixes the function to return FALSE if v doesn't hold
    a valid value or if bal.denom is set to 0.



Summary of changes:
 libgnucash/engine/Account.c | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)



More information about the gnucash-patches mailing list