Update pdf.lib.php

This commit is contained in:
fr69400 2021-11-30 12:13:21 +01:00
parent 5a165ae2bf
commit 078a040078

View File

@ -1364,7 +1364,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
$libelleproduitservice = $label; $libelleproduitservice = $label;
if (!empty($libelleproduitservice) && !empty($conf->global->PDF_BOLD_PRODUCT_LABEL)) { if (!empty($libelleproduitservice) && !empty($conf->global->PDF_BOLD_PRODUCT_LABEL)) {
if (!dol_textishtml($libelleproduitservice)){ if (!dol_textishtml($libelleproduitservice)){
$libelleproduitservice = str_replace("\n", '__N__', $libelleproduitservice); $libelleproduitservice = str_replace("\n", '<br>', $libelleproduitservice);
} }
$libelleproduitservice = '<b>'.$libelleproduitservice.'</b>'; $libelleproduitservice = '<b>'.$libelleproduitservice.'</b>';
} }
@ -1496,7 +1496,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
if (!empty($ref_prodserv) && !empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) { if (!empty($ref_prodserv) && !empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) {
if (!dol_textishtml($libelleproduitservice)){ if (!dol_textishtml($libelleproduitservice)){
$libelleproduitservice = str_replace("\n", '__N__', $libelleproduitservice); $libelleproduitservice = str_replace("\n", '<br>', $libelleproduitservice);
} }
$ref_prodserv = '<b>'.$ref_prodserv.'</b>'; $ref_prodserv = '<b>'.$ref_prodserv.'</b>';
// $prefix_prodserv and $ref_prodser are not HTML var // $prefix_prodserv and $ref_prodser are not HTML var
@ -1534,9 +1534,9 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0,
//print '>'.$outputlangs->charset_output.','.$period; //print '>'.$outputlangs->charset_output.','.$period;
if (!empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) { if (!empty($conf->global->PDF_BOLD_PRODUCT_REF_AND_PERIOD)) {
if (!dol_textishtml($libelleproduitservice)){ if (!dol_textishtml($libelleproduitservice)){
$libelleproduitservice = str_replace("\n", '__N__', $libelleproduitservice); $libelleproduitservice = str_replace("\n", '<br>', $libelleproduitservice);
} }
$libelleproduitservice .= '<b style="color:#333666;" ><em>'."__N__</b> ".$period.'</em>'; $libelleproduitservice .= '<br><b style="color:#333666;" ><em>'.$period.'</em></b>';
} else { } else {
$libelleproduitservice .= "__N__".$period; $libelleproduitservice .= "__N__".$period;
} }