From 9ec349f4103c13670be8994a45268f47ad0fba2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcos=20Garci=CC=81a=20de=20La=20Fuente?= Date: Tue, 1 Sep 2015 10:56:55 +0200 Subject: [PATCH] FIX [ bug #3432 ] Spaces should be removed from IBAN when formatting it Close #3432 --- ChangeLog | 1 + htdocs/core/lib/pdf.lib.php | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index f62facbdc3686..6886a87017fcf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21,6 +21,7 @@ FIX: Not showing task extrafields when creating from left menu FIX [ bug #3288 ] Tasks box is not properly drawn FIX [ bug #3211 ] Outstading bill amount of a client showed wrong amounts FIX [ bug #3321 ] Users with certain permissions were shown a "forbidden access" page even if they had the rights +FIX [ bug #3432 ] Spaces should be removed from IBAN when formatting it NEW: Created new ContratLigne::insert function diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index 794ba7ac2afcf..326d9e7d24f40 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -631,7 +631,8 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default if ($account->getCountryCode() == 'IN') $ibankey="IFSC"; if (! empty($account->iban)) { - $ibanDisplay_temp = $outputlangs->convToOutputCharset($account->iban); + //Remove whitespaces to ensure we are dealing with the format we expect + $ibanDisplay_temp = str_replace(' ', '', $outputlangs->convToOutputCharset($account->iban)); $ibanDisplay = ""; for($i = 0; $i < dol_strlen($ibanDisplay_temp); $i++)