gnucash maint: Multiple changes pushed

Christopher Lam clam at code.gnucash.org
Thu Jan 6 08:29:24 EST 2022


Updated	 via  https://github.com/Gnucash/gnucash/commit/9d07471a (commit)
	 via  https://github.com/Gnucash/gnucash/commit/85af1ff2 (commit)
	from  https://github.com/Gnucash/gnucash/commit/11a64f8e (commit)



commit 9d07471a88b3f97974c523196c942b6c79405f69
Merge: 11a64f8eb 85af1ff2f
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Thu Jan 6 21:28:30 2022 +0800

    Merge branch 'maint-798408' into maint #1236
    
    This commit ensures that GnuCash 4.10 can handle unreversed budgets in
    UI.


commit 85af1ff2fadb364ce97fc169e37f329e0f779d33
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Wed Jan 5 16:23:48 2022 +0800

    Bug 798408 - The calculation in budgets UI and reports are wrong.
    
    gbv_get_accumulated_budget_amount returns a numeric, signed for
    DISPLAY and must be converted to unreversed before adding to info->total

diff --git a/gnucash/gnome/gnc-budget-view.c b/gnucash/gnome/gnc-budget-view.c
index c646f7b92..ab1459694 100644
--- a/gnucash/gnome/gnc-budget-view.c
+++ b/gnucash/gnome/gnc-budget-view.c
@@ -1052,6 +1052,10 @@ budget_accum_helper (Account *account, gpointer data)
         numeric = gnc_pricedb_convert_balance_nearest_price_t64 (
                     info->pdb, numeric, currency, info->total_currency,
                     gnc_budget_get_period_start_date (info->budget, info->period_num));
+
+        if (gnc_reverse_budget_balance (account, TRUE))
+            numeric = gnc_numeric_neg (numeric);
+
         info->total = gnc_numeric_add (info->total, numeric, GNC_DENOM_AUTO,
                                        GNC_HOW_DENOM_LCD);
     }



Summary of changes:
 gnucash/gnome/gnc-budget-view.c | 4 ++++
 1 file changed, 4 insertions(+)



More information about the gnucash-changes mailing list