[grisbi-cvs] grisbi/src gsb_transactions_list.c,1.156,1.157
Pierre Biava
pbiava at users.sourceforge.net
Mon Apr 20 19:56:32 CEST 2009
Update of /cvsroot/grisbi/grisbi/src
In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv2592
Modified Files:
gsb_transactions_list.c
Log Message:
fixes bug 543. I hope this will be final.
Index: gsb_transactions_list.c
===================================================================
RCS file: /cvsroot/grisbi/grisbi/src/gsb_transactions_list.c,v
retrieving revision 1.156
retrieving revision 1.157
diff -u -d -r1.156 -r1.157
--- gsb_transactions_list.c 19 Apr 2009 20:32:39 -0000 1.156
+++ gsb_transactions_list.c 20 Apr 2009 17:56:30 -0000 1.157
@@ -857,18 +857,21 @@
account_number = gsb_data_transaction_get_account_number (transaction_number);
/* update the current balance */
- current_balance = gsb_real_add ( gsb_data_account_get_current_balance (account_number),
- gsb_data_transaction_get_adjusted_amount (transaction_number, -1));
- gsb_data_account_set_current_balance ( account_number,
- current_balance);
+ //~ current_balance = gsb_real_add ( gsb_data_account_get_current_balance (account_number),
+ //~ gsb_data_transaction_get_adjusted_amount (transaction_number, -1));
+ //~ gsb_data_account_set_current_balance ( account_number,
+ //~ current_balance);
if (gsb_data_account_get_current_balance (account_number).mantissa < 0)
- string = g_strdup_printf ( "<span color=\"red\">%s</span>",
- gsb_real_get_string_with_currency ( gsb_data_account_get_current_balance (account_number),
- gsb_data_account_get_currency (account_number), TRUE ));
+ string = g_strdup_printf ( "<span color=\"red\">%s</span>",
+ gsb_real_get_string_with_currency (
+ gsb_data_account_get_current_balance (account_number),
+ gsb_data_account_get_currency (account_number), TRUE ));
else
- string = gsb_real_get_string_with_currency ( gsb_data_account_get_current_balance (account_number),
- gsb_data_account_get_currency (account_number), TRUE );
+ string = gsb_real_get_string_with_currency (
+ gsb_data_account_get_current_balance (account_number),
+ gsb_data_account_get_currency (account_number), TRUE );
+
gsb_gui_headings_update_suffix (string);
g_free(string);
@@ -2549,26 +2552,31 @@
devel_debug_int ( target_account );
source_account = gsb_data_transaction_get_account_number (transaction_number);
- contra_transaction_number = gsb_data_transaction_get_contra_transaction_number (transaction_number);
+ contra_transaction_number = gsb_data_transaction_get_contra_transaction_number (
+ transaction_number);
/* if it's a transfer, update the contra-transaction category line */
if (contra_transaction_number > 0)
{
- /* the transaction is a transfer, we check if the contra-transaction is not on the target account */
- if ( gsb_data_transaction_get_account_number (contra_transaction_number) == target_account )
- {
- dialogue_error ( _("Cannot move a transfer on his contra-account"));
- return FALSE;
- }
+ /* the transaction is a transfer, we check if the contra-transaction is not on
+ * the target account */
+ if ( gsb_data_transaction_get_account_number (
+ contra_transaction_number) == target_account )
+ {
+ dialogue_error ( _("Cannot move a transfer on his contra-account"));
+ return FALSE;
+ }
}
/* we change now the account of the transaction */
gsb_data_transaction_set_account_number ( transaction_number,
target_account );
- /* update the field of the contra transaction if necessary */
+ /* update the field of the contra transaction if necessary. Ce transfert ne doit pas
+ * modifier la balance du compte */
if (contra_transaction_number > 0)
- gsb_transactions_list_update_transaction (contra_transaction_number);
+ transaction_list_update_transaction (contra_transaction_number);
+
/* normally we can change the account only by right click button
* so the current transaction is selected,
More information about the cvs
mailing list