2
0
forked from Wavyzz/dolibarr

Merge pull request #4855 from marcosgdf/account-oop

NEW Created FormBank::getIBANLabel function to get the label of "IBAN" depending on bank account country
This commit is contained in:
Laurent Destailleur
2016-03-25 17:41:39 +01:00
3 changed files with 22 additions and 8 deletions

View File

@@ -602,6 +602,8 @@ function pdf_watermark(&$pdf, $outputlangs, $h, $w, $unit, $text)
*/
function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default_font_size=10)
{
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formbank.class.php';
global $mysoc, $conf;
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
@@ -749,8 +751,8 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
else if (! $usedetailedbban) $cury+=1;
// Use correct name of bank id according to country
$ibankey="IBANNumber";
if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
$ibankey = FormBank::getIBANLabel($account);
if (! empty($account->iban))
{
//Remove whitespaces to ensure we are dealing with the format we expect