[Vtigercrm-commits] [vtiger-commits] r9979 - in /vtigercrm/branches/5.0.3: include/utils/ListViewUtils.php modules/Campaigns/Campaigns.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Fri Dec 15 08:39:16 EST 2006
Author: richie
Date: Fri Dec 15 06:39:10 2006
New Revision: 9979
Log:
changes made to show accountname in campaings related to
Modified:
vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
vtigercrm/branches/5.0.3/modules/Campaigns/Campaigns.php
Modified: vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php Fri Dec 15 06:39:10 2006
@@ -2335,7 +2335,7 @@
{
global $log;
$log->debug("Entering getRelatedToEntity(".$module.",".$list_result.",".$rset.") method ...");
-
+
global $adb;
$seid = $adb->query_result($list_result,$rset,"relatedto");
$action = "DetailView";
@@ -2462,8 +2462,10 @@
$evt_result = $adb->query($evt_query);
$numrows= $adb->num_rows($evt_result);
- $parent_module = $adb->query_result($evt_result,0,'setype');
+ $parent_module = $adb->query_result($evt_result,0,'setype');
$parent_id = $adb->query_result($evt_result,0,'crmid');
+
+
if ($numrows>1){
$parent_module ='Multiple';
@@ -2541,6 +2543,16 @@
$parent_name = substr($parent_name,0,25).'...';
}
}
+ if($parent_module == 'Campaigns')
+ {
+ $parent_query = "SELECT campaignname FROM vtiger_campaign WHERE campaignid=".$parent_id;
+ $parent_result = $adb->query($parent_query);
+ $parent_name = $adb->query_result($parent_result,0,"campaignname");
+ if(strlen($parent_name) > 25)
+ {
+ $parent_name = substr($parent_name,0,25).'...';
+ }
+ }
//added by rdhital for better emails - Raju
if ($parent_module == 'Multiple')
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 Fri Dec 15 06:39:10 2006
@@ -187,7 +187,7 @@
else
$returnset = '&return_module=Campaigns&return_action=CallRelatedList&return_id='.$id;
- $query = 'select vtiger_users.user_name,vtiger_groups.groupname, 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 vtiger_users.user_name,vtiger_groups.groupname, 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';
if($this->column_fields['account_id'] != 0)
$log->debug("Exiting get_opportunities method ...");
return GetRelatedList('Campaigns','Potentials',$focus,$query,$button,$returnset);
@@ -248,6 +248,7 @@
OR activitytype = 'Meeting')";
$log->debug("Exiting get_activities method ...");
return GetRelatedList('Campaigns','Calendar',$focus,$query,$button,$returnset);
+
}
}
More information about the vtigercrm-commits
mailing list