本文整理汇总了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;
}