[Vtigercrm-commits] [vtiger-commits] r9284 - /vtigercrm/trunk/modules/Settings/LeadCustomFieldMapping.php
vtigercrm-commits at vtiger.fosslabs.com
vtigercrm-commits at vtiger.fosslabs.com
Tue Sep 5 09:13:30 EDT 2006
Author: saraj
Date: Tue Sep 5 07:13:27 2006
New Revision: 9284
Log:
changes made to put validation for custom field mapping --Minnie
Modified:
vtigercrm/trunk/modules/Settings/LeadCustomFieldMapping.php
Modified: vtigercrm/trunk/modules/Settings/LeadCustomFieldMapping.php
==============================================================================
--- vtigercrm/trunk/modules/Settings/LeadCustomFieldMapping.php (original)
+++ vtigercrm/trunk/modules/Settings/LeadCustomFieldMapping.php Tue Sep 5 07:13:27 2006
@@ -31,7 +31,7 @@
{
global $adb;
$accountcf=Array();
- $sql="select fieldid,fieldlabel from vtiger_field,vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Accounts'";
+ $sql="select fieldid,fieldlabel,uitype,typeofdata from vtiger_field,vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Accounts'";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
@@ -39,7 +39,8 @@
{
$account_field['fieldid']=$adb->query_result($result,$i,"fieldid");
$account_field['fieldlabel']=$adb->query_result($result,$i,"fieldlabel");
-
+ $account_field['typeofdata']=$adb->query_result($result,$i,"typeofdata");
+ $account_field['fieldtype']=getCustomFieldTypeName($adb->query_result($result,$i,"uitype"));
if($account_field['fieldid']==$accountid)
$account_field['selected'] = "selected";
else
@@ -60,13 +61,15 @@
{
global $adb;
$contactcf=Array();
- $sql="select fieldid,fieldlabel from vtiger_field,vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Contacts'";
+ $sql="select fieldid,fieldlabel,uitype,typeofdata from vtiger_field,vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Contacts'";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
for($i=0; $i<$noofrows; $i++)
{
$contact_field['fieldid']=$adb->query_result($result,$i,"fieldid");
$contact_field['fieldlabel']=$adb->query_result($result,$i,"fieldlabel");
+ $contact_field['typeofdata']=$adb->query_result($result,$i,"typeofdata");
+ $contact_field['fieldtype']=getCustomFieldTypeName($adb->query_result($result,$i,"uitype"));
if($contact_field['fieldid']==$contactid)
$contact_field['selected']="selected";
@@ -88,13 +91,15 @@
{
global $adb;
$potentialcf=Array();
- $sql="select fieldid,fieldlabel from vtiger_field,vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Potentials'";
+ $sql="select fieldid,fieldlabel,uitype,typeofdata from vtiger_field,vtiger_tab where vtiger_field.tabid=vtiger_tab.tabid and generatedtype=2 and vtiger_tab.name='Potentials'";
$result = $adb->query($sql);
$noofrows = $adb->num_rows($result);
for($i=0; $i<$noofrows; $i++)
{
$potential_field['fieldid']=$adb->query_result($result,$i,"fieldid");
$potential_field['fieldlabel']=$adb->query_result($result,$i,"fieldlabel");
+ $potential_field['typeofdata']=$adb->query_result($result,$i,"typeofdata");
+ $potential_field['fieldtype']=getCustomFieldTypeName($adb->query_result($result,$i,"uitype"));
if($potential_field['fieldid']==$potentialid)
$potential_field['selected']="selected";
@@ -115,7 +120,7 @@
{
global $adb;
- $convert_sql="select vtiger_convertleadmapping.*,uitype,fieldlabel from vtiger_convertleadmapping left join vtiger_field on vtiger_field.fieldid = vtiger_convertleadmapping.leadfid";
+ $convert_sql="select vtiger_convertleadmapping.*,uitype,fieldlabel,typeofdata from vtiger_convertleadmapping left join vtiger_field on vtiger_field.fieldid = vtiger_convertleadmapping.leadfid";
$convert_result = $adb->query($convert_sql);
$no_rows = $adb->num_rows($convert_result);
@@ -127,13 +132,13 @@
$potentialid=$adb->query_result($convert_result,$j,"potentialfid");
$lead_field['sno'] = $j+1;
$lead_field['leadid'] = $adb->query_result($convert_result,$j,"fieldlabel");
+ $lead_field['typeofdata']=$adb->query_result($convert_result,$j,"typeofdata");
$lead_field['fieldtype'] = getCustomFieldTypeName($adb->query_result($convert_result,$j,"uitype"));;
$lead_field['account'] = getAccountCustomValues($leadid,$accountid);
$lead_field['contact'] = getContactCustomValues($leadid,$contactid);
$lead_field['potential'] = getPotentialCustomValues($leadid,$potentialid);
$leadcf[]= $lead_field;
}
-
return $leadcf;
}
More information about the vtigercrm-commits
mailing list