[Vtigercrm-commits] [vtiger-commits] r10967 - in /vtigercrm/branches/5.0.3: include/utils/ListViewUtils.php modules/CustomView/CustomView.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue May 22 12:40:00 EDT 2007
Author: saraj
Date: Tue May 22 10:39:53 2007
New Revision: 10967
Log:
Link for Contact Name shows error on Notes Listview. Fixes #3911
Modified:
vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php
vtigercrm/branches/5.0.3/modules/CustomView/CustomView.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 Tue May 22 10:39:53 2007
@@ -741,13 +741,16 @@
$value=getRelatedTo($module,$list_result,$i-1);
}
//added for sorting by Contact Name ---------STARTS------------------
- elseif($name=='Contact Name' &&($module == 'Notes' || $module =='SalesOrder' || $module == 'Quotes' || $module == 'PurchaseOrder'))
+ elseif($name=='Contact Name' && ($module == 'Notes' || $module =='SalesOrder' || $module == 'Quotes' || $module == 'PurchaseOrder'))
{
if($name == 'Contact Name')
{
$first_name = $adb->query_result($list_result,$i-1,"firstname");
$last_name = $adb->query_result($list_result,$i-1,"lastname");
- $contact_id = $adb->query_result($list_result,$i-1,"contactid");
+ if ($module == 'Notes')
+ $contact_id = $adb->query_result($list_result,$i-1,"contact_id");
+ else
+ $contact_id = $adb->query_result($list_result,$i-1,"contactid");
$contact_name = "";
$value="";
if($last_name != 'NULL')
Modified: vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php
==============================================================================
--- vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php (original)
+++ vtigercrm/branches/5.0.3/modules/CustomView/CustomView.php Tue May 22 10:39:53 2007
@@ -1500,7 +1500,7 @@
$listviewquery = substr($listquery, strpos($listquery,'FROM'),strlen($listquery));
if($module == "Calendar" || $module == "Emails")
{
- $query = "select ".$this->getCvColumnListSQL($viewid)." , vtiger_activity.activityid, vtiger_activity.activitytype as type, vtiger_activity.priority, case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end as status, vtiger_crmentity.crmid ".$listviewquery;
+ $query = "select ".$this->getCvColumnListSQL($viewid)." , vtiger_activity.activityid, vtiger_activity.activitytype as type, vtiger_activity.priority, case when (vtiger_activity.status not like '') then vtiger_activity.status else vtiger_activity.eventstatus end as status, vtiger_crmentity.crmid,vtiger_contactdetails.contactid ".$listviewquery;
}else if($module == "Notes")
{
$query = "select ".$this->getCvColumnListSQL($viewid)." ,vtiger_crmentity.crmid,vtiger_notes.* ".$listviewquery;
@@ -1520,7 +1520,11 @@
else if($module == "Faq")
{
$query = "select ".$this->getCvColumnListSQL($viewid)." ,vtiger_crmentity.crmid ".$listviewquery;
- }
+ }
+ else if($module == "Quotes" || $module == "PurchaseOrder" || $module == "SalesOrder" || $module == "Invoice")
+ {
+ $query = "select ".$this->getCvColumnListSQL($viewid)." ,vtiger_crmentity.crmid,vtiger_contactdetails.contactid ".$listviewquery;
+ }
else
{
$query = "select ".$this->getCvColumnListSQL($viewid)." ,vtiger_crmentity.crmid ".$listviewquery;
More information about the vtigercrm-commits
mailing list