本文整理匯總了PHP中CRMEntity::generateReportsQuery方法的典型用法代碼示例。如果您正苦於以下問題:PHP CRMEntity::generateReportsQuery方法的具體用法?PHP CRMEntity::generateReportsQuery怎麽用?PHP CRMEntity::generateReportsQuery使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CRMEntity
的用法示例。
在下文中一共展示了CRMEntity::generateReportsQuery方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: generateReportsQuery
function generateReportsQuery($module)
{
global $current_user;
$query = parent::generateReportsQuery($module);
$query .= " LEFT JOIN (\n\t\t\t\tSELECT vtiger_service.serviceid,\n\t\t\t\t\t\t(CASE WHEN (vtiger_service.currency_id = 1 ) THEN vtiger_service.unit_price\n\t\t\t\t\t\t\tELSE (vtiger_service.unit_price / vtiger_currency_info.conversion_rate) END\n\t\t\t\t\t\t) AS actual_unit_price\n\t\t\t\tFROM vtiger_service\n\t\t\t\tLEFT JOIN vtiger_currency_info ON vtiger_service.currency_id = vtiger_currency_info.id\n\t\t\t\tLEFT JOIN vtiger_productcurrencyrel ON vtiger_service.serviceid = vtiger_productcurrencyrel.productid\n\t\t\t\tAND vtiger_productcurrencyrel.currencyid = " . $current_user->currency_id . "\n\t\t\t) AS innerService ON innerService.serviceid = vtiger_service.serviceid";
return $query;
}