r17406 - gnucash/branches/2.2/src/import-export/aqbanking - [r17405] Handle missing information when importing from aqbanking more gracefully.
Andreas Köhler
andi5 at cvs.gnucash.org
Thu Jul 24 19:50:08 EDT 2008
Author: andi5
Date: 2008-07-24 19:50:08 -0400 (Thu, 24 Jul 2008)
New Revision: 17406
Trac: http://svn.gnucash.org/trac/changeset/17406
Modified:
gnucash/branches/2.2/src/import-export/aqbanking/gnc-ab-utils.c
Log:
[r17405] Handle missing information when importing from aqbanking more gracefully.
The online_id used to match an aqbanking accountinfo to a gnucash account is the
concatenation of the bank code and account number found. If the primer is NULL,
then fall back to "" instead of invalidating the whole id.
Modified: gnucash/branches/2.2/src/import-export/aqbanking/gnc-ab-utils.c
===================================================================
--- gnucash/branches/2.2/src/import-export/aqbanking/gnc-ab-utils.c 2008-07-24 23:46:14 UTC (rev 17405)
+++ gnucash/branches/2.2/src/import-export/aqbanking/gnc-ab-utils.c 2008-07-24 23:50:08 UTC (rev 17406)
@@ -428,13 +428,16 @@
static Account *
gnc_ab_accinfo_to_gnc_acc(AB_IMEXPORTER_ACCOUNTINFO *acc_info)
{
+ const gchar *bankcode, *accountnumber;
gchar *online_id;
Account *gnc_acc;
g_return_val_if_fail(acc_info, NULL);
- online_id = g_strconcat(AB_ImExporterAccountInfo_GetBankCode(acc_info),
- AB_ImExporterAccountInfo_GetAccountNumber(acc_info),
+ bankcode = AB_ImExporterAccountInfo_GetBankCode(acc_info);
+ accountnumber = AB_ImExporterAccountInfo_GetAccountNumber(acc_info);
+ online_id = g_strconcat(bankcode ? bankcode : "",
+ accountnumber ? accountnumber : "",
(gchar*)NULL);
gnc_acc = gnc_import_select_account(
NULL, online_id, 1, AB_ImExporterAccountInfo_GetAccountName(acc_info),
More information about the gnucash-changes
mailing list