From a8928461f3b435bfc875bd2c62b5c3cb610fd551 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 17 Jun 2010 21:43:46 +0000 Subject: [PATCH] New: IBAN value is called IFSC if country is India --- htdocs/compta/bank/class/account.class.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 60dff4cf109..8e10da2c452 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -824,6 +824,7 @@ class Account extends CommonObject /** * \brief Return account country code * \return String country code + * TODO Add a field in bank_account table to store country */ function getCountryCode() { @@ -831,6 +832,8 @@ class Account extends CommonObject 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 (preg_match("/^([a-zA-Z][a-zA-Z])/i",$this->iban,$reg)) return $reg[1]; }