gnucash maint: Ignore trailing noise on imported transaction account numbers.
John Ralls
jralls at code.gnucash.org
Thu Nov 28 12:23:20 EST 2019
Updated via https://github.com/Gnucash/gnucash/commit/7853f5a2 (commit)
from https://github.com/Gnucash/gnucash/commit/1af8e272 (commit)
commit 7853f5a24a4ed6e5cf32fdf6e5eba217a1e312cd
Author: John Ralls <jralls at ceridwen.us>
Date: Thu Nov 28 09:17:59 2019 -0800
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.
diff --git a/gnucash/import-export/import-account-matcher.c b/gnucash/import-export/import-account-matcher.c
index 0837150d4..7cbbcd7bb 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;
}
Summary of changes:
gnucash/import-export/import-account-matcher.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
More information about the gnucash-changes
mailing list