[Vtigercrm-commits] [vtiger-commits] r10659 - 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
Thu Apr 12 09:20:51 EDT 2007
Author: saraj
Date: Thu Apr 12 07:20:44 2007
New Revision: 10659
Log:
* Fixed the issue in Customview, in Notes when we give contact name in advance filter it is not working properly, instead of check for the contactname it check for the contactid, Fixed #3555
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 Thu Apr 12 07:20:44 2007
@@ -2069,6 +2069,8 @@
ON vtiger_account.accountid = vtiger_quotes.accountid
LEFT OUTER JOIN vtiger_potential
ON vtiger_potential.potentialid = vtiger_quotes.potentialid
+ LEFT JOIN vtiger_contactdetails
+ ON vtiger_contactdetails.contactid = vtiger_quotes.contactid
LEFT JOIN vtiger_quotegrouprelation
ON vtiger_quotes.quoteid = vtiger_quotegrouprelation.quoteid
LEFT JOIN vtiger_groups
@@ -2138,6 +2140,8 @@
ON vtiger_quotes.quoteid = vtiger_salesorder.quoteid
LEFT OUTER JOIN vtiger_account
ON vtiger_account.accountid = vtiger_salesorder.accountid
+ LEFT JOIN vtiger_contactdetails
+ ON vtiger_salesorder.contactid = vtiger_contactdetails.contactid
LEFT JOIN vtiger_sogrouprelation
ON vtiger_salesorder.salesorderid = vtiger_sogrouprelation.salesorderid
LEFT JOIN vtiger_groups
@@ -2171,6 +2175,8 @@
ON vtiger_salesorder.salesorderid = vtiger_invoice.salesorderid
LEFT OUTER JOIN vtiger_account
ON vtiger_account.accountid = vtiger_invoice.accountid
+ LEFT JOIN vtiger_contactdetails
+ ON vtiger_contactdetails.contactid = vtiger_invoice.contactid
INNER JOIN vtiger_invoicecf
ON vtiger_invoice.invoiceid = vtiger_invoicecf.invoiceid
LEFT JOIN vtiger_invoicegrouprelation
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 Thu Apr 12 07:20:44 2007
@@ -899,25 +899,24 @@
*/
function getRealValues($tablename,$fieldname,$comparator,$value,$datatype)
{
- if($fieldname == "smownerid")
+ if($fieldname == "smownerid")
{
-
- $temp_value = "( vtiger_users.user_name".$this->getAdvComparator($comparator,$value,$datatype);
- $temp_value.= " OR vtiger_groups.groupname".$this->getAdvComparator($comparator,$value,$datatype);
- $value=$temp_value.")";
+ $temp_value = "( vtiger_users.user_name".$this->getAdvComparator($comparator,$value,$datatype);
+ $temp_value.= " OR vtiger_groups.groupname".$this->getAdvComparator($comparator,$value,$datatype);
+ $value=$temp_value.")";
}elseif( $fieldname == "inventorymanager")
{
-
- $value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,getUserId_Ol($value),$datatype);
+ $value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,getUserId_Ol($value),$datatype);
}else if($fieldname == "parentid")
{
$value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,$this->getAccountId($value),$datatype);
}else if($fieldname == "accountid")
{
$value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,$this->getAccountId($value),$datatype);
- }else if($fieldname == "contactid")
- {
- $value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,$this->getContactId($value),$datatype);
+ }else if($fieldname == "contactid" || $fieldname == 'contact_id')
+ {
+ $value = "concat(vtiger_contactdetails.lastname,' ',vtiger_contactdetails.firstname)".$this->getAdvComparator($comparator,$value,$datatype);
+ //$value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,$this->getContactId($value),$datatype);
}else if($fieldname == "vendor_id" || $fieldname == "vendorid")
{
$value = $tablename.".".$fieldname.$this->getAdvComparator($comparator,$this->getVendorId($value),$datatype);
More information about the vtigercrm-commits
mailing list