[grisbi-cvs] [SCM] grisbi branch, master, updated. upstream_version_0_9_1-62-g628e213
Pierre Biava
nobody at users.sourceforge.net
Mon May 23 21:29:52 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 628e213dba81c07686bd05586a8f7afc37476b66 (commit)
from 7befe24524d8d46e388279470605b8ac546014c6 (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 628e213dba81c07686bd05586a8f7afc37476b66
Author: pbiava <pierre.biava at nerim.net>
Date: Sun May 22 22:35:15 2011 +0200
Fixes a problem of calculating the balance to the reconstruction of a line of archive
-----------------------------------------------------------------------
Changes:
diff --git a/src/gsb_data_transaction.c b/src/gsb_data_transaction.c
index 65a8714..eae2db0 100644
--- a/src/gsb_data_transaction.c
+++ b/src/gsb_data_transaction.c
@@ -194,10 +194,9 @@ gboolean gsb_data_transaction_add_archived_to_list ( gint transaction_number )
transaction = gsb_data_transaction_get_transaction_by_no ( transaction_number);
if ( !transaction )
- return FALSE;
+ return FALSE;
+ transactions_list = g_slist_append ( transactions_list, transaction );
- transactions_list = g_slist_append ( transactions_list,
- transaction );
return TRUE;
}
@@ -2720,6 +2719,30 @@ gint gsb_data_transaction_get_currency_floating_point ( gint transaction_number
/**
+ * remove the transaction from the transaction's list
+ * not in complete_transaction_list
+ *
+ * \param transaction_number
+ *
+ * \return TRUE if ok
+ * */
+gboolean gsb_data_transaction_remove_transaction_in_transaction_list ( gint transaction_number )
+{
+ struct_transaction *transaction;
+
+ transaction = gsb_data_transaction_get_transaction_by_no ( transaction_number );
+
+ if ( !transaction )
+ return FALSE;
+
+ /* delete the transaction from the lists */
+ transactions_list = g_slist_remove ( transactions_list, transaction );
+
+ return TRUE;
+}
+
+
+/**
*
*
*
diff --git a/src/gsb_data_transaction.h b/src/gsb_data_transaction.h
index 705d61a..f0095fe 100644
--- a/src/gsb_data_transaction.h
+++ b/src/gsb_data_transaction.h
@@ -82,6 +82,7 @@ gint gsb_data_transaction_new_transaction_with_number ( gint no_account,
gint transaction_number );
gint gsb_data_transaction_new_white_line ( gint mother_transaction_number);
gboolean gsb_data_transaction_remove_transaction ( gint transaction_number );
+gboolean gsb_data_transaction_remove_transaction_in_transaction_list ( gint transaction_number );
gboolean gsb_data_transaction_remove_transaction_without_check ( gint transaction_number );
gboolean gsb_data_transaction_set_account_number ( gint transaction_number,
gint no_account );
diff --git a/src/gsb_transactions_list.c b/src/gsb_transactions_list.c
index de13533..4130f25 100644
--- a/src/gsb_transactions_list.c
+++ b/src/gsb_transactions_list.c
@@ -4450,12 +4450,15 @@ gboolean gsb_transactions_list_delete_archived_transactions ( gint account_numbe
transaction_number = gsb_data_transaction_get_transaction_number ( tmp_list -> data );
+ tmp_list = tmp_list -> next;
+
if ( gsb_data_transaction_get_account_number ( transaction_number ) == account_number
&&
gsb_data_transaction_get_archive_number ( transaction_number ) == archive_number )
+ {
+ gsb_data_transaction_remove_transaction_in_transaction_list ( transaction_number );
transaction_list_remove_transaction ( transaction_number );
-
- tmp_list = tmp_list -> next;
+ }
}
return FALSE;
hooks/post-receive
--
grisbi
More information about the cvs
mailing list