r16789 - gnucash/branches/2.2/src/gnome - [r16726] Don't un-clear transactions improperly when postponing reconciliation (#497517)

Andreas Köhler andi5 at cvs.gnucash.org
Fri Jan 4 19:51:33 EST 2008


Author: andi5
Date: 2008-01-04 19:51:33 -0500 (Fri, 04 Jan 2008)
New Revision: 16789
Trac: http://svn.gnucash.org/trac/changeset/16789

Modified:
   gnucash/branches/2.2/src/gnome/reconcile-list.c
   gnucash/branches/2.2/src/gnome/reconcile-list.h
Log:
[r16726] Don't un-clear transactions improperly when postponing reconciliation (#497517)

Patch by Jeff Green and Mark Jenkins


Modified: gnucash/branches/2.2/src/gnome/reconcile-list.c
===================================================================
--- gnucash/branches/2.2/src/gnome/reconcile-list.c	2008-01-05 00:51:23 UTC (rev 16788)
+++ gnucash/branches/2.2/src/gnome/reconcile-list.c	2008-01-05 00:51:33 UTC (rev 16789)
@@ -138,6 +138,7 @@
 
   list->account = account;
   list->list_type = type;
+  list->statement_date = statement_date;
 
   query = xaccMallocQuery();
   xaccQuerySetBook(query, gnc_get_current_book ());
@@ -577,9 +578,16 @@
 
     split = gtk_clist_get_row_data (clist, i);
 
-    recn = g_hash_table_lookup (list->reconciled, split) ? CREC : NREC;
+    // Don't change splits past reconciliation date that haven't been
+    // set to be reconciled
+    if ( difftime(list->statement_date,
+		  xaccTransGetDate(xaccSplitGetParent(split))) >= 0 ||
+	 g_hash_table_lookup(list->reconciled, split))
+    {
+      recn = g_hash_table_lookup (list->reconciled, split) ? CREC : NREC;
 
-    xaccSplitSetReconcile (split, recn);
+      xaccSplitSetReconcile (split, recn);
+    }
   }
   gnc_resume_gui_refresh();
 }

Modified: gnucash/branches/2.2/src/gnome/reconcile-list.h
===================================================================
--- gnucash/branches/2.2/src/gnome/reconcile-list.h	2008-01-05 00:51:23 UTC (rev 16788)
+++ gnucash/branches/2.2/src/gnome/reconcile-list.h	2008-01-05 00:51:33 UTC (rev 16789)
@@ -49,6 +49,8 @@
   Account *account;
   GList *column_list;
 
+  time_t statement_date;
+
   GNCReconcileList *sibling;
   GNCReconcileListType list_type;
   gboolean no_toggle;



More information about the gnucash-changes mailing list