From a1237065214c95427416db2d39b347c8b9acdf70 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 13 May 2009 10:21:26 +0000 Subject: [PATCH] =?UTF-8?q?Add:=20possibilit=E9=20de=20ne=20pas=20inclure?= =?UTF-8?q?=20la=20ref=20dans=20la=20description=20produit=20afin=20de=20p?= =?UTF-8?q?ouvoir=20=20l'inclure=20=E0=20part=20dans=20le=20document?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/lib/pdf.lib.php | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index 6770ba7be71..e02a3915f1e 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -192,10 +192,11 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass /** * \brief Return line description translated in outputlangs and encoded in UTF8 - * \param line Line to format - * \param outputlang Object lang for output + * \param line Line to format + * \param outputlang Object lang for output + * \param showref Show reference */ -function pdf_getlinedesc($line,$outputlangs) +function pdf_getlinedesc($line,$outputlangs,$showref=1) { global $db, $conf, $langs; @@ -256,6 +257,7 @@ function pdf_getlinedesc($line,$outputlangs) if ($prodser->ref) { $prefix_prodserv = ""; + $ref_prodserv = ""; if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this { if($prodser->isservice()) @@ -267,8 +269,10 @@ function pdf_getlinedesc($line,$outputlangs) $prefix_prodserv = $outputlangs->transnoentitiesnoconv("Product")." "; } } - - $libelleproduitservice=$prefix_prodserv.$prodser->ref." - ".$libelleproduitservice; + + if ($showref) $ref_prodserv = $prodser->ref." - "; + + $libelleproduitservice=$prefix_prodserv.$ref_prodserv.$libelleproduitservice; } } $libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1);