[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_3-3-g5c7bb10

Pierre Biava nobody at users.sourceforge.net
Sun Aug 14 09:57:28 CEST 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "grisbi".

The branch, master has been updated
       via  5c7bb102e36766a9a4e38977faf21116e3f9af9d (commit)
      from  0ac63f192ccebed91d2e18e49700b1400604a09d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5c7bb102e36766a9a4e38977faf21116e3f9af9d
Author: pbiava <pierre.biava at nerim.net>
Date:   Sun Aug 14 09:55:10 2011 +0200

    Fix bug  1387: error in calculation of the account balance in the prediction module with a scheduled transfer

-----------------------------------------------------------------------

Changes:
diff --git a/src/bet_tab.c b/src/bet_tab.c
index 70cef3d..bd8648d 100644
--- a/src/bet_tab.c
+++ b/src/bet_tab.c
@@ -835,43 +835,53 @@ void bet_array_refresh_scheduled_data ( GtkTreeModel *tab_model,
                         scheduled_number );
             if ( transfer_account_number == selected_account )
             {
+                gint floating_point;
+
+                currency_number = gsb_data_account_get_currency ( selected_account );
+                floating_point = gsb_data_account_get_currency_floating_point ( selected_account );
                 str_description = g_strdup_printf ( _("Transfer between account: %s\n"
                         "and account: %s"),
                         gsb_data_account_get_name ( transfer_account_number ),
                         gsb_data_account_get_name ( account_number ) );
-            
-                amount = gsb_real_opposite ( gsb_data_scheduled_get_amount (
-                        scheduled_number ) );
+
+                amount = gsb_real_opposite ( gsb_data_scheduled_get_adjusted_amount_for_currency ( scheduled_number,
+                                    currency_number,
+                                    floating_point ) );
+                str_amount = gsb_real_safe_real_to_string ( amount, floating_point );
             }
             else if ( account_number == selected_account )
             {
+                currency_number = gsb_data_scheduled_get_currency_number ( scheduled_number );
                 str_description = g_strdup_printf ( _("Transfer between account: %s\n"
                         "and account: %s"),
                         gsb_data_account_get_name ( account_number ),
                         gsb_data_account_get_name ( transfer_account_number ) );
 
                 amount = gsb_data_scheduled_get_amount ( scheduled_number );
+                str_amount = bet_data_get_str_amount_in_account_currency ( amount,
+                        account_number,
+                        scheduled_number,
+                        SPP_ORIGIN_SCHEDULED );
             }
             else
                 continue;
         }
         else if ( account_number == selected_account )
         {
+            currency_number = gsb_data_scheduled_get_currency_number ( scheduled_number );
             str_description = bet_array_list_get_description ( account_number,
                         SPP_ORIGIN_SCHEDULED,
                         GINT_TO_POINTER ( scheduled_number ) );
 
             amount = gsb_data_scheduled_get_amount ( scheduled_number );
-        }
-        else
-            continue;
-
-        str_amount = bet_data_get_str_amount_in_account_currency ( amount,
+            str_amount = bet_data_get_str_amount_in_account_currency ( amount,
                         account_number,
                         scheduled_number,
                         SPP_ORIGIN_SCHEDULED );
+        }
+        else
+            continue;
 
-        currency_number = gsb_data_scheduled_get_currency_number ( scheduled_number );
         if (amount.mantissa < 0)
             str_debit = utils_real_get_string_with_currency ( gsb_real_abs ( amount ), currency_number, TRUE );
         else


hooks/post-receive
-- 
grisbi


More information about the cvs mailing list