[Vtigercrm-commits] [vtiger-commits] r10897 - /vtigercrm/branches/5.0.3/modules/Campaigns/Campaigns.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Mon May 14 01:01:58 EDT 2007
Author: richie
Date: Sun May 13 23:01:53 2007
New Revision: 10897
Log:
* Changed the query to get the accountname, without this accountname in query, in Contact and Potentials list the account name column shows empty
Modified:
vtigercrm/branches/5.0.3/modules/Campaigns/Campaigns.php
Modified: vtigercrm/branches/5.0.3/modules/Campaigns/Campaigns.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/Campaigns/Campaigns.php (original)
+++ vtigercrm/branches/5.0.3/modules/Campaigns/Campaigns.php Sun May 13 23:01:53 2007
@@ -138,7 +138,7 @@
else
$returnset = '&return_module=Campaigns&return_action=CallRelatedList&return_id='.$id;
- $query = 'select vtiger_contactdetails.accountid, case when (vtiger_users.user_name not like "") then vtiger_users.user_name else vtiger_groups.groupname end as user_name , vtiger_contactdetails.contactid, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.title, vtiger_contactdetails.department, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime from vtiger_contactdetails inner join vtiger_campaigncontrel on vtiger_campaigncontrel.contactid = vtiger_contactdetails.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid left join vtiger_contactgrouprelation on vtiger_contactdetails.contactid=vtiger_contactgrouprelation.contactid left join vtiger_groups on vtiger_groups.groupname=vtiger_contactgrouprelation.groupname left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id where vtiger_campaigncontrel.campaignid = '.$id.' and vtiger_crmentity.deleted=0';
+ $query = 'select vtiger_contactdetails.accountid, vtiger_account.accountname, case when (vtiger_users.user_name not like "") then vtiger_users.user_name else vtiger_groups.groupname end as user_name , vtiger_contactdetails.contactid, vtiger_contactdetails.lastname, vtiger_contactdetails.firstname, vtiger_contactdetails.title, vtiger_contactdetails.department, vtiger_contactdetails.email, vtiger_contactdetails.phone, vtiger_crmentity.crmid, vtiger_crmentity.smownerid, vtiger_crmentity.modifiedtime from vtiger_contactdetails inner join vtiger_campaigncontrel on vtiger_campaigncontrel.contactid = vtiger_contactdetails.contactid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_contactdetails.contactid left join vtiger_contactgrouprelation on vtiger_contactdetails.contactid=vtiger_contactgrouprelation.contactid left join vtiger_groups on vtiger_groups.groupname=vtiger_contactgrouprelation.groupname left join vtiger_users on vtiger_crmentity.smownerid=vtiger_users.id left join vtiger_account on vtiger_account.accountid = vtiger_contactdetails.accountid where vtiger_campaigncontrel.campaignid = '.$id.' and vtiger_crmentity.deleted=0';
$log->debug("Exiting get_contacts method ...");
return GetRelatedList('Campaigns','Contacts',$focus,$query,$button,$returnset);
@@ -187,7 +187,7 @@
else
$returnset = '&return_module=Campaigns&return_action=CallRelatedList&return_id='.$id;
- $query = 'select case when (vtiger_users.user_name not like "") then vtiger_users.user_name else vtiger_groups.groupname end as user_name,vtiger_potential.accountid, vtiger_potential.potentialid, vtiger_potential.potentialname, vtiger_potential.potentialtype, vtiger_potential.sales_stage, vtiger_potential.amount, vtiger_potential.closingdate, vtiger_crmentity.crmid, vtiger_crmentity.smownerid from vtiger_campaign inner join vtiger_potential on vtiger_campaign.campaignid = vtiger_potential.campaignid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_potential.potentialid left join vtiger_potentialgrouprelation on vtiger_potential.potentialid=vtiger_potentialgrouprelation.potentialid left join vtiger_groups on vtiger_groups.groupname=vtiger_potentialgrouprelation.groupname left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid where vtiger_campaign.campaignid = '.$id.' and vtiger_crmentity.deleted=0';
+ $query = 'select case when (vtiger_users.user_name not like "") then vtiger_users.user_name else vtiger_groups.groupname end as user_name,vtiger_potential.accountid, vtiger_account.accountname, vtiger_potential.potentialid, vtiger_potential.potentialname, vtiger_potential.potentialtype, vtiger_potential.sales_stage, vtiger_potential.amount, vtiger_potential.closingdate, vtiger_crmentity.crmid, vtiger_crmentity.smownerid from vtiger_campaign inner join vtiger_potential on vtiger_campaign.campaignid = vtiger_potential.campaignid inner join vtiger_crmentity on vtiger_crmentity.crmid = vtiger_potential.potentialid left join vtiger_potentialgrouprelation on vtiger_potential.potentialid=vtiger_potentialgrouprelation.potentialid left join vtiger_groups on vtiger_groups.groupname=vtiger_potentialgrouprelation.groupname left join vtiger_users on vtiger_users.id=vtiger_crmentity.smownerid left join vtiger_account on vtiger_account.accountid = vtiger_potential.accountid where vtiger_campaign.campaignid = '.$id.' and vtiger_crmentity.deleted=0';
if($this->column_fields['account_id'] != 0)
$log->debug("Exiting get_opportunities method ...");
return GetRelatedList('Campaigns','Potentials',$focus,$query,$button,$returnset);
More information about the vtigercrm-commits
mailing list