From bcd706bf1abfeb542266a196ea837690c5178fc7 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Tue, 7 May 2024 20:48:06 +0800 Subject: [PATCH] [window-reconcile.cpp] clarify gnc_account_find_split predicate. this clarifies the predicate. --- gnucash/gnome/window-reconcile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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));