gnucash stable: [window-reconcile.cpp] clarify gnc_account_find_split predicate.

Christopher Lam clam at code.gnucash.org
Tue May 7 08:53:13 EDT 2024


Updated	 via  https://github.com/Gnucash/gnucash/commit/bcd706bf (commit)
	from  https://github.com/Gnucash/gnucash/commit/d867a9d1 (commit)



commit bcd706bf1abfeb542266a196ea837690c5178fc7
Author: Christopher Lam <christopher.lck at gmail.com>
Date:   Tue May 7 20:48:06 2024 +0800

    [window-reconcile.cpp] clarify gnc_account_find_split predicate.
    
    this clarifies the predicate.

diff --git a/gnucash/gnome/window-reconcile.cpp b/gnucash/gnome/window-reconcile.cpp
index 8b4a96b0d7..a09564bf4f 100644
--- a/gnucash/gnome/window-reconcile.cpp
+++ b/gnucash/gnome/window-reconcile.cpp
@@ -1942,11 +1942,13 @@ recnWindowWithBalance (GtkWidget *parent, Account *account, gnc_numeric new_endi
         GtkWidget *image = gtk_image_new_from_icon_name
             ("dialog-warning", GTK_ICON_SIZE_SMALL_TOOLBAR);
 
-        auto find_split = [statement_date](const Split *split)
+        // find an already reconciled split whose statement date
+        // precedes *this* reconciliation statement date.
+        auto has_later_recn_statement_date = [statement_date](const Split *split)
         { return (xaccSplitGetReconcile (split) == YREC &&
                   xaccSplitGetDateReconciled (split) > statement_date); };
 
-        if (auto split = gnc_account_find_split (account, find_split, true))
+        if (auto split = gnc_account_find_split (account, has_later_recn_statement_date, true))
         {
             auto datestr = qof_print_date (xaccTransGetDate (xaccSplitGetParent (split)));
             auto recnstr = qof_print_date (xaccSplitGetDateReconciled (split));



Summary of changes:
 gnucash/gnome/window-reconcile.cpp | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)



More information about the gnucash-changes mailing list