twistedhardware
New Member
Hi,
I have a calc element with the following code:
It worked fine in 3.0 but in 3.1 {erp_account___Organization_raw} doesn't return a value. I have tried {erp_account___Organization} and it DOES return the label.
I have even tried $data['erp_account___Organization_raw'] but I'm still geting empty value back from it.
Just to calrify erp_account___Organization is a datajoin.
I have just updated from github.
I have a calc element with the following code:
Code:
$db =& JFactory::getDBO();
$db->setQuery("SELECT SUM(`erp_transaction`.`Amount`) FROM `erp_transaction` LEFT JOIN `erp_account` ON `erp_account`.`id`=`erp_transaction`.`DebitAccount` WHERE `erp_account`.`FullAccountNumber` LIKE '{erp_account___FullAccountNumber}%' AND `erp_transaction`.Staus='Actual' AND `erp_transaction`.Organization= {erp_account___Organization_raw}");
$result_val = $db->loadResult();
return number_format($result_val,2,'.','');
I have even tried $data['erp_account___Organization_raw'] but I'm still geting empty value back from it.
Just to calrify erp_account___Organization is a datajoin.
I have just updated from github.