r22786 - gnucash/trunk/src/import-export/aqbanking - Aqbanking online transfer: Disable the non-SEPA verification rules for SEPA transactions.

Christian Stimming cstim at code.gnucash.org
Tue Feb 19 16:05:28 EST 2013


Author: cstim
Date: 2013-02-19 16:05:14 -0500 (Tue, 19 Feb 2013)
New Revision: 22786
Trac: http://svn.gnucash.org/trac/changeset/22786

Modified:
   gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c
Log:
Aqbanking online transfer: Disable the non-SEPA verification rules for SEPA transactions.

Eventually, the SEPA rules need to be implemented, but for now we
just allow any alphanumerics.

Modified: gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c
===================================================================
--- gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c	2013-02-18 20:56:59 UTC (rev 22785)
+++ gnucash/trunk/src/import-export/aqbanking/dialog-ab-trans.c	2013-02-19 21:05:14 UTC (rev 22786)
@@ -929,6 +929,12 @@
 
     g_return_if_fail(td);
 
+    // FIXME: If this is a SEPA transaction, totally different verification
+    // rules apply anyway. There are some initial verification functions in
+    // <ktoblzcheck/iban.h>, but those need to be implemented here as well.
+    if (gnc_ab_trans_isSEPA(td->trans_type))
+        return;
+
     ENTER("td=%p, input=%s", td, input);
     record = AccountNumberCheck_findBank(td->blzcheck, input);
 
@@ -1211,6 +1217,7 @@
 {
     GString* result = g_string_new(NULL);
     gint i;
+    GncABTransDialog *td = data;
 
     if (length == -1)
         length = strlen(text);
@@ -1219,7 +1226,12 @@
     for (i = 0; i < length; i++)
     {
         gchar c = text[i];
-        if (g_ascii_isdigit(c))
+
+        // Only accept digits. FIXME: In the SEPA dialogs, alphanumerics are
+        // allowed, but we could also verify the input according to actual BIC
+        // and IBAN rules. This is not yet done here.
+        if (g_ascii_isdigit(c)
+                || (gnc_ab_trans_isSEPA(td->trans_type) && g_ascii_isalnum(c)))
         {
             g_string_append_c(result, c);
         }



More information about the gnucash-changes mailing list