How to include customer BARCODE on Invoice

find this code

// Description of product line
if ($this->getColumnStatus(‘desc’)) {
if ($object->lines[$i]->special_code != SUBTOTALS_SPECIAL_CODE) {
$this->printColDescContent($pdf, $curY, ‘desc’, $object, $i, $outputlangs, $hideref, $hidedesc);
$this->setAfterColsLinePositionsData(‘desc’, $pdf->GetY(), $pdf->getPage());

after this add

if (!getDolGlobalString(‘MAIN_GENERATE_DOCUMENTS_SHOW_PRODUCT_BARCODE’) && !empty($this->getBarcode($object->lines[$i]->fk_product))) {
$code = $this->getBarcode($object->lines[$i]->fk_product);
$barcodeType = ‘C128’;
$pdf->setXY($this->getColumnContentXStart(‘desc’),$curY + 15);
//$pdf->write2DBarcode($code, ‘QRCODE,M’, $this->getColumnContentXStart(‘desc’) , $curY + 15, 20, 20, $styleQr, ‘N’);
$pdf->write1DBarcode($code, $barcodeType, $this->getColumnContentXStart(‘desc’) , $curY + 13, 70, 10, 0.4, array(‘position’=>‘S’, ‘border’=>false, ‘padding’=>1, ‘fgcolor’=>array(0,0,0), ‘text’=>false, ‘font’=>‘helvetica’, ‘fontsize’=>8, ‘stretchtext’=>2), ‘N’);
$this->setAfterColsLinePositionsData(‘desc’, $nexY, $pdf->getPage());
$this->setAfterColsLinePositionsData(‘desc’, $pdf->GetY(), $pdf->getPage());
}

and place this code to get product barcode data outside this function

public function getBarcode($id)
	{
	$sql = "SELECT barcode FROM ".MAIN_DB_PREFIX."product";
	$sql .= " WHERE rowid = ".((int) $id);
	dol_syslog(get_class($this).'::getValueFrom', LOG_DEBUG);
	$resql = $this->db->query($sql);
	if ($resql) {
		$row = $this->db->fetch_row($resql);
		$result = $row[0];
		}
	return $result;
	}