From a7992ef436f4cdcd65c829c6f9781a12c38ec3cb Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 1 Dec 2010 23:15:39 +0000 Subject: [PATCH] New: Add custom code and origin country into invoice --- htdocs/lib/pdf.lib.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/htdocs/lib/pdf.lib.php b/htdocs/lib/pdf.lib.php index fa6535d56ee..89a35d76989 100644 --- a/htdocs/lib/pdf.lib.php +++ b/htdocs/lib/pdf.lib.php @@ -633,6 +633,18 @@ function pdf_getlinedesc($object,$i,$outputlangs,$hideref=0,$hidedesc=0,$issuppl //print $libelleproduitservice; } + // Note that we used here current custom and origin country code. + if (! empty($prodser->customcode) || ! empty($prodser->country_code)) + { + //var_dump($prodser);exit; + $tmptxt='('; + if (! empty($prodser->customcode)) $tmptxt.=$langs->transnoentitiesnoconv("CustomCode").': '.$prodser->customcode; + if (! empty($prodser->customcode) && ! empty($prodser->country_code)) $tmptxt.=' - '; + if (! empty($prodser->country_code)) $tmptxt.=$langs->transnoentitiesnoconv("CountryOrigin").': '.getCountry($prodser->country_code,0,$db,$outputlangs,0); + $tmptxt.=')'; + $libelleproduitservice.="
".$tmptxt; + } + return $libelleproduitservice; }