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

Add hidden option to setup font size of information.

parent 6163503b
No related branches found
No related tags found
No related merge requests found
...@@ -451,11 +451,14 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default ...@@ -451,11 +451,14 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
{ {
global $mysoc, $conf; global $mysoc, $conf;
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
$diffsizecontent=(empty($conf->global->PDF_DIFFSIZE_CONTENT)?4:$conf->global->PDF_DIFFSIZE_CONTENT);
$pdf->SetXY($curx, $cury); $pdf->SetXY($curx, $cury);
if (empty($onlynumber)) if (empty($onlynumber))
{ {
$pdf->SetFont('','B',$default_font_size - 3); $pdf->SetFont('','B',$default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByTransferOnThisBankAccount').':', 0, 'L', 0);
$cury+=4; $cury+=4;
} }
...@@ -472,7 +475,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default ...@@ -472,7 +475,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
if (empty($onlynumber)) if (empty($onlynumber))
{ {
$pdf->SetFont('','',$default_font_size - 4); $pdf->SetFont('','',$default_font_size - $diffsizecontent);
$pdf->SetXY($curx, $cury); $pdf->SetXY($curx, $cury);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0);
$cury+=3; $cury+=3;
...@@ -544,12 +547,12 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default ...@@ -544,12 +547,12 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
} }
else else
{ {
$pdf->SetFont('','B',6); $pdf->SetFont('','B',$default_font_size - $diffsizecontent);
$pdf->SetXY($curx, $cury); $pdf->SetXY($curx, $cury);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("Bank").': ' . $outputlangs->convToOutputCharset($account->bank), 0, 'L', 0);
$cury+=3; $cury+=3;
$pdf->SetFont('','B',6); $pdf->SetFont('','B',$default_font_size - $diffsizecontent);
$pdf->SetXY($curx, $cury); $pdf->SetXY($curx, $cury);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities("BankAccountNumber").': ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities("BankAccountNumber").': ' . $outputlangs->convToOutputCharset($account->number), 0, 'L', 0);
$cury+=3; $cury+=3;
...@@ -561,7 +564,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default ...@@ -561,7 +564,7 @@ function pdf_bank(&$pdf,$outputlangs,$curx,$cury,$account,$onlynumber=0,$default
if ($account->getCountryCode() == 'IN') $ibankey="IFSC"; if ($account->getCountryCode() == 'IN') $ibankey="IFSC";
if ($account->getCountryCode() == 'IN') $bickey="SWIFT"; if ($account->getCountryCode() == 'IN') $bickey="SWIFT";
$pdf->SetFont('','',6); $pdf->SetFont('','',$default_font_size - $diffsizecontent);
if (empty($onlynumber) && ! empty($account->domiciliation)) if (empty($onlynumber) && ! empty($account->domiciliation))
{ {
......
...@@ -731,20 +731,22 @@ class pdf_crabe extends ModelePDFFactures ...@@ -731,20 +731,22 @@ class pdf_crabe extends ModelePDFFactures
// Si mode reglement non force ou si force a CHQ // Si mode reglement non force ou si force a CHQ
if (! empty($conf->global->FACTURE_CHQ_NUMBER)) if (! empty($conf->global->FACTURE_CHQ_NUMBER))
{ {
$diffsizetitle=(empty($conf->global->PDF_DIFFSIZE_TITLE)?3:$conf->global->PDF_DIFFSIZE_TITLE);
if ($conf->global->FACTURE_CHQ_NUMBER > 0) if ($conf->global->FACTURE_CHQ_NUMBER > 0)
{ {
$account = new Account($this->db); $account = new Account($this->db);
$account->fetch($conf->global->FACTURE_CHQ_NUMBER); $account->fetch($conf->global->FACTURE_CHQ_NUMBER);
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','B', $default_font_size - 3); $pdf->SetFont('','B', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio),0,'L',0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$account->proprio),0,'L',0);
$posy=$pdf->GetY()+1; $posy=$pdf->GetY()+1;
if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS))
{ {
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','', $default_font_size - 3); $pdf->SetFont('','', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($account->owner_address), 0, 'L', 0);
$posy=$pdf->GetY()+2; $posy=$pdf->GetY()+2;
} }
...@@ -752,14 +754,14 @@ class pdf_crabe extends ModelePDFFactures ...@@ -752,14 +754,14 @@ class pdf_crabe extends ModelePDFFactures
if ($conf->global->FACTURE_CHQ_NUMBER == -1) if ($conf->global->FACTURE_CHQ_NUMBER == -1)
{ {
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','B', $default_font_size - 3); $pdf->SetFont('','B', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$this->emetteur->name),0,'L',0); $pdf->MultiCell(100, 3, $outputlangs->transnoentities('PaymentByChequeOrderedTo',$this->emetteur->name),0,'L',0);
$posy=$pdf->GetY()+1; $posy=$pdf->GetY()+1;
if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS)) if (empty($conf->global->MAIN_PDF_HIDE_CHQ_ADDRESS))
{ {
$pdf->SetXY($this->marge_gauche, $posy); $pdf->SetXY($this->marge_gauche, $posy);
$pdf->SetFont('','', $default_font_size - 3); $pdf->SetFont('','', $default_font_size - $diffsizetitle);
$pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0); $pdf->MultiCell(100, 3, $outputlangs->convToOutputCharset($this->emetteur->getFullAddress()), 0, 'L', 0);
$posy=$pdf->GetY()+2; $posy=$pdf->GetY()+2;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment