Fix: Bug texte qui se superpose sur PDF

This commit is contained in:
Laurent Destailleur 2006-06-12 20:40:01 +00:00
parent eb3cdce66d
commit 3a18cc0e38
2 changed files with 383 additions and 369 deletions

View File

@ -179,7 +179,7 @@ class pdf_bernique extends ModelePDFFactures {
$account = new Account($this->db); $account = new Account($this->db);
$account->fetch(FACTURE_RIB_NUMBER); $account->fetch(FACTURE_RIB_NUMBER);
$pdf->SetXY (10, 49); $pdf->SetXY (10, 40);
$pdf->SetFont('Arial','U',8); $pdf->SetFont('Arial','U',8);
$pdf->MultiCell(40, 4, $langs->trans("BankDetails"), 0, 'L', 0); $pdf->MultiCell(40, 4, $langs->trans("BankDetails"), 0, 'L', 0);
$pdf->SetFont('Arial','',8); $pdf->SetFont('Arial','',8);
@ -254,10 +254,18 @@ class pdf_bernique extends ModelePDFFactures {
$pdf->SetXY (10, $tab3_top + 12); $pdf->SetXY (10, $tab3_top + 12);
$pdf->MultiCell(20, 6, $langs->trans("Bank"), 0, 'L', 0); $pdf->MultiCell(20, 6, $langs->trans("Bank"), 0, 'L', 0);
$pdf->SetFont('Arial','U',12); /*
$titre = $langs->trans("PaymentConditions").' : '.$fac->cond_reglement_facture; * Conditions de règlements
$pdf->SetXY(200 - $pdf->GetStringWidth($titre), $tab3_top + 10); */
$pdf->MultiCell(120, 5, $titre, 0, 'J'); if ($fac->cond_reglement_code)
{
$pdf->SetFont('Arial','U',10);
$titre = $langs->trans("PaymentConditions").': ';
$lib_condition_paiement=$langs->trans("PaymentCondition".$fac->cond_reglement_code)?$langs->trans("PaymentCondition".$fac->cond_reglement_code):$fac->cond_reglement;
// $pdf->MultiCell(80, 5, $lib_condition_paiement,0,'L');
$pdf->SetXY(200 - $pdf->GetStringWidth($titre.$lib_condition_paiement), $tab3_top + 10);
$pdf->MultiCell(120, 5, $titre.$lib_condition_paiement, 0, 'J');
}
} }
function _tableau_tot(&$pdf, $fac, $top, $height) function _tableau_tot(&$pdf, $fac, $top, $height)
@ -327,6 +335,7 @@ class pdf_bernique extends ModelePDFFactures {
$pdf->SetXY (174, $tab2_top + $tab2_hl * 4); $pdf->SetXY (174, $tab2_top + $tab2_hl * 4);
$pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc), 0, 'R', 1); $pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc), 0, 'R', 1);
} }
/* /*
* *
*/ */

View File

@ -166,7 +166,7 @@ class pdf_bulot extends ModelePDFFactures {
} }
$this->_tableau($pdf, $tab_top, $tab_height, $nexY); $this->_tableau($pdf, $tab_top, $tab_height, $nexY);
$this->_tableau_tot($pdf, $fac); $this->_tableau_tot($pdf, $fac, $tab_top, $tab_height);
$this->_tableau_compl($pdf, $fac); $this->_tableau_compl($pdf, $fac);
@ -266,16 +266,17 @@ class pdf_bulot extends ModelePDFFactures {
* \param fac objet facture * \param fac objet facture
* \param deja_regle montant deja regle * \param deja_regle montant deja regle
*/ */
function _tableau_tot(&$pdf, $fac) function _tableau_tot(&$pdf, $fac, $top, $height)
{ {
global $langs; global $langs;
$langs->load("main"); $langs->load("main");
$langs->load("bills"); $langs->load("bills");
$tab2_top = 212; $tab2_top = $top + $height;
$tab2_hl = 5; $tab2_hl = 5;
$tab2_height = $tab2_hl * 4; $tab2_height = $tab2_hl * 4;
$pdf->SetFont('Arial','', 9); $pdf->SetFont('Arial','', 9);
$pdf->SetFont('Arial','', 9);
// $pdf->Rect(132, $tab2_top, 68, $tab2_height); // $pdf->Rect(132, $tab2_top, 68, $tab2_height);
// $pdf->line(174, $tab2_top, 174, $tab2_top + $tab2_height); // $pdf->line(174, $tab2_top, 174, $tab2_top + $tab2_height);
@ -340,6 +341,8 @@ class pdf_bulot extends ModelePDFFactures {
$pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc - $deja_regle), 0, 'R', 1); $pdf->MultiCell(26, $tab2_hl, price($fac->total_ttc - $deja_regle), 0, 'R', 1);
} }
} }
/* /*
* \brief Affiche la grille des lignes de factures * \brief Affiche la grille des lignes de factures
* \param pdf objet PDF * \param pdf objet PDF
@ -369,6 +372,8 @@ class pdf_bulot extends ModelePDFFactures {
$pdf->Rect(10, $tab_top, 190, $tab_height); $pdf->Rect(10, $tab_top, 190, $tab_height);
$pdf->line(10, $tab_top + 10, 200, $tab_top + 10 ); $pdf->line(10, $tab_top + 10, 200, $tab_top + 10 );
} }
/* /*
* \brief Affiche en-tête facture * \brief Affiche en-tête facture
* \param pdf objet PDF * \param pdf objet PDF