Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0008008Openbravo ERP09. Financial managementpublic2009-03-06 17:422009-06-09 00:00
neil_smith 
vmromanos 
urgentminorsometimes
closedfixed 
10Server 2003
main 
pi 
Core
No
0008008: IBAN code validation problem
I have had problems with the IBAN code validation trigger function (c_bankaccountiban_trg).
A DATA_EXCEPTION is thrown while saving the bank account information.




1- Go to Financial Management || Receivables & Payables || Setup || Bank and create a new record:
     1.1- Name=Banque Cantonale Neuchateloise
     1.2- Location=Switzerland
2- Go to Bank Account tab, create a new record:
     2.1- Check Show IBAN
     2.2- IBAN=CH1700766000L35376922
3- I save it -> ERROR: Incorrect IBAN Code (DATA_EXCEPTION in trigger function)
A quick fix is to enter a short bank name ('BCN' for me works).

It seems that the exception is thrown while computing the 'Displayed Account' field.
250MP1
related to defect 0008737 closed rafaroda OB is out of use for Non-IBAN countries? 
related to defect 00104682.40MP11 closed vmromanos When a correct IBAN is introduced, an error appears 
Issue History
2009-03-06 17:42neil_smithNew Issue
2009-03-06 17:42neil_smithAssigned To => rafaroda
2009-03-06 17:54rafarodaAssigned Torafaroda => dalsasua
2009-03-16 11:52rafarodaNote Added: 0014670
2009-03-16 11:52rafarodaStatusnew => feedback
2009-03-27 11:09neil_smithNote Added: 0015034
2009-04-07 14:21walleNote Added: 0015257
2009-04-22 17:35psarobeNote Added: 0015570
2009-04-22 17:58dalsasuaNote Added: 0015573
2009-04-23 12:54rafarodaRelationship addedrelated to 0008737
2009-04-23 13:13psarobePrioritynormal => urgent
2009-04-23 13:13psarobeStatusfeedback => scheduled
2009-04-23 16:04psarobeTag Attached: 250MP1
2009-05-11 12:56vmromanosAssigned Todalsasua => vmromanos
2009-05-12 17:24hgbotCheckin
2009-05-12 17:24hgbotNote Added: 0016303
2009-05-12 17:24hgbotStatusscheduled => resolved
2009-05-12 17:24hgbotResolutionopen => fixed
2009-05-12 17:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1ff0231e17e7922ed8bc58bde4ff11a7d907b7a2 [^]
2009-06-08 15:08sureshbabuStatusresolved => closed
2009-06-08 15:08sureshbabuNote Added: 0017097
2009-06-08 15:08sureshbabuFixed in Version => pi
2009-06-09 00:00anonymoussf_bug_id0 => 2803186
2009-09-04 10:03rafarodaRelationship addedrelated to 0010468

Notes
(0014670)
rafaroda   
2009-03-16 11:52   
David,

Could you please determine whether this is a bug or not?

Thanks.
(0015034)
neil_smith   
2009-03-27 11:09   
Rafa,

I don't know if I'm supposed to give feedback, I don't know any David...

Anyway, I still feel that it's a bug because I can't create a new bank with a long name and the exception thrown is not clear enough to know what is wrong. Indeed, the IBAN code I entered is correct.
I don't feel that it's a major or critical bug, but some thing should be corrected (either a clearer error message or...)

Regards
Neil.
(0015257)
walle   
2009-04-07 14:21   
Hi all
I've tried the same thing.

With the following piece of code (now in standard) in the triggerfunction 'c_bankaccountiban_trg' works fine

IF (NEW.IBAN IS NOT NULL) THEN
        SELECT MOD(TO_NUMBER(SUBSTR(NEW.IBAN, 5, LENGTH(NEW.IBAN)-4)||
           ASCII(SUBSTR(UPPER(NEW.IBAN),1,1))-55
           ||ASCII(SUBSTR(UPPER(NEW.IBAN),2,1))-55||
           SUBSTR(NEW.IBAN,3,2)),97) AS DC
           INTO v_IBAN_check
        FROM DUAL;

Rafa, I think this piece of code is needed also in the function 'c_bp_bankaccountiban_trg' otherwise the same error "incorrect Iban Code" is visualized in the business partner - bankaccount mask.

In bankaccount mask you get the error "incorrect IBAN Code" when the name of the bank is to long. for example

"BANK OF SWITZERLAND" --> in this case the IBAN=CH1700766000L35376922 can be saved
"BANK OF SWITZERLAND WITH A LOT OF MONEY" --> in this case you get the error "Incorrect IBAN Code"

Hope this helps
BR, Walter
(0015570)
psarobe   
2009-04-22 17:35   
Reminder sent to: dalsasua

PLease take this one
(0015573)
dalsasua   
2009-04-22 17:58   
Yes, I detected this behavior some weeks ago. It is a bug. It will be fixed when bug fixing is scheduled again among our team's tasks.

Regards.
(0016303)
hgbot   
2009-05-12 17:24   
Repository: erp/devel/pi
Changeset: 1ff0231e17e7922ed8bc58bde4ff11a7d907b7a2
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Tue May 12 17:24:12 2009 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1ff0231e17e7922ed8bc58bde4ff11a7d907b7a2 [^]

Fixed bug 8008: IBAN code validation

---
M src-db/database/model/triggers/C_BANKACCOUNTIBAN_TRG.xml
M src-db/database/model/triggers/C_BP_BANKACCOUNTIBAN_TRG.xml
M src-db/database/sourcedata/AD_MESSAGE.xml
---
(0017097)
sureshbabu   
2009-06-08 15:08   
Tested working fine