New: IBAN value is called IFSC if country is India
This commit is contained in:
parent
815e84404c
commit
a8928461f3
@ -824,6 +824,7 @@ class Account extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* \brief Return account country code
|
* \brief Return account country code
|
||||||
* \return String country code
|
* \return String country code
|
||||||
|
* TODO Add a field in bank_account table to store country
|
||||||
*/
|
*/
|
||||||
function getCountryCode()
|
function getCountryCode()
|
||||||
{
|
{
|
||||||
@ -831,6 +832,8 @@ class Account extends CommonObject
|
|||||||
|
|
||||||
if (! empty($this->iban))
|
if (! empty($this->iban))
|
||||||
{
|
{
|
||||||
|
if ($mysoc->pays_code === 'IN') return $mysoc->pays_code; // Test before to use IBAN
|
||||||
|
|
||||||
// If IBAN defined, we can know country of account from it
|
// If IBAN defined, we can know country of account from it
|
||||||
if (preg_match("/^([a-zA-Z][a-zA-Z])/i",$this->iban,$reg)) return $reg[1];
|
if (preg_match("/^([a-zA-Z][a-zA-Z])/i",$this->iban,$reg)) return $reg[1];
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user