[Vtigercrm-commits] [vtiger-commits] r6481 - /vtigercrm/trunk/modules/Leads/Lead.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri May 26 12:29:46 EDT 2006
Author: saraj
Date: Fri May 26 10:29:42 2006
New Revision: 6481
Log:
Updated the Related List Query for activity & history - Ahmed
Modified:
vtigercrm/trunk/modules/Leads/Lead.php
Modified: vtigercrm/trunk/modules/Leads/Lead.php
==============================================================================
--- vtigercrm/trunk/modules/Leads/Lead.php (original)
+++ vtigercrm/trunk/modules/Leads/Lead.php Fri May 26 10:29:42 2006
@@ -255,7 +255,7 @@
// First, get the list of IDs.
- $query = "SELECT contactdetails.lastname, contactdetails.firstname, contactdetails.contactid, activity.*,seactivityrel.*,crmentity.crmid, crmentity.smownerid, crmentity.modifiedtime, users.user_name,recurringevents.recurringtype from activity inner join seactivityrel on seactivityrel.activityid=activity.activityid inner join crmentity on crmentity.crmid=activity.activityid left join cntactivityrel on cntactivityrel.activityid= activity.activityid left join contactdetails on contactdetails.contactid = cntactivityrel.contactid left join users on users.id=crmentity.smownerid left outer join recurringevents on recurringevents.activityid=activity.activityid left join activitygrouprelation on activitygrouprelation.activityid=crmentity.crmid left join groups on groups.groupname=activitygrouprelation.groupname where seactivityrel.crmid=".$id." and (activitytype='Task' or activitytype='Call' or activitytype='Meeting') and (activity.status is not NULL && activity.status != 'Completed') and (activity.status is not NULL && activity.status != 'Deferred') or (activity.eventstatus !='' && activity.eventstatus = 'Planned')";
+ $query = "SELECT contactdetails.lastname, contactdetails.firstname, contactdetails.contactid, activity.*,seactivityrel.*,crmentity.crmid, crmentity.smownerid, crmentity.modifiedtime, users.user_name,recurringevents.recurringtype from activity inner join seactivityrel on seactivityrel.activityid=activity.activityid inner join crmentity on crmentity.crmid=activity.activityid left join cntactivityrel on cntactivityrel.activityid= activity.activityid left join contactdetails on contactdetails.contactid = cntactivityrel.contactid left join users on users.id=crmentity.smownerid left outer join recurringevents on recurringevents.activityid=activity.activityid left join activitygrouprelation on activitygrouprelation.activityid=crmentity.crmid left join groups on groups.groupname=activitygrouprelation.groupname where seactivityrel.crmid=".$id." and (activitytype='Task' or activitytype='Call' or activitytype='Meeting') and (activity.status is not NULL && activity.status != 'Completed') and (activity.status is not NULL && activity.status != 'Deferred') or (activity.eventstatus !='' && activity.eventstatus != 'Held')";
$log->debug("Exiting get_activities method ...");
return GetRelatedList('Leads','Activities',$focus,$query,$button,$returnset);
}
@@ -302,7 +302,7 @@
left join groups on groups.groupname=activitygrouprelation.groupname
left join users on crmentity.smownerid= users.id
where (activity.activitytype = 'Meeting' or activity.activitytype='Call' or activity.activitytype='Task')
- and (activity.status = 'Completed' or activity.status = 'Deferred' or (activity.eventstatus != 'Planned' and activity.eventstatus != ''))
+ and (activity.status = 'Completed' or activity.status = 'Deferred' or (activity.eventstatus = 'Held' and activity.eventstatus != ''))
and seactivityrel.crmid=".$id;
//Don't add order by, because, for security, one more condition will be added with this query in include/RelatedListView.php
More information about the vtigercrm-commits
mailing list