r19818 - gnucash/trunk/src/import-export/aqbanking - Fixed aqbanking transaction type on importing DTAUS online transfers.

Christian Stimming cstim at code.gnucash.org
Tue Nov 16 15:55:50 EST 2010


Author: cstim
Date: 2010-11-16 15:55:50 -0500 (Tue, 16 Nov 2010)
New Revision: 19818
Trac: http://svn.gnucash.org/trac/changeset/19818

Modified:
   gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c
Log:
Fixed aqbanking transaction type on importing DTAUS online transfers.

Patch by Manfred Usselmann.

Modified: gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c	2010-11-16 09:06:36 UTC (rev 19817)
+++ gnucash/trunk/src/import-export/aqbanking/gnc-ab-utils.c	2010-11-16 20:55:50 UTC (rev 19818)
@@ -573,6 +573,7 @@
 {
     GncABImExContextImport *data = user_data;
     Transaction *gnc_trans;
+    GncABTransType trans_type;
 
     g_return_val_if_fail(element && data, NULL);
 
@@ -595,8 +596,23 @@
             ab_trans, AB_Account_GetAccountNumber(data->ab_acc));
         AB_Transaction_SetLocalCountry(ab_trans, "DE");
 
-        job = gnc_ab_get_trans_job(data->ab_acc, ab_trans, SINGLE_DEBITNOTE);
 
+        switch(AB_Transaction_GetType(ab_trans))
+        {
+          case AB_Transaction_TypeDebitNote:
+            trans_type = SINGLE_DEBITNOTE;
+            break;
+          case AB_Transaction_TypeTransaction:
+            /* trans_type = SINGLE_INTERNAL_TRANSFER;
+             * break; */
+          case AB_Transaction_TypeEuTransfer:
+          case AB_Transaction_TypeTransfer:
+          default:
+            trans_type = SINGLE_TRANSFER;
+        } /* switch */
+
+        job = gnc_ab_get_trans_job(data->ab_acc, ab_trans, trans_type);
+
         /* Check whether we really got a job */
         if (!job || AB_Job_CheckAvailability(job
 #ifndef AQBANKING_VERSION_5_PLUS



More information about the gnucash-changes mailing list