<?php
$tdataLead_Details=array();
	$tdataLead_Details[".NumberOfChars"]=80; 
	$tdataLead_Details[".ShortName"]="Lead_Details";
	$tdataLead_Details[".OwnerID"]="Employee Name";
	$tdataLead_Details[".OriginalTable"]="lead_table";


	
//	field labels
$fieldLabelsLead_Details = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsLead_Details["English"]=array();
	$fieldToolTipsLead_Details["English"]=array();
	$fieldLabelsLead_Details["English"]["Leadid"] = "Leadid";
	$fieldToolTipsLead_Details["English"]["Leadid"] = "";
	$fieldLabelsLead_Details["English"]["Region"] = "Region";
	$fieldToolTipsLead_Details["English"]["Region"] = "";
	$fieldLabelsLead_Details["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsLead_Details["English"]["Customer Name"] = "";
	$fieldLabelsLead_Details["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsLead_Details["English"]["Contact Person"] = "";
	$fieldLabelsLead_Details["English"]["Lead_Details"] = "Lead Details";
	$fieldToolTipsLead_Details["English"]["Lead Details"] = "";
	$fieldLabelsLead_Details["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsLead_Details["English"]["Employee Name"] = "";
	$fieldLabelsLead_Details["English"]["Approx_Closure_Date"] = "Approx Closure Date";
	$fieldToolTipsLead_Details["English"]["Approx Closure Date"] = "";
	$fieldLabelsLead_Details["English"]["Lead_Status"] = "Lead Status";
	$fieldToolTipsLead_Details["English"]["Lead Status"] = "";
	$fieldLabelsLead_Details["English"]["WIN___Lost_Analysis"] = "WIN / Lost Analysis";
	$fieldToolTipsLead_Details["English"]["WIN / Lost Analysis"] = "";
	if (count($fieldToolTipsLead_Details["English"])){
		$tdataLead_Details[".isUseToolTips"]=true;
	}
}


	
	$tdataLead_Details[".NCSearch"]=true;

	

$tdataLead_Details[".shortTableName"] = "Lead_Details";
$tdataLead_Details[".nSecOptions"] = 2;
$tdataLead_Details[".recsPerRowList"] = 1;	
$tdataLead_Details[".tableGroupBy"] = "0";
$tdataLead_Details[".mainTableOwnerID"] = "Employee Name";
$tdataLead_Details[".moveNext"] = 1;




$tdataLead_Details[".showAddInPopup"] = false;

$tdataLead_Details[".showEditInPopup"] = false;

$tdataLead_Details[".showViewInPopup"] = false;


$tdataLead_Details[".fieldsForRegister"] = array();

$tdataLead_Details[".listAjax"] = false;

	$tdataLead_Details[".audit"] = false;

	$tdataLead_Details[".locking"] = false;
	
$tdataLead_Details[".listIcons"] = true;
$tdataLead_Details[".edit"] = true;
$tdataLead_Details[".inlineEdit"] = true;
$tdataLead_Details[".view"] = true;




$tdataLead_Details[".showSimpleSearchOptions"] = false;

$tdataLead_Details[".showSearchPanel"] = true;


$tdataLead_Details[".isUseAjaxSuggest"] = true;

$tdataLead_Details[".rowHighlite"] = true;


// button handlers file names

$tdataLead_Details[".addPageEvents"] = false;

$tdataLead_Details[".arrKeyFields"][] = "Leadid";

// use datepicker for search panel
$tdataLead_Details[".isUseCalendarForSearch"] = true;

// use timepicker for search panel
$tdataLead_Details[".isUseTimeForSearch"] = false;

$tdataLead_Details[".isUseiBox"] = false;



$tdataLead_Details[".isUseInlineAdd"] = true;

$tdataLead_Details[".isUseInlineEdit"] = true;
$tdataLead_Details[".isUseInlineJs"] = $tdataLead_Details[".isUseInlineAdd"] || $tdataLead_Details[".isUseInlineEdit"];

$tdataLead_Details[".allSearchFields"] = array();

$tdataLead_Details[".globSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Leadid";	
}
$tdataLead_Details[".globSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Customer Name";	
}
$tdataLead_Details[".globSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Contact Person";	
}
$tdataLead_Details[".globSearchFields"][] = "Lead Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Details", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Lead Details";	
}
$tdataLead_Details[".globSearchFields"][] = "Employee Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Employee Name", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Employee Name";	
}
$tdataLead_Details[".globSearchFields"][] = "Approx Closure Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Approx Closure Date", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataLead_Details[".globSearchFields"][] = "Lead Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Status", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Lead Status";	
}
$tdataLead_Details[".globSearchFields"][] = "Region";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Region", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "Region";	
}
$tdataLead_Details[".globSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataLead_Details[".allSearchFields"]))
{
	$tdataLead_Details[".allSearchFields"][] = "WIN / Lost Analysis";	
}


$tdataLead_Details[".googleLikeFields"][] = "Leadid";
$tdataLead_Details[".googleLikeFields"][] = "Customer Name";
$tdataLead_Details[".googleLikeFields"][] = "Contact Person";
$tdataLead_Details[".googleLikeFields"][] = "Lead Details";
$tdataLead_Details[".googleLikeFields"][] = "Employee Name";
$tdataLead_Details[".googleLikeFields"][] = "Approx Closure Date";
$tdataLead_Details[".googleLikeFields"][] = "Lead Status";
$tdataLead_Details[".googleLikeFields"][] = "Region";
$tdataLead_Details[".googleLikeFields"][] = "WIN / Lost Analysis";



$tdataLead_Details[".advSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Leadid";	
}
$tdataLead_Details[".advSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Customer Name";	
}
$tdataLead_Details[".advSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Contact Person";	
}
$tdataLead_Details[".advSearchFields"][] = "Lead Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Details", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Lead Details";	
}
$tdataLead_Details[".advSearchFields"][] = "Employee Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Employee Name", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Employee Name";	
}
$tdataLead_Details[".advSearchFields"][] = "Approx Closure Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Approx Closure Date", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataLead_Details[".advSearchFields"][] = "Lead Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Status", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Lead Status";	
}
$tdataLead_Details[".advSearchFields"][] = "Region";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Region", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "Region";	
}
$tdataLead_Details[".advSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataLead_Details[".allSearchFields"])) 
{
	$tdataLead_Details[".allSearchFields"][] = "WIN / Lost Analysis";	
}

$tdataLead_Details[".isTableType"] = "list";


	

$tdataLead_Details[".isDisplayLoading"] = true;

$tdataLead_Details[".isResizeColumns"] = false;





$tdataLead_Details[".pageSize"] = 5;

$gstrOrderBy = "ORDER BY Leadid DESC";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataLead_Details[".strOrderBy"] = $gstrOrderBy;
	
$tdataLead_Details[".orderindexes"] = array();
$tdataLead_Details[".orderindexes"][] = array(1, (0 ? "ASC" : "DESC"), "Leadid");

$tdataLead_Details[".sqlHead"] = "SELECT Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Employee Name`,  `Approx Closure Date`,  `Lead Status`,  Region,  `WIN / Lost Analysis`";
$tdataLead_Details[".sqlFrom"] = "FROM lead_table";
$tdataLead_Details[".sqlWhereExpr"] = "";
$tdataLead_Details[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdataLead_Details[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdataLead_Details[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "Leadid";
	$tdataLead_Details[".Keys"] = $tableKeys;

//	Leadid
	$fdata = array();
	$fdata["strName"] = "Leadid";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Leadid";
	
		$fdata["FullName"]= "Leadid";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Leadid"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="Customer Name";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="Customer Name";
				$fdata["LookupTable"]="customer_list";
	$fdata["LookupOrderBy"]="Customer Name";
																			$fdata["SimpleAdd"]=true;
	
				//	dependent dropdowns	
	$fdata["DependentLookups"]=array();
	$fdata["DependentLookups"][]="Contact Person";
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "`Customer Name`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="Name";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="Name";
				$fdata["LookupTable"]="cust_list_contact_person";
	$fdata["LookupOrderBy"]="Name";
										$fdata["UseCategory"]=true; 
	$fdata["CategoryControl"]="Customer Name"; 
	$fdata["CategoryFilter"]="Company Name"; 
										$fdata["SimpleAdd"]=true;
	
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "`Contact Person`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Contact Person"]=$fdata;
//	Lead Details
	$fdata = array();
	$fdata["strName"] = "Lead Details";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Details";
	
		$fdata["FullName"]= "`Lead Details`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Lead Details"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="username";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="Full Name";
				$fdata["LookupTable"]="employee_list";
	$fdata["LookupOrderBy"]="Full Name";
																			
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "`Employee Name`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 5;
				
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Employee Name"]=$fdata;
//	Approx Closure Date
	$fdata = array();
	$fdata["strName"] = "Approx Closure Date";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Approx_Closure_Date";
	
		$fdata["FullName"]= "`Approx Closure Date`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 6;
		$fdata["DateEditType"] = 11; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Approx Closure Date"]=$fdata;
//	Lead Status
	$fdata = array();
	$fdata["strName"] = "Lead Status";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Status";
	
		$fdata["FullName"]= "`Lead Status`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 7;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Lead Status"]=$fdata;
//	Region
	$fdata = array();
	$fdata["strName"] = "Region";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="Region Name";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="Region Name";
				$fdata["LookupTable"]="region";
	$fdata["LookupOrderBy"]="Region Name";
																			$fdata["SimpleAdd"]=true;
	
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Region";
	
		$fdata["FullName"]= "Region";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 8;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["Region"]=$fdata;
//	WIN / Lost Analysis
	$fdata = array();
	$fdata["strName"] = "WIN / Lost Analysis";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "WIN___Lost_Analysis";
	
		$fdata["FullName"]= "`WIN / Lost Analysis`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 9;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		
		
		$fdata["bEditPage"]=true; 
	
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_Details["WIN / Lost Analysis"]=$fdata;

	
$tables_data["Lead Details"]=&$tdataLead_Details;
$field_labels["Lead_Details"] = &$fieldLabelsLead_Details;
$fieldToolTips["Lead Details"] = &$fieldToolTipsLead_Details;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["Lead Details"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["Lead Details"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["Lead Details"][$mIndex] = array(
		  "mDataSourceTable"=>"Active Customers"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Active_Customers"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["Lead Details"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["Lead Details"][$mIndex]["detailKeys"][]="Customer Name";

$mIndex = 2-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["Lead Details"][$mIndex] = array(
		  "mDataSourceTable"=>"Short-Listed Customers"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Short_Listed_Customers"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["Lead Details"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["Lead Details"][$mIndex]["detailKeys"][]="Customer Name";

$mIndex = 3-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["Lead Details"][$mIndex] = array(
		  "mDataSourceTable"=>"Potential Customer List"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Potential_Customer_List"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$masterTablesData["Lead Details"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["Lead Details"][$mIndex]["detailKeys"][]="Customer Name";

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto637=array();
$proto637["m_strHead"] = "SELECT";
$proto637["m_strFieldList"] = "Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Employee Name`,  `Approx Closure Date`,  `Lead Status`,  Region,  `WIN / Lost Analysis`";
$proto637["m_strFrom"] = "FROM lead_table";
$proto637["m_strWhere"] = "";
$proto637["m_strOrderBy"] = "ORDER BY Leadid DESC";
$proto637["m_strTail"] = "";
$proto638=array();
$proto638["m_sql"] = "";
$proto638["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto638["m_column"]=$obj;
$proto638["m_contained"] = array();
$proto638["m_strCase"] = "";
$proto638["m_havingmode"] = "0";
$proto638["m_inBrackets"] = "0";
$proto638["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto638);

$proto637["m_where"] = $obj;
$proto640=array();
$proto640["m_sql"] = "";
$proto640["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto640["m_column"]=$obj;
$proto640["m_contained"] = array();
$proto640["m_strCase"] = "";
$proto640["m_havingmode"] = "0";
$proto640["m_inBrackets"] = "0";
$proto640["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto640);

$proto637["m_having"] = $obj;
$proto637["m_fieldlist"] = array();
						$proto642=array();
			$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

$proto642["m_expr"]=$obj;
$proto642["m_alias"] = "";
$obj = new SQLFieldListItem($proto642);

$proto637["m_fieldlist"][]=$obj;
						$proto644=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

$proto644["m_expr"]=$obj;
$proto644["m_alias"] = "";
$obj = new SQLFieldListItem($proto644);

$proto637["m_fieldlist"][]=$obj;
						$proto646=array();
			$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

$proto646["m_expr"]=$obj;
$proto646["m_alias"] = "";
$obj = new SQLFieldListItem($proto646);

$proto637["m_fieldlist"][]=$obj;
						$proto648=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

$proto648["m_expr"]=$obj;
$proto648["m_alias"] = "";
$obj = new SQLFieldListItem($proto648);

$proto637["m_fieldlist"][]=$obj;
						$proto650=array();
			$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

$proto650["m_expr"]=$obj;
$proto650["m_alias"] = "";
$obj = new SQLFieldListItem($proto650);

$proto637["m_fieldlist"][]=$obj;
						$proto652=array();
			$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

$proto652["m_expr"]=$obj;
$proto652["m_alias"] = "";
$obj = new SQLFieldListItem($proto652);

$proto637["m_fieldlist"][]=$obj;
						$proto654=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto654["m_expr"]=$obj;
$proto654["m_alias"] = "";
$obj = new SQLFieldListItem($proto654);

$proto637["m_fieldlist"][]=$obj;
						$proto656=array();
			$obj = new SQLField(array(
	"m_strName" => "Region",
	"m_strTable" => "lead_table"
));

$proto656["m_expr"]=$obj;
$proto656["m_alias"] = "";
$obj = new SQLFieldListItem($proto656);

$proto637["m_fieldlist"][]=$obj;
						$proto658=array();
			$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

$proto658["m_expr"]=$obj;
$proto658["m_alias"] = "";
$obj = new SQLFieldListItem($proto658);

$proto637["m_fieldlist"][]=$obj;
$proto637["m_fromlist"] = array();
												$proto660=array();
$proto660["m_link"] = "SQLL_MAIN";
			$proto661=array();
$proto661["m_strName"] = "lead_table";
$proto661["m_columns"] = array();
$proto661["m_columns"][] = "Leadid";
$proto661["m_columns"][] = "Region";
$proto661["m_columns"][] = "Customer Name";
$proto661["m_columns"][] = "Contact Person";
$proto661["m_columns"][] = "Lead Details";
$proto661["m_columns"][] = "Employee Name";
$proto661["m_columns"][] = "Approx Closure Date";
$proto661["m_columns"][] = "Lead Status";
$proto661["m_columns"][] = "Manager Name";
$proto661["m_columns"][] = "Manager Remarks";
$proto661["m_columns"][] = "Sales Call Status";
$proto661["m_columns"][] = "Lead Level";
$proto661["m_columns"][] = "Requirement Details";
$proto661["m_columns"][] = "Approx Value";
$proto661["m_columns"][] = "First Quote Remarks";
$proto661["m_columns"][] = "Proposed Closure Date";
$proto661["m_columns"][] = "Projected Closure QTR";
$proto661["m_columns"][] = "Proposed Solution Details";
$proto661["m_columns"][] = "Quoted Price";
$proto661["m_columns"][] = "Final Quote Remarks";
$proto661["m_columns"][] = "Discussion Highlights";
$proto661["m_columns"][] = "WIN / Lost Analysis";
$obj = new SQLTable($proto661);

$proto660["m_table"] = $obj;
$proto660["m_alias"] = "";
$proto662=array();
$proto662["m_sql"] = "";
$proto662["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto662["m_column"]=$obj;
$proto662["m_contained"] = array();
$proto662["m_strCase"] = "";
$proto662["m_havingmode"] = "0";
$proto662["m_inBrackets"] = "0";
$proto662["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto662);

$proto660["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto660);

$proto637["m_fromlist"][]=$obj;
$proto637["m_groupby"] = array();
$proto637["m_orderby"] = array();
												$proto664=array();
						$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

$proto664["m_column"]=$obj;
$proto664["m_bAsc"] = 0;
$proto664["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto664);

$proto637["m_orderby"][]=$obj;					
$obj = new SQLQuery($proto637);

$queryData_Lead_Details = $obj;
$tdataLead_Details[".sqlquery"] = $queryData_Lead_Details;

$tableEvents["Lead Details"] = new eventsBase;

?>
