FIX: Too many information were hidden. A lot of users still need bank
account on PDF.
This commit is contained in:
parent
93be4305c4
commit
b75923871c
@ -173,7 +173,7 @@ function pdf_getInstance($format='',$metric='mm',$pagetype='P')
|
|||||||
* This class is an enhanced FPDI class that support method writeHTMLCell
|
* This class is an enhanced FPDI class that support method writeHTMLCell
|
||||||
*/
|
*/
|
||||||
class FPDI_DolExtended extends FPDI
|
class FPDI_DolExtended extends FPDI
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* __call
|
* __call
|
||||||
*
|
*
|
||||||
@ -565,71 +565,77 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
|||||||
$cury+=3;
|
$cury+=3;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
if (empty($conf->global->PDF_BANK_HIDE_NUMBER_SHOW_ONLY_BICIBAN)) // Note that some countries still need bank number, BIC/IBAN not enought for them
|
||||||
if (empty($onlynumber)) $pdf->line($curx+1, $cury+1, $curx+1, $cury+8);
|
|
||||||
|
|
||||||
if ($usedetailedbban == 1)
|
|
||||||
{
|
{
|
||||||
$fieldstoshow=array('bank','desk','number','key');
|
// Note:
|
||||||
if ($conf->global->BANK_SHOW_ORDER_OPTION==1) $fieldstoshow=array('bank','desk','key','number');
|
// bank = code_banque (FR), sort code (GB, IR. Example: 12-34-56)
|
||||||
|
// desk = code guichet (FR), used only when $usedetailedbban = 1
|
||||||
|
// number = account number
|
||||||
|
// key = check control key used only when $usedetailedbban = 1
|
||||||
|
if (empty($onlynumber)) $pdf->line($curx+1, $cury+1, $curx+1, $cury+6);
|
||||||
|
|
||||||
|
if ($usedetailedbban == 1)
|
||||||
|
{
|
||||||
|
$fieldstoshow=array('bank','desk','number','key');
|
||||||
|
if ($conf->global->BANK_SHOW_ORDER_OPTION == 1) $fieldstoshow=array('bank','desk','key','number');
|
||||||
|
}
|
||||||
|
else if ($usedetailedbban == 2)
|
||||||
|
{
|
||||||
|
$fieldstoshow=array('bank','number');
|
||||||
|
}
|
||||||
|
else dol_print_error('','Value returned by function useDetailedBBAN not managed');
|
||||||
|
|
||||||
|
foreach ($fieldstoshow as $val)
|
||||||
|
{
|
||||||
|
if ($val == 'bank')
|
||||||
|
{
|
||||||
|
// Bank code
|
||||||
|
$tmplength=18;
|
||||||
|
$pdf->SetXY($curx, $cury+4);
|
||||||
|
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
||||||
|
$pdf->SetXY($curx, $cury+1);
|
||||||
|
$curx+=$tmplength;
|
||||||
|
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
||||||
|
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+7);
|
||||||
|
}
|
||||||
|
if ($val == 'desk')
|
||||||
|
{
|
||||||
|
// Desk
|
||||||
|
$tmplength=18;
|
||||||
|
$pdf->SetXY($curx, $cury+4);
|
||||||
|
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
||||||
|
$pdf->SetXY($curx, $cury+1);
|
||||||
|
$curx+=$tmplength;
|
||||||
|
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
||||||
|
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+7);
|
||||||
|
}
|
||||||
|
if ($val == 'number')
|
||||||
|
{
|
||||||
|
// Number
|
||||||
|
$tmplength=24;
|
||||||
|
$pdf->SetXY($curx, $cury+4);
|
||||||
|
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
||||||
|
$pdf->SetXY($curx, $cury+1);
|
||||||
|
$curx+=$tmplength;
|
||||||
|
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
||||||
|
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+7);
|
||||||
|
}
|
||||||
|
if ($val == 'key')
|
||||||
|
{
|
||||||
|
// Key
|
||||||
|
$tmplength=13;
|
||||||
|
$pdf->SetXY($curx, $cury+4);
|
||||||
|
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
||||||
|
$pdf->SetXY($curx, $cury+1);
|
||||||
|
$curx+=$tmplength;
|
||||||
|
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
||||||
|
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+7);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$curx=$savcurx;
|
||||||
|
$cury+=8;
|
||||||
}
|
}
|
||||||
else if ($usedetailedbban == 2)
|
|
||||||
{
|
|
||||||
$fieldstoshow=array('bank','number');
|
|
||||||
}
|
|
||||||
else dol_print_error('','Value returned by function useDetailedBBAN not managed');
|
|
||||||
|
|
||||||
foreach ($fieldstoshow as $val)
|
|
||||||
{
|
|
||||||
if ($val == 'bank')
|
|
||||||
{
|
|
||||||
// Bank code
|
|
||||||
$tmplength=18;
|
|
||||||
$pdf->SetXY($curx, $cury+5);
|
|
||||||
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_banque), 0, 'C', 0);
|
|
||||||
$pdf->SetXY($curx, $cury+1);
|
|
||||||
$curx+=$tmplength;
|
|
||||||
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankCode"), 0, 'C', 0);
|
|
||||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8);
|
|
||||||
}
|
|
||||||
if ($val == 'desk')
|
|
||||||
{
|
|
||||||
// Desk
|
|
||||||
$tmplength=18;
|
|
||||||
$pdf->SetXY($curx, $cury+5);
|
|
||||||
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->code_guichet), 0, 'C', 0);
|
|
||||||
$pdf->SetXY($curx, $cury+1);
|
|
||||||
$curx+=$tmplength;
|
|
||||||
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("DeskCode"), 0, 'C', 0);
|
|
||||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8);
|
|
||||||
}
|
|
||||||
if ($val == 'number')
|
|
||||||
{
|
|
||||||
// Number
|
|
||||||
$tmplength=24;
|
|
||||||
$pdf->SetXY($curx, $cury+5);
|
|
||||||
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->number), 0, 'C', 0);
|
|
||||||
$pdf->SetXY($curx, $cury+1);
|
|
||||||
$curx+=$tmplength;
|
|
||||||
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumber"), 0, 'C', 0);
|
|
||||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8);
|
|
||||||
}
|
|
||||||
if ($val == 'key')
|
|
||||||
{
|
|
||||||
// Key
|
|
||||||
$tmplength=13;
|
|
||||||
$pdf->SetXY($curx, $cury+5);
|
|
||||||
$pdf->SetFont('','',$default_font_size - 3);$pdf->MultiCell($tmplength, 3, $outputlangs->convToOutputCharset($account->cle_rib), 0, 'C', 0);
|
|
||||||
$pdf->SetXY($curx, $cury+1);
|
|
||||||
$curx+=$tmplength;
|
|
||||||
$pdf->SetFont('','B',$default_font_size - 4);$pdf->MultiCell($tmplength, 3, $outputlangs->transnoentities("BankAccountNumberKey"), 0, 'C', 0);
|
|
||||||
if (empty($onlynumber)) $pdf->line($curx, $cury+1, $curx, $cury+8);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$curx=$savcurx;
|
|
||||||
$cury+=9;
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -679,7 +685,8 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
|
|||||||
$ibanDisplay_temp = str_replace(' ', '', $outputlangs->convToOutputCharset($account->iban));
|
$ibanDisplay_temp = str_replace(' ', '', $outputlangs->convToOutputCharset($account->iban));
|
||||||
$ibanDisplay = "";
|
$ibanDisplay = "";
|
||||||
|
|
||||||
for($i = 0; $i < dol_strlen($ibanDisplay_temp); $i++)
|
$nbIbanDisplay_temp = dol_strlen($ibanDisplay_temp);
|
||||||
|
for($i = 0; $i < $nbIbanDisplay_temp; $i++)
|
||||||
{
|
{
|
||||||
$ibanDisplay .= $ibanDisplay_temp[$i];
|
$ibanDisplay .= $ibanDisplay_temp[$i];
|
||||||
if($i%4 == 3 && $i > 0) $ibanDisplay .= " ";
|
if($i%4 == 3 && $i > 0) $ibanDisplay .= " ";
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user