gnucash maint: Bug 742089 - Decimal places

John Ralls jralls at code.gnucash.org
Fri Mar 13 22:47:43 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/39fdc131 (commit)
	from  https://github.com/Gnucash/gnucash/commit/fe3eb208 (commit)



commit 39fdc1319d1817a22cf0fa4f014c93a3e2d3c5ba
Author: John Ralls <jralls at ceridwen.us>
Date:   Sat Mar 14 11:46:49 2015 +0900

    Bug 742089 - Decimal places
    
    Set the debit and credit cells' print_info to the account so that the
    decimal places are correct for the commodity.

diff --git a/src/register/ledger-core/split-register-load.c b/src/register/ledger-core/split-register-load.c
index 042fe3e..72b63c8 100644
--- a/src/register/ledger-core/split-register-load.c
+++ b/src/register/ledger-core/split-register-load.c
@@ -38,6 +38,7 @@
 #include "split-register.h"
 #include "split-register-p.h"
 #include "engine-helpers.h"
+#include "pricecell.h"
 
 
 /* This static indicates the debugging module that this .o belongs to. */
@@ -377,6 +378,15 @@ gnc_split_register_load (SplitRegister *reg, GList * slist,
     pending_trans = xaccTransLookup (&info->pending_trans_guid,
                                      gnc_get_current_book ());
 
+    /* Bug 742089: Set the debit and credit cells' print_info to the account */
+    gnc_price_cell_set_print_info
+    ((PriceCell *) gnc_table_layout_get_cell (table->layout, DEBT_CELL),
+     gnc_account_print_info (default_account, FALSE));
+
+    gnc_price_cell_set_print_info
+    ((PriceCell *) gnc_table_layout_get_cell (table->layout, CRED_CELL),
+     gnc_account_print_info (default_account, FALSE));
+
     /* make sure we have a blank split */
     if (blank_split == NULL)
     {



Summary of changes:
 src/register/ledger-core/split-register-load.c | 10 ++++++++++
 1 file changed, 10 insertions(+)



More information about the gnucash-changes mailing list