[Vtigercrm-commits] [vtiger-commits] r10774 - in /vtigercrm/branches/5.0.3: data/CRMEntity.php include/utils/CommonUtils.php include/utils/ListViewUtils.php

vtigercrm-commits at vtiger.fosslabs.com vtigercrm-commits at vtiger.fosslabs.com
Tue Apr 24 11:15:14 EDT 2007


Author: richie
Date: Tue Apr 24 09:15:05 2007
New Revision: 10774

Log:
* Fixed the issue with checkboxes in search, Fixed #3374#3675

Modified:
    vtigercrm/branches/5.0.3/data/CRMEntity.php
    vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
    vtigercrm/branches/5.0.3/include/utils/ListViewUtils.php

Modified: vtigercrm/branches/5.0.3/data/CRMEntity.php
==============================================================================
--- vtigercrm/branches/5.0.3/data/CRMEntity.php (original)
+++ vtigercrm/branches/5.0.3/data/CRMEntity.php Tue Apr 24 09:15:05 2007
@@ -399,11 +399,11 @@
 			  {
 				  if($this->column_fields[$fieldname] == 'on' || $this->column_fields[$fieldname] == 1)
 				  {
-					  $fldvalue = 1;
+					  $fldvalue = '1';
 				  }
 				  else
 				  {
-					  $fldvalue = 0;
+					  $fldvalue = '0';
 				  }
 
 			  }
@@ -451,10 +451,6 @@
 			  $fldvalue = '';
 		  }
 		  if($fldvalue=='') $fldvalue ="NULL";
-		  
-		 if($columname == 'discontinued' && $fldvalue=='NULL')
-		 $fldvalue = '0';
-		 
 		  if($insertion_mode == 'edit')
 		  {
 			  if($table_name == 'vtiger_notes' && $columname == 'filename' && $_FILES['filename']['name'] == '')

Modified: vtigercrm/branches/5.0.3/include/utils/CommonUtils.php
==============================================================================
--- vtigercrm/branches/5.0.3/include/utils/CommonUtils.php (original)
+++ vtigercrm/branches/5.0.3/include/utils/CommonUtils.php Tue Apr 24 09:15:05 2007
@@ -2837,5 +2837,26 @@
 
 }
 
+/**
+ * Function to get the UItype for a field.
+ * Takes the input as $module - module name,and columnname of the field
+ * returns the uitype, integer type
+ */
+
+function getUItype($module,$columnname)
+{
+        global $log;
+        $log->debug("Entering getUItype(".$module.") method ...");
+	//To find tabid for this module
+	$tabid=getTabid($module);
+        global $adb;
+        $sql = "select uitype from vtiger_field where tabid=".$tabid." and columnname='".$columnname."'";
+        $result = $adb->query($sql);
+        $uitype =  $adb->query_result($result,0,"uitype");
+        $log->debug("Exiting getUItype method ...");
+        return $uitype;
+
+}
+
 
 ?>

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 Apr 24 09:15:05 2007
@@ -1926,7 +1926,9 @@
 			INNER JOIN vtiger_productcf
 				ON vtiger_products.productid = vtiger_productcf.productid
 			LEFT JOIN vtiger_vendor
-				ON vtiger_vendor.vendorid = vtiger_products.vendor_id	
+				ON vtiger_vendor.vendorid = vtiger_products.vendor_id
+			LEFT JOIN vtiger_users
+                                ON vtiger_users.id = vtiger_products.handler
 			WHERE vtiger_crmentity.deleted = 0 ".$where;
 			break;
 	Case "Notes":
@@ -1978,6 +1980,8 @@
 				ON vtiger_groups.groupname = vtiger_contactgrouprelation.groupname
 			LEFT JOIN vtiger_users
 				ON vtiger_users.id = vtiger_crmentity.smownerid
+			LEFT JOIN vtiger_customerdetails
+				ON vtiger_customerdetails.customerid = vtiger_contactdetails.contactid
 			WHERE vtiger_crmentity.deleted = 0 ".$where;
 
 		if($is_admin==false && $profileGlobalPermission[1] == 1 && $profileGlobalPermission[2] == 1 && $defaultOrgSharingPermission[$tab_id] == 3)





More information about the vtigercrm-commits mailing list