gnucash maint: Fix auto-selection of splits in reconcile

Christian Stimming cstim at code.gnucash.org
Sat Mar 3 18:21:17 EST 2018


Updated	 via  https://github.com/Gnucash/gnucash/commit/18f0d053 (commit)
	from  https://github.com/Gnucash/gnucash/commit/cf73c93b (commit)



commit 18f0d053b04f463263f67bbe16bbd8ee2979a818
Author: Christian Stimming <christian at cstimming.de>
Date:   Sun Mar 4 00:18:39 2018 +0100

    Fix auto-selection of splits in reconcile
    
    Really use all splits of any given day. Up to now usually the splits
    of the given date were not or not all included, as the time comparison
    didn't correctly ignore any given time-of-day of the splits. Instead,
    all possible time-of-days should be included.

diff --git a/src/gnome/reconcile-view.c b/src/gnome/reconcile-view.c
index e8ea5b1..454c636 100644
--- a/src/gnome/reconcile-view.c
+++ b/src/gnome/reconcile-view.c
@@ -328,6 +328,7 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
 
     if (auto_check)
     {
+        time64 statement_date_day_end = gnc_time64_get_day_end(statement_date);
         for (splits = qof_query_run (query); splits; splits = splits->next)
         {
             Split *split = splits->data;
@@ -338,7 +339,7 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
             g_assert (recn == NREC || recn == CREC);
 
             if (recn == CREC &&
-		gnc_difftime (trans_date, statement_date) <= 0)
+		gnc_difftime (trans_date, statement_date_day_end) <= 0)
 		g_hash_table_insert (view->reconciled, split, split);
         }
     }



Summary of changes:
 src/gnome/reconcile-view.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)



More information about the gnucash-changes mailing list