From dfdc9da781fda557038b4293dda79ca10b816732 Mon Sep 17 00:00:00 2001 From: Grand Philippe Date: Tue, 3 Sep 2013 11:15:19 +0200 Subject: [PATCH] Add an additional description for the category products --- htdocs/core/lib/pdf.lib.php | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a4b091347d0..621b06965e1 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1031,7 +1031,23 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl $libelleproduitservice=$prefix_prodserv.$ref_prodserv.$libelleproduitservice; } } - + + // Add an additional description for the category products + if ($conf->categorie->enabled) + { + include_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; + $categstatic=new Categorie($db); + // recovering the list of all the categories linked to product + $tblcateg=$categstatic->containing($idprod,0); + foreach ($tblcateg as $cate) + { + // Adding the descriptions if they are filled + $desccateg=$cate->add_description; + if ($desccateg) + $libelleproduitservice.='__N__'.$desccateg; + } + } + if (! empty($object->lines[$i]->date_start) || ! empty($object->lines[$i]->date_end)) { $format='day';