diff --git a/gnucash/import-export/import-main-matcher.cpp b/gnucash/import-export/import-main-matcher.cpp index 8a234d3bc28..f08fcfb55bc 100644 --- a/gnucash/import-export/import-main-matcher.cpp +++ b/gnucash/import-export/import-main-matcher.cpp @@ -1909,6 +1909,13 @@ get_peer_acct_names (Split *split) return retval; } +static inline bool +acct_recndate_warning (time64 trans_date, const Account* acc) +{ + time64 recn_date; + return xaccAccountGetReconcileLastDate (acc, &recn_date) && trans_date < recn_date; +} + static void refresh_model_row (GNCImportMainMatcher *gui, GtkTreeModel *model, @@ -2028,6 +2035,14 @@ refresh_model_row (GNCImportMainMatcher *gui, imbalance, acct_full_name); } + if (acct_recndate_warning (date, dest_acc)) + { + static const char* recn_date_warning = N_("The import date is earlier \ +than destination account reconcile date. Further reconciliation may be difficult"); + auto newtext = g_strdup_printf ("%s %s", text, _(recn_date_warning)); + g_free (text); + text = newtext; + } g_free (acct_full_name); }