From 7853f5a24a4ed6e5cf32fdf6e5eba217a1e312cd Mon Sep 17 00:00:00 2001 From: John Ralls Date: Thu, 28 Nov 2019 09:17:59 -0800 Subject: [PATCH] Ignore trailing noise on imported transaction account numbers. AQBanking6 uses a separate method for retrieving account numbers for account info and transactions, where the transactions method can have additional characters, most often the ISO4217 currency code. That results in match failures when importing. As a work-around, compare only the length of the account-info-generated online id when comparing it to the transaction-generated one. Note that this is only a partial solution: At least one German bank also appends characters to the transaction-generated bank id and that will still cause the match to fail. --- gnucash/import-export/import-account-matcher.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnucash/import-export/import-account-matcher.c b/gnucash/import-export/import-account-matcher.c index 0837150d44..7cbbcd7bb4 100644 --- a/gnucash/import-export/import-account-matcher.c +++ b/gnucash/import-export/import-account-matcher.c @@ -86,7 +86,8 @@ static gpointer test_acct_online_id_match(Account *acct, gpointer param_online_i const gchar * current_online_id = gnc_import_get_acc_online_id(acct); if ( (current_online_id != NULL && param_online_id != NULL ) - && strcmp( current_online_id, param_online_id ) == 0 ) + && strncmp( current_online_id, param_online_id, + strlen( current_online_id ) ) == 0 ) { return (gpointer *) acct; }