Contains several functions which are specific to the Petra Finance Module.
More...
|
int | CheckAccountNumber (String AAccountNumber, String ABankCountryCode) |
| Checks the validity of a bank account number. This function checks the validity of a bank account number by performing a country-specific check on the submitted account number, if a check rountine for that country exists. More...
|
|
Contains several functions which are specific to the Petra Finance Module.
◆ CheckAccountNumber()
int Ict.Petra.Shared.MFinance.CommonRoutines.CheckAccountNumber |
( |
String |
AAccountNumber, |
|
|
String |
ABankCountryCode |
|
) |
| |
|
inline |
Checks the validity of a bank account number. This function checks the validity of a bank account number by performing a country-specific check on the submitted account number, if a check rountine for that country exists.
- Parameters
-
AAccountNumber | Account number |
ABankCountryCode | Country code of the bank |
- Returns
- -1 = length check failed. 0 = invalid account number 1 = valid account number 2 = probably valid - account number cannot be validated by country-specific check 3 = account number could not be validated - no country-specific check implemented 4 = Bank partner could not be found
◆ CheckAccountNumberIsNotIBAN()
static bool Ict.Petra.Shared.MFinance.CommonRoutines.CheckAccountNumberIsNotIBAN |
( |
System.String |
AAccountNumber | ) |
|
|
inlinestatic |
Checks whether the given account number is NOT an IBAN.
This check is derived from a statement found in the 'EUROPEAN COMMITTEE FOR BANKING STANDARDS' (ECBS) document 'IBAN: STANDARD IMPLEMENTATION GUIDELINES' (SIG203 V3.2 - AUGUST 2003), Section 8.2., which says: "The presence of an IBAN can be detected from the two starting alpha
characters which signify the ISO country code followed by two numeric digits
which signify the IBAN check digits. <em>There are no domestic account numbers
known which start with two alpha characters followed by two numeric digits</em>."
- Parameters
-
AAccountNumber | String that should be checked. |
- Returns
- True if the submitted account number does not start with two letters followed by two digits. If the submitted account number does start with two letters followed by two digits then it returns False.
◆ CheckBIC()
static bool Ict.Petra.Shared.MFinance.CommonRoutines.CheckBIC |
( |
System.String |
ABic | ) |
|
|
inlinestatic |
Checks whether the submitted BIC (Bank Identifier Code) is valid.
The Bank Identifier Code is a unique address which, in telecommunication messages, identifies precisely the financial institutions involved in financial transactions. This identification method was recognised by the International Organisation for Standardisation (ISO).
BICs either have 8 or 11 characters. The 11-character version specifes the "Branch code" in addition to the other information. Here is an example of an BIC: "BANKCCLL" or "BANKCCLLMAR". BANK = Bank Code. "BANK" identifies the bank, here "banque BNP-Paribas". This four-character code is called the Bank Code. It is unique to each financial institution and can only be made up of letters. CC = Country Code. "CC" is the ISO country code for France. The country code identifies the country in which the financial institution is located and can only be made up of letters. LL = Location Code. "LL" stands for Paris. It is the Location Code. This 2-character code may be alphabetical or numerical. The location code provides geographical distinction within a country, eg., cities, states, provinces and time zones. MAR = Branch Code. "BNP-Paribas" has several branches throughout France. "MAR" identifies the "banque BNP-Paribas" branch in "Marseille", a city in the South of France. This 3-character code is called the Branch Code. It identifies a specific branch, or, for example, a department in a bank within the same country as the 8-character SWIFT BIC. This code may be alphabetical or numerical. The Branch code is optional for SWIFT users. Example from of the BIC code of London Branch of the HSBC Bank PLC (CITY OF LONDON CORPORATE OFFICE): MIDLGB2110C
There is a web site where BIC codes can be checked: http://www.swift.com/biconline/
- Parameters
-
ABic | String that should be checked |
- Returns
- True if ABic is a valid BIC or an empty String or nil, False if it is not valid.
◆ CheckIBAN()
static bool Ict.Petra.Shared.MFinance.CommonRoutines.CheckIBAN |
( |
System.String |
AIban, |
|
|
out TVerificationResult |
AResult |
|
) |
| |
|
inlinestatic |
Checks whether the submitted IBAN (International Bank Account Number) is valid.
The IBAN is an ISO standard (ISO 13616) designed to ensure that account details are given in a standard format (bank plus account). IBAN was introduced to provide an international standard for payee account details and to make details more easy to check. IBAN is a standardised international format for entering account details which consists of the country code (bank which maintains the account), the local bank code (eg. in the UK this is the sortcode), the (payee) account number and a two check digits. Please note that IBANs do not start with "IBAN " and do not contain spaces when stored in computer systems. Here is an example of an IBAN: DE89370400440532013000 DE = ISO 3166-1 country code (NOTE: The country code used in an IBAN can deviate from the country code used in a BIC! 89 = two check digits 37040044 = sortcode 0532013000 = account number. IBANs are only issued by the bank where the account it is issued for is held.
- Parameters
-
AIban | String that should be checked |
AResult | |
- Returns
- True if AIban is a valid Iban or an empty String or nil, False if it is not valid.
◆ GetBestExchangeRate()
static bool Ict.Petra.Shared.MFinance.CommonRoutines.GetBestExchangeRate |
( |
ExchangeRateTDSADailyExchangeRateTable |
ADailyRateTable, |
|
|
string |
ACurrencyFrom, |
|
|
string |
ACurrencyTo, |
|
|
Boolean |
AEnforceUniqueRate, |
|
|
out decimal |
ARateOfExchange, |
|
|
out DateTime |
AEffectiveDate |
|
) |
| |
|
inlinestatic |
Gets the best (latest) exchange rate for a pair of currencies from a table of rates.
- Parameters
-
ADailyRateTable | A table of rates that has been obtained by calling LoadExchangeRateData for a period of interest. |
ACurrencyFrom | The 'from' currency |
ACurrencyTo | The 'to' currency |
AEnforceUniqueRate | If true the method will only return true if there is a unique rate for the specified currencies on the 'latest' date. If false the method returns the rate for the latest 'time' on the latest date. |
ARateOfExchange | The returned rate |
AEffectiveDate | The date associated with the returned rate. |
- Returns
- True if a matching rate was found. The rate and date are in the out parameters.
The documentation for this class was generated from the following file: