[Vtigercrm-commits] [vtiger-commits] r10727 - /vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Thu Apr 19 02:52:46 EDT 2007
Author: richie
Date: Thu Apr 19 00:52:41 2007
New Revision: 10727
Log:
fix for Reports for calendar is empty. Fixes #3664. --minnie
Modified:
vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php
Modified: vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php (original)
+++ vtigercrm/branches/5.0.3/modules/Reports/ReportRun.php Thu Apr 19 00:52:41 2007
@@ -1313,6 +1313,8 @@
left join vtiger_groups on vtiger_groups.groupname = vtiger_activitygrouprelation.groupname
left join vtiger_users as vtiger_usersCalendar on vtiger_usersCalendar.id = vtiger_crmentity.smownerid
left join vtiger_seactivityrel on vtiger_seactivityrel.activityid = vtiger_activity.activityid
+ left join vtiger_activity_reminder on vtiger_activity_reminder.activity_id = vtiger_activity.activityid
+ left join vtiger_recurringevents on vtiger_recurringevents.activityid = vtiger_activity.activityid
left join vtiger_crmentity as vtiger_crmentityRelCalendar on vtiger_crmentityRelCalendar.crmid = vtiger_seactivityrel.crmid
left join vtiger_account as vtiger_accountRelCalendar on vtiger_accountRelCalendar.accountid=vtiger_crmentityRelCalendar.crmid
left join vtiger_leaddetails as vtiger_leaddetailsRelCalendar on vtiger_leaddetailsRelCalendar.leadid = vtiger_crmentityRelCalendar.crmid
@@ -1484,33 +1486,22 @@
$reportquery = $this->getReportsQuery($this->primarymodule);
if($type == 'COLUMNSTOTOTAL')
{
- if(trim($groupsquery) != "")
- {
- if($columnstotalsql != '')
- {
- $reportquery = "select ".$columnstotalsql." ".$reportquery." ".$wheresql. " order by ".$groupsquery;
- }
- }else
- {
- if($columnstotalsql != '')
- {
- $reportquery = "select ".$columnstotalsql." ".$reportquery." ".$wheresql;
- }
+ if($columnstotalsql != '')
+ {
+ $reportquery = "select ".$columnstotalsql." ".$reportquery." ".$wheresql;
}
}else
{
- if(trim($groupsquery) != "")
- {
- $reportquery = "select ".$selectedcolumns." ".$reportquery." ".$wheresql. " order by ".$groupsquery;
- }else
- {
- $reportquery = "select ".$selectedcolumns." ".$reportquery." ".$wheresql;
- }
+ $reportquery = "select ".$selectedcolumns." ".$reportquery." ".$wheresql;
}
if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $defaultOrgSharingPermission[$tab_id] == 3)
{
$sec_parameter=getListViewSecurityParameter($this->primarymodule);
$reportquery .= $sec_parameter;
+ }
+ if(trim($groupsquery) != "")
+ {
+ $reportquery .= " order by ".$groupsquery;
}
$log->info("ReportRun :: Successfully returned sGetSQLforReport".$reportid);
More information about the vtigercrm-commits
mailing list