[Vtigercrm-commits] [vtiger-commits] r7213 - /vtigercrm/trunk/modules/SalesOrder/SalesOrder.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Sat Jun 17 03:37:46 EDT 2006
Author: don
Date: Sat Jun 17 01:37:43 2006
New Revision: 7213
Log:
Fixed issues in vtiger_ prefixing in table names
Modified:
vtigercrm/trunk/modules/SalesOrder/SalesOrder.php
Modified: vtigercrm/trunk/modules/SalesOrder/SalesOrder.php
==============================================================================
--- vtigercrm/trunk/modules/SalesOrder/SalesOrder.php (original)
+++ vtigercrm/trunk/modules/SalesOrder/SalesOrder.php Sat Jun 17 01:37:43 2006
@@ -146,7 +146,7 @@
$button = '';
$returnset = '&return_module=SalesOrder&return_action=DetailView&return_id='.$id;
- $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid, vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_users.user_name from vtiger_activity inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_crmentity.crmid left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname where vtiger_seactivityrel.crmid=".$id." and (activitytype='Task' or activitytype='Call' or activitytype='Meeting') and vtiger_crmentity.deleted=0 and (vtiger_activity.status is not NULL && activity.status != 'Completed') and (vtiger_activity.status is not NULL && vtiger_activity.status !='Deferred') or (vtiger_activity.eventstatus != '' && vtiger_activity.eventstatus = 'Planned')";
+ $query = "SELECT vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.contactid, vtiger_activity.*,vtiger_seactivityrel.*,vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime, vtiger_users.user_name from vtiger_activity inner join vtiger_seactivityrel on vtiger_seactivityrel.activityid=vtiger_activity.activityid inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_activity.activityid left join vtiger_cntactivityrel on vtiger_cntactivityrel.activityid= vtiger_activity.activityid left join vtiger_contactdetails on vtiger_contactdetails.contactid = vtiger_cntactivityrel.contactid left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_crmentity.crmid left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname where vtiger_seactivityrel.crmid=".$id." and (activitytype='Task' or activitytype='Call' or activitytype='Meeting') and vtiger_crmentity.deleted=0 and (vtiger_activity.status is not NULL && vtiger_activity.status != 'Completed') and (vtiger_activity.status is not NULL && vtiger_activity.status !='Deferred') or (vtiger_activity.eventstatus != '' && vtiger_activity.eventstatus = 'Planned')";
$log->debug("Exiting get_activities method ...");
return GetRelatedList('SalesOrder','Activities',$focus,$query,$button,$returnset);
}
@@ -170,7 +170,7 @@
inner join vtiger_users on vtiger_crmentity.smcreatorid=vtiger_users.id
left join vtiger_activitygrouprelation on vtiger_activitygrouprelation.activityid=vtiger_activity.activityid
left join vtiger_groups on vtiger_groups.groupname=vtiger_activitygrouprelation.groupname
- where (activitytype='Task' or vtiger_activitytype='Call' or vtiger_activitytype='Meeting')
+ where (activitytype='Task' or activitytype='Call' or activitytype='Meeting')
and (vtiger_activity.status = 'Completed' or vtiger_activity.status = 'Deferred' or (vtiger_activity.eventstatus !='Planned' and vtiger_activity.eventstatus != ''))
and vtiger_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