New: Add custom code and origin country into invoice

This commit is contained in:
Laurent Destailleur 2010-12-01 23:15:39 +00:00
parent 3d04236d1e
commit a7992ef436

View File

@ -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.="<br>".$tmptxt;
}
return $libelleproduitservice;
}