Fix: Bad CR for public note. Must work when text is full text with \n

and also when text is HTML with br.
This commit is contained in:
Laurent Destailleur 2012-04-20 13:41:55 +02:00
parent 91b8f33ea5
commit 907c7f748d
10 changed files with 12 additions and 12 deletions

View File

@ -235,7 +235,7 @@ class pdf_einstein extends ModelePDFCommandes
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;
@ -309,7 +309,7 @@ class pdf_einstein extends ModelePDFCommandes
if ($object->remise_percent) $tvaligne-=($tvaligne*$object->remise_percent)/100;
if ($object->remise_percent) $localtax1ligne-=($localtax1ligne*$object->remise_percent)/100;
if ($object->remise_percent) $localtax2ligne-=($localtax2ligne*$object->remise_percent)/100;
$vatrate=(string) $object->lines[$i]->tva_tx;
$localtax1rate=(string) $object->lines[$i]->localtax1_tx;
$localtax2rate=(string) $object->lines[$i]->localtax2_tx;

View File

@ -195,7 +195,7 @@ Class pdf_expedition_rouget extends ModelePdfExpedition
if (! empty($object->note_public))
{
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
}
$nexY = $pdf->GetY();

View File

@ -235,7 +235,7 @@ class pdf_crabe extends ModelePDFFactures
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;

View File

@ -185,7 +185,7 @@ class pdf_soleil extends ModelePDFFicheinter
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;

View File

@ -213,7 +213,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;

View File

@ -173,7 +173,7 @@ class pdf_baleine extends ModelePDFProjects
if (! empty($object->note_public))
{
$pdf->SetFont('','', $default_font_size - 1);
$pdf->writeHTMLCell(190, 3, $this->posxref-1, $tab_top-2, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxref-1, $tab_top-2, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-($tab_top-2);

View File

@ -222,7 +222,7 @@ class pdf_azur extends ModelePDFPropales
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;

View File

@ -222,7 +222,7 @@ class pdf_jaune extends ModelePDFPropales
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 4, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;

View File

@ -228,7 +228,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Dans boucle pour gerer multi-page
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;

View File

@ -241,7 +241,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
$tab_top = 88;
$pdf->SetFont('','', $default_font_size - 1); // Into loop to manage multipages
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, $outputlangs->convToOutputCharset($object->note_public), 0, 1);
$pdf->writeHTMLCell(190, 3, $this->posxdesc-1, $tab_top, dol_htmlentitiesbr($object->note_public), 0, 1);
$nexY = $pdf->GetY();
$height_note=$nexY-$tab_top;
@ -1008,7 +1008,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
{
$carac_client_name=$outputlangs->convToOutputCharset($object->client->name);
}
$carac_client=pdf_build_address($outputlangs,$this->emetteur,$object->client,$object->contact,$usecontact,'target');
// Show recipient