Skip to content
Snippets Groups Projects
Commit a8928461 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

New: IBAN value is called IFSC if country is India

parent 815e8440
No related branches found
No related tags found
No related merge requests found
...@@ -824,6 +824,7 @@ class Account extends CommonObject ...@@ -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 ...@@ -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];
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment