[Gnucash-changes] r13245 - gnucash/trunk - Mike Alexander's reconcile preselection patch (#112653).

Derek Atkins warlord at cvs.gnucash.org
Sun Feb 12 17:09:08 EST 2006


Author: warlord
Date: 2006-02-12 17:09:08 -0500 (Sun, 12 Feb 2006)
New Revision: 13245
Trac: http://svn.gnucash.org/trac/changeset/13245

Modified:
   gnucash/trunk/ChangeLog
   gnucash/trunk/src/gnome/reconcile-list.c
   gnucash/trunk/src/gnome/reconcile-list.h
   gnucash/trunk/src/gnome/window-reconcile.c
Log:
Mike Alexander's reconcile preselection patch (#112653).
        * src/gnome/window-reconcile.c (gnc_reconcile_window_create_list_box):
        * src/gnome/reconcile-list.c (gnc_reconcile_list_new):
        * src/gnome/reconcile-list.h (gnc_reconcile_list_new):
          Don't pre-select the reconciled status for transactions after the
          statement date.
	Fixes #112653.



Modified: gnucash/trunk/ChangeLog
===================================================================
--- gnucash/trunk/ChangeLog	2006-02-12 21:46:36 UTC (rev 13244)
+++ gnucash/trunk/ChangeLog	2006-02-12 22:09:08 UTC (rev 13245)
@@ -63,6 +63,14 @@
           Use price nearest to noon on the day specified.
 	Fixes bug #314554.
 
+	Mike Alexander's reconcile preselection patch (#112653).
+        * src/gnome/window-reconcile.c (gnc_reconcile_window_create_list_box):
+        * src/gnome/reconcile-list.c (gnc_reconcile_list_new):
+        * src/gnome/reconcile-list.h (gnc_reconcile_list_new):
+          Don't pre-select the reconciled status for transactions after the
+          statement date.
+	Fixes #112653.
+
 2006-02-11  Derek Atkins  <derek at ihtfp.com>
 
 	* src/report/report-gnome/gnc-plugin-page-report.c:

Modified: gnucash/trunk/src/gnome/reconcile-list.c
===================================================================
--- gnucash/trunk/src/gnome/reconcile-list.c	2006-02-12 21:46:36 UTC (rev 13244)
+++ gnucash/trunk/src/gnome/reconcile-list.c	2006-02-12 22:09:08 UTC (rev 13245)
@@ -119,7 +119,8 @@
 }
 
 GtkWidget *
-gnc_reconcile_list_new(Account *account, GNCReconcileListType type)
+gnc_reconcile_list_new(Account *account, GNCReconcileListType type,
+                       time_t statement_date)
 {
   GNCReconcileList *list;
   gboolean include_children, auto_check;
@@ -176,11 +177,13 @@
     for (splits = xaccQueryGetSplits(query); splits; splits = splits->next) {
       Split *split = splits->data;
       char recn = xaccSplitGetReconcile(split);
+      time_t trans_date = xaccTransGetDate(xaccSplitGetParent(split));
     
       /* Just an extra verification that our query is correct ;) */
       g_assert (recn == NREC || recn == CREC);
 
-      if (recn == CREC)
+      if (recn == CREC &&
+          difftime(trans_date, statement_date) >= 0)
 	g_hash_table_insert (list->reconciled, split, split);
     }
   }

Modified: gnucash/trunk/src/gnome/reconcile-list.h
===================================================================
--- gnucash/trunk/src/gnome/reconcile-list.h	2006-02-12 21:46:36 UTC (rev 13244)
+++ gnucash/trunk/src/gnome/reconcile-list.h	2006-02-12 22:09:08 UTC (rev 13245)
@@ -72,7 +72,8 @@
 GType gnc_reconcile_list_get_type (void);
 
 GtkWidget * gnc_reconcile_list_new (Account * account,
-				    GNCReconcileListType type);
+				    GNCReconcileListType type,
+                                    time_t date);
 
 gint gnc_reconcile_list_get_needed_height(GNCReconcileList *list,
                                           gint num_rows);

Modified: gnucash/trunk/src/gnome/window-reconcile.c
===================================================================
--- gnucash/trunk/src/gnome/window-reconcile.c	2006-02-12 21:46:36 UTC (rev 13244)
+++ gnucash/trunk/src/gnome/window-reconcile.c	2006-02-12 22:09:08 UTC (rev 13245)
@@ -933,7 +933,7 @@
 
   vbox = gtk_vbox_new(FALSE, 5);
 
-  list = gnc_reconcile_list_new(account, type);
+  list = gnc_reconcile_list_new(account, type, recnData->statement_date);
   *list_save = list;
 
   g_signal_connect(list, "toggle_reconciled",



More information about the gnucash-changes mailing list