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.
This commit is contained in:
John Ralls 2019-11-28 09:17:59 -08:00
parent 1af8e272c7
commit 7853f5a24a

View File

@ -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;
}