[Vtigercrm-developers] Did anybody work on PDFMaker custom function?
kiran
kiranraju.jakka at gmail.com
Thu Sep 8 04:14:41 GMT 2016
@Matus.
I have done like this
<?php
global $log;
if (!function_exists('product_custom')) {
function product_custom($entityid) {
$adb = PearDatabase::getInstance();
$row = $adb->fetchByAssoc($adb->pquery("SELECT listprice FROM
vtiger_inventoryproductrel WHERE id=?", array($entityid)));
$listprice = $row['listprice'];
$f = "
Name
";
$start = "
";
for($j=0;$j<count($row);$j++){
$loop1 = $loop1."<td>$listprice";
}
$end = "";
$e = "
";
return $f.$start.$loop1.$end.$e;
}
}
Here $entityid is purchaseorderid when doing this it is working with
purchase order have only one line item. I have tried this with purchase
order with multiple line items, but nothing is returning. Can you have any
idea where should i have mistaken?
Thanks & Regards
--
View this message in context: http://vtiger-crm.2324883.n4.nabble.com/Vtigercrm-developers-Did-anybody-work-on-PDFMaker-custom-function-tp19780p19790.html
Sent from the vtigercrm-developers mailing list archive at Nabble.com.
More information about the vtigercrm-developers
mailing list