Hier ein Link, wie man IBAN - International Bank Account Number - SWIFT berechnet.
mfg
Otto
http://www.xbaseforum.de/viewtopic.php?f=6&t=6863
IBAN - International Bank Account Number - SWIFT
- Otto
- Posts: 6418
- Joined: Fri Oct 07, 2005 7:07 pm
- Has thanked: 43 times
- Been thanked: 2 times
- Contact:
IBAN - International Bank Account Number - SWIFT
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: IBAN - International Bank Account Number - SWIFT
und eine Function, die IBAN zu überprüfen
Code: Select all | Expand
FUNCTION CheckIBAN (cIBAN) LOCAL cCountryID := SubStr (cIBAN,1,2) LOCAL cCheck := SubStr (cIban,5,Len(cIban)) +; SubStr (CreateCountryID (cCountryID),1,4)+; Substr (cIBAN,3,2) LOCAL nCheck, nID nID := ( _CalcModulo (cCheck)) nCheck := Int (nId % 97)//? cCheck, nID, nCheckRETURN (nCheck == 1)//-------------------------------------------------------------//STATIC FUNCTION CreateCountryID (cCountry) LOCAL cLatin := "ABCDEFGHIJKLMNOPQRSTUVWXYZ" LOCAL nID := At (Substr(cCountry,1,1),cLatin)+9 LOCAL nID2 := At (Substr(cCountry,2,1),cLatin)+9RETURN (Str (nID,2,0)+Str(nID2,2,0)+"00")//---------------------------------------------------------------------//STATIC FUNCTION _CalcModulo (cControlNr) LOCAL nMod //:= Int (Val (cControlNr)) % 97 LOCAL nNr, cNr //:= 98 - nMod, nVal := Val (cControlNr) LOCAL cMod := "", i, cID FOR i := 1 TO Len (cControlNr) STEP 8 cNr := cMod+Substr (cControlNr,i,8) nNr := Val (cNr) % 97 cMod := Str (nNr, Lennum (nNr),0) NEXT nMod := Int (Val (cMod))RETURN (nMod)
kind regards
Stefan
Stefan