From 0ad2c4a0277ef90654e5b096cafe287fd5a67708 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 26 Apr 2012 10:29:46 +0200 Subject: [PATCH] Fix: problem of line break between label and description when using fckeditor --- htdocs/core/lib/pdf.lib.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a8c07cf0b5d..8469ca9b931 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -807,7 +807,11 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl // Description long of product line if ($desc && ($desc != $label)) { - if ( $libelleproduitservice && empty($hidedesc) ) $libelleproduitservice.="\n"; + if ($libelleproduitservice && empty($hidedesc)) + { + if ($conf->global->FCKEDITOR_ENABLE_DETAILS) $libelleproduitservice.='
'; + else $libelleproduitservice.="\n"; + } if ($desc == '(CREDIT_NOTE)' && $object->lines[$i]->fk_remise_except) { @@ -827,7 +831,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl { if ($idprod) { - if ( empty($hidedesc) ) $libelleproduitservice.=$desc; + if (empty($hidedesc)) $libelleproduitservice.=$desc; } else { @@ -846,7 +850,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl $ref_prodserv = ""; if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this { - if($prodser->isservice()) + if ($prodser->isservice()) { $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Service")." "; } @@ -856,7 +860,7 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl } } - if ( empty($hideref) ) + if (empty($hideref)) { if ($issupplierline) $ref_prodserv = $prodser->ref.' ('.$outputlangs->transnoentitiesnoconv("SupplierRef").' '.$ref_supplier.')'; // Show local ref and supplier ref else $ref_prodserv = $prodser->ref; // Show local ref only