Add: possibilité de ne pas inclure la ref dans la description produit afin de pouvoir

l'inclure à part dans le document
This commit is contained in:
Regis Houssin 2009-05-13 10:21:26 +00:00
parent ce193f0808
commit a123706521

View File

@ -192,10 +192,11 @@ function pdf_pagefoot(&$pdf,$outputlangs,$paramfreetext,$fromcompany,$marge_bass
/** /**
* \brief Return line description translated in outputlangs and encoded in UTF8 * \brief Return line description translated in outputlangs and encoded in UTF8
* \param line Line to format * \param line Line to format
* \param outputlang Object lang for output * \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; global $db, $conf, $langs;
@ -256,6 +257,7 @@ function pdf_getlinedesc($line,$outputlangs)
if ($prodser->ref) if ($prodser->ref)
{ {
$prefix_prodserv = ""; $prefix_prodserv = "";
$ref_prodserv = "";
if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this if ($conf->global->PRODUCT_ADD_TYPE_IN_DOCUMENTS) // In standard mode, we do not show this
{ {
if($prodser->isservice()) if($prodser->isservice())
@ -268,7 +270,9 @@ function pdf_getlinedesc($line,$outputlangs)
} }
} }
$libelleproduitservice=$prefix_prodserv.$prodser->ref." - ".$libelleproduitservice; if ($showref) $ref_prodserv = $prodser->ref." - ";
$libelleproduitservice=$prefix_prodserv.$ref_prodserv.$libelleproduitservice;
} }
} }
$libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1); $libelleproduitservice=dol_htmlentitiesbr($libelleproduitservice,1);