<?php
$tdataSPC_Pending=array();
	$tdataSPC_Pending[".NumberOfChars"]=80; 
	$tdataSPC_Pending[".ShortName"]="SPC_Pending";
	$tdataSPC_Pending[".OwnerID"]="";
	$tdataSPC_Pending[".OriginalTable"]="lead_table";


	
//	field labels
$fieldLabelsSPC_Pending = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsSPC_Pending["English"]=array();
	$fieldToolTipsSPC_Pending["English"]=array();
	$fieldLabelsSPC_Pending["English"]["Leadid"] = "Leadid";
	$fieldToolTipsSPC_Pending["English"]["Leadid"] = "";
	$fieldLabelsSPC_Pending["English"]["Region"] = "Region";
	$fieldToolTipsSPC_Pending["English"]["Region"] = "";
	$fieldLabelsSPC_Pending["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsSPC_Pending["English"]["Customer Name"] = "";
	$fieldLabelsSPC_Pending["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsSPC_Pending["English"]["Contact Person"] = "";
	$fieldLabelsSPC_Pending["English"]["Lead_Details"] = "Lead Details";
	$fieldToolTipsSPC_Pending["English"]["Lead Details"] = "";
	$fieldLabelsSPC_Pending["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsSPC_Pending["English"]["Employee Name"] = "";
	$fieldLabelsSPC_Pending["English"]["Approx_Closure_Date"] = "Approx Closure Date";
	$fieldToolTipsSPC_Pending["English"]["Approx Closure Date"] = "";
	$fieldLabelsSPC_Pending["English"]["Lead_Status"] = "Lead Status";
	$fieldToolTipsSPC_Pending["English"]["Lead Status"] = "";
	$fieldLabelsSPC_Pending["English"]["Manager_Name"] = "Manager Name";
	$fieldToolTipsSPC_Pending["English"]["Manager Name"] = "";
	$fieldLabelsSPC_Pending["English"]["Manager_Remarks"] = "Manager Remarks";
	$fieldToolTipsSPC_Pending["English"]["Manager Remarks"] = "";
	$fieldLabelsSPC_Pending["English"]["Sales_Call_Status"] = "Sales Call Status";
	$fieldToolTipsSPC_Pending["English"]["Sales Call Status"] = "";
	$fieldLabelsSPC_Pending["English"]["Lead_Level"] = "Lead Level";
	$fieldToolTipsSPC_Pending["English"]["Lead Level"] = "";
	$fieldLabelsSPC_Pending["English"]["Requirement_Details"] = "Requirement Details";
	$fieldToolTipsSPC_Pending["English"]["Requirement Details"] = "";
	$fieldLabelsSPC_Pending["English"]["Approx_Value"] = "Approx Value";
	$fieldToolTipsSPC_Pending["English"]["Approx Value"] = "";
	$fieldLabelsSPC_Pending["English"]["First_Quote_Remarks"] = "First Quote Remarks";
	$fieldToolTipsSPC_Pending["English"]["First Quote Remarks"] = "";
	$fieldLabelsSPC_Pending["English"]["Proposed_Closure_Date"] = "Proposed Closure Date";
	$fieldToolTipsSPC_Pending["English"]["Proposed Closure Date"] = "";
	$fieldLabelsSPC_Pending["English"]["Projected_Closure_QTR"] = "Projected Closure QTR";
	$fieldToolTipsSPC_Pending["English"]["Projected Closure QTR"] = "";
	$fieldLabelsSPC_Pending["English"]["Proposed_Solution_Details"] = "Proposed Solution Details";
	$fieldToolTipsSPC_Pending["English"]["Proposed Solution Details"] = "";
	$fieldLabelsSPC_Pending["English"]["Quoted_Price"] = "Quoted Price";
	$fieldToolTipsSPC_Pending["English"]["Quoted Price"] = "";
	$fieldLabelsSPC_Pending["English"]["Final_Quote_Remarks"] = "Final Quote Remarks";
	$fieldToolTipsSPC_Pending["English"]["Final Quote Remarks"] = "";
	$fieldLabelsSPC_Pending["English"]["Discussion_Highlights"] = "Discussion Highlights";
	$fieldToolTipsSPC_Pending["English"]["Discussion Highlights"] = "";
	$fieldLabelsSPC_Pending["English"]["WIN___Lost_Analysis"] = "WIN / Lost Analysis";
	$fieldToolTipsSPC_Pending["English"]["WIN / Lost Analysis"] = "";
	$fieldLabelsSPC_Pending["English"]["Alligned_Vendor"] = "Alligned Vendor";
	$fieldToolTipsSPC_Pending["English"]["Alligned Vendor"] = "";
	$fieldLabelsSPC_Pending["English"]["SPC_Item_Count"] = "SPC Item Count";
	$fieldToolTipsSPC_Pending["English"]["SPC_Item_Count"] = "";
	if (count($fieldToolTipsSPC_Pending["English"])){
		$tdataSPC_Pending[".isUseToolTips"]=true;
	}
}


	
	$tdataSPC_Pending[".NCSearch"]=true;

	

$tdataSPC_Pending[".shortTableName"] = "SPC_Pending";
$tdataSPC_Pending[".nSecOptions"] = 0;
$tdataSPC_Pending[".recsPerRowList"] = 1;	
$tdataSPC_Pending[".tableGroupBy"] = "1";
$tdataSPC_Pending[".mainTableOwnerID"] = "";
$tdataSPC_Pending[".moveNext"] = 1;




$tdataSPC_Pending[".showAddInPopup"] = false;

$tdataSPC_Pending[".showEditInPopup"] = false;

$tdataSPC_Pending[".showViewInPopup"] = false;


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

$tdataSPC_Pending[".listAjax"] = false;

	$tdataSPC_Pending[".audit"] = false;

	$tdataSPC_Pending[".locking"] = false;
	
$tdataSPC_Pending[".listIcons"] = true;
$tdataSPC_Pending[".view"] = true;




$tdataSPC_Pending[".showSimpleSearchOptions"] = false;

$tdataSPC_Pending[".showSearchPanel"] = true;


$tdataSPC_Pending[".isUseAjaxSuggest"] = true;

$tdataSPC_Pending[".rowHighlite"] = true;


// button handlers file names

$tdataSPC_Pending[".addPageEvents"] = false;

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

// use datepicker for search panel
$tdataSPC_Pending[".isUseCalendarForSearch"] = false;

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

$tdataSPC_Pending[".isUseiBox"] = false;




$tdataSPC_Pending[".isUseInlineJs"] = $tdataSPC_Pending[".isUseInlineAdd"] || $tdataSPC_Pending[".isUseInlineEdit"];

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

$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Leadid";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Region";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Customer Name";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Contact Person";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Lead Details";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Employee Name";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"]))
{
	$tdataSPC_Pending[".allSearchFields"][] = "Lead Status";	
}


$tdataSPC_Pending[".googleLikeFields"][] = "Leadid";
$tdataSPC_Pending[".googleLikeFields"][] = "Region";
$tdataSPC_Pending[".googleLikeFields"][] = "Customer Name";
$tdataSPC_Pending[".googleLikeFields"][] = "Contact Person";
$tdataSPC_Pending[".googleLikeFields"][] = "Lead Details";
$tdataSPC_Pending[".googleLikeFields"][] = "Employee Name";
$tdataSPC_Pending[".googleLikeFields"][] = "Approx Closure Date";
$tdataSPC_Pending[".googleLikeFields"][] = "Lead Status";
$tdataSPC_Pending[".googleLikeFields"][] = "Manager Name";
$tdataSPC_Pending[".googleLikeFields"][] = "Manager Remarks";
$tdataSPC_Pending[".googleLikeFields"][] = "Sales Call Status";
$tdataSPC_Pending[".googleLikeFields"][] = "Lead Level";
$tdataSPC_Pending[".googleLikeFields"][] = "Requirement Details";
$tdataSPC_Pending[".googleLikeFields"][] = "Approx Value";
$tdataSPC_Pending[".googleLikeFields"][] = "First Quote Remarks";
$tdataSPC_Pending[".googleLikeFields"][] = "Proposed Closure Date";
$tdataSPC_Pending[".googleLikeFields"][] = "Projected Closure QTR";
$tdataSPC_Pending[".googleLikeFields"][] = "Proposed Solution Details";
$tdataSPC_Pending[".googleLikeFields"][] = "Quoted Price";
$tdataSPC_Pending[".googleLikeFields"][] = "Final Quote Remarks";
$tdataSPC_Pending[".googleLikeFields"][] = "Discussion Highlights";
$tdataSPC_Pending[".googleLikeFields"][] = "WIN / Lost Analysis";
$tdataSPC_Pending[".googleLikeFields"][] = "Alligned Vendor";
$tdataSPC_Pending[".googleLikeFields"][] = "SPC_Item_Count";



$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Leadid";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Region";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Customer Name";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Contact Person";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Lead Details";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Employee Name";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Lead Status";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Manager 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("Manager Name", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Manager Name";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Manager Remarks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Manager Remarks", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Manager Remarks";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Sales Call 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("Sales Call Status", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Sales Call Status";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Lead Level";
// 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 Level", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Lead Level";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Requirement 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("Requirement Details", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Requirement Details";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Approx Value";
// 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 Value", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Approx Value";	
}
$tdataSPC_Pending[".advSearchFields"][] = "First Quote Remarks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("First Quote Remarks", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "First Quote Remarks";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Proposed 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("Proposed Closure Date", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Proposed Closure Date";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Projected Closure QTR";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Projected Closure QTR", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Projected Closure QTR";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Proposed Solution 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("Proposed Solution Details", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Proposed Solution Details";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Quoted Price";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Quoted Price", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Quoted Price";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Final Quote Remarks";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Final Quote Remarks", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Final Quote Remarks";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Discussion Highlights";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Discussion Highlights", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Discussion Highlights";	
}
$tdataSPC_Pending[".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", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "WIN / Lost Analysis";	
}
$tdataSPC_Pending[".advSearchFields"][] = "Alligned Vendor";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Alligned Vendor", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "Alligned Vendor";	
}
$tdataSPC_Pending[".advSearchFields"][] = "SPC_Item_Count";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("SPC_Item_Count", $tdataSPC_Pending[".allSearchFields"])) 
{
	$tdataSPC_Pending[".allSearchFields"][] = "SPC_Item_Count";	
}

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


	

$tdataSPC_Pending[".isDisplayLoading"] = true;

$tdataSPC_Pending[".isResizeColumns"] = false;

	$tdataSPC_Pending[".subQueriesSupAccess"] = true;




$tdataSPC_Pending[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataSPC_Pending[".strOrderBy"] = $gstrOrderBy;
	
$tdataSPC_Pending[".orderindexes"] = array();

$tdataSPC_Pending[".sqlHead"] = "SELECT lead_table.Leadid,  lead_table.Region,  lead_table.`Customer Name`,  lead_table.`Contact Person`,  lead_table.`Lead Details`,  lead_table.`Employee Name`,  lead_table.`Approx Closure Date`,  lead_table.`Lead Status`,  lead_table.`Manager Name`,  lead_table.`Manager Remarks`,  lead_table.`Sales Call Status`,  lead_table.`Lead Level`,  lead_table.`Requirement Details`,  lead_table.`Approx Value`,  lead_table.`First Quote Remarks`,  lead_table.`Proposed Closure Date`,  lead_table.`Projected Closure QTR`,  lead_table.`Proposed Solution Details`,  lead_table.`Quoted Price`,  lead_table.`Final Quote Remarks`,  lead_table.`Discussion Highlights`,  lead_table.`WIN / Lost Analysis`,  lead_table.`Alligned Vendor`,  COUNT(lead_bom.SPC_Status) AS SPC_Item_Count";
$tdataSPC_Pending[".sqlFrom"] = "FROM lead_table  INNER JOIN lead_bom ON lead_table.Leadid = lead_bom.Lead_ID";
$tdataSPC_Pending[".sqlWhereExpr"] = "(lead_bom.SPC_Status =\"Pending\")";
$tdataSPC_Pending[".sqlTail"] = "GROUP BY lead_table.Leadid, lead_table.Region, lead_table.`Customer Name`, lead_table.`Contact Person`, lead_table.`Lead Details`, lead_table.`Employee Name`, lead_table.`Approx Closure Date`, lead_table.`Lead Status`, lead_table.`Manager Name`, lead_table.`Manager Remarks`, lead_table.`Sales Call Status`, lead_table.`Lead Level`, lead_table.`Requirement Details`, lead_table.`Approx Value`, lead_table.`First Quote Remarks`, lead_table.`Proposed Closure Date`, lead_table.`Projected Closure QTR`, lead_table.`Proposed Solution Details`, lead_table.`Quoted Price`, lead_table.`Final Quote Remarks`, lead_table.`Discussion Highlights`, lead_table.`WIN / Lost Analysis`, lead_table.`Alligned Vendor`";




//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;
$tdataSPC_Pending[".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;
$tdataSPC_Pending[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "Leadid";
	$tdataSPC_Pending[".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"]= "lead_table.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;
	
		
				
		
		
		
			$tdataSPC_Pending["Leadid"]=$fdata;
//	Region
	$fdata = array();
	$fdata["strName"] = "Region";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Region";
	
		$fdata["FullName"]= "lead_table.Region";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=50";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Region"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "lead_table.`Customer Name`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "lead_table.`Contact Person`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["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"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Lead_Details";
	
		$fdata["FullName"]= "lead_table.`Lead Details`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Lead Details"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "lead_table.`Employee Name`";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["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"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Approx_Closure_Date";
	
		$fdata["FullName"]= "lead_table.`Approx Closure Date`";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=20";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Approx Closure Date"]=$fdata;
//	Lead Status
	$fdata = array();
	$fdata["strName"] = "Lead Status";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Status";
	
		$fdata["FullName"]= "lead_table.`Lead Status`";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Lead Status"]=$fdata;
//	Manager Name
	$fdata = array();
	$fdata["strName"] = "Manager Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Manager_Name";
	
		$fdata["FullName"]= "lead_table.`Manager Name`";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
				
		
		
		
			$tdataSPC_Pending["Manager Name"]=$fdata;
//	Manager Remarks
	$fdata = array();
	$fdata["strName"] = "Manager Remarks";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Manager_Remarks";
	
		$fdata["FullName"]= "lead_table.`Manager Remarks`";
	
		
		
		
		
		
				$fdata["Index"]= 10;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
				
		
		
		
			$tdataSPC_Pending["Manager Remarks"]=$fdata;
//	Sales Call Status
	$fdata = array();
	$fdata["strName"] = "Sales Call Status";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Sales_Call_Status";
	
		$fdata["FullName"]= "lead_table.`Sales Call Status`";
	
		
		
		
		
		
				$fdata["Index"]= 11;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
				
		
		
		
			$tdataSPC_Pending["Sales Call Status"]=$fdata;
//	Lead Level
	$fdata = array();
	$fdata["strName"] = "Lead Level";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Level";
	
		$fdata["FullName"]= "lead_table.`Lead Level`";
	
		
		
		
		
		
				$fdata["Index"]= 12;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
				
		
		
		
			$tdataSPC_Pending["Lead Level"]=$fdata;
//	Requirement Details
	$fdata = array();
	$fdata["strName"] = "Requirement Details";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Requirement_Details";
	
		$fdata["FullName"]= "lead_table.`Requirement Details`";
	
		
		
		
		
		
				$fdata["Index"]= 13;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Requirement Details"]=$fdata;
//	Approx Value
	$fdata = array();
	$fdata["strName"] = "Approx Value";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Approx_Value";
	
		$fdata["FullName"]= "lead_table.`Approx Value`";
	
		
		
		
		
		
				$fdata["Index"]= 14;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Approx Value"]=$fdata;
//	First Quote Remarks
	$fdata = array();
	$fdata["strName"] = "First Quote Remarks";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "First_Quote_Remarks";
	
		$fdata["FullName"]= "lead_table.`First Quote Remarks`";
	
		
		
		
		
		
				$fdata["Index"]= 15;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["First Quote Remarks"]=$fdata;
//	Proposed Closure Date
	$fdata = array();
	$fdata["strName"] = "Proposed Closure Date";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Proposed_Closure_Date";
	
		$fdata["FullName"]= "lead_table.`Proposed Closure Date`";
	
		
		
		
		
		
				$fdata["Index"]= 16;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=20";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Proposed Closure Date"]=$fdata;
//	Projected Closure QTR
	$fdata = array();
	$fdata["strName"] = "Projected Closure QTR";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Projected_Closure_QTR";
	
		$fdata["FullName"]= "lead_table.`Projected Closure QTR`";
	
		
		
		
		
		
				$fdata["Index"]= 17;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Projected Closure QTR"]=$fdata;
//	Proposed Solution Details
	$fdata = array();
	$fdata["strName"] = "Proposed Solution Details";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Proposed_Solution_Details";
	
		$fdata["FullName"]= "lead_table.`Proposed Solution Details`";
	
		
		
		
		
		
				$fdata["Index"]= 18;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Proposed Solution Details"]=$fdata;
//	Quoted Price
	$fdata = array();
	$fdata["strName"] = "Quoted Price";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Quoted_Price";
	
		$fdata["FullName"]= "lead_table.`Quoted Price`";
	
		
		
		
		
		
				$fdata["Index"]= 19;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Quoted Price"]=$fdata;
//	Final Quote Remarks
	$fdata = array();
	$fdata["strName"] = "Final Quote Remarks";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Final_Quote_Remarks";
	
		$fdata["FullName"]= "lead_table.`Final Quote Remarks`";
	
		
		
		
		
		
				$fdata["Index"]= 20;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Final Quote Remarks"]=$fdata;
//	Discussion Highlights
	$fdata = array();
	$fdata["strName"] = "Discussion Highlights";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Discussion_Highlights";
	
		$fdata["FullName"]= "lead_table.`Discussion Highlights`";
	
		
		
		
		
		
				$fdata["Index"]= 21;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Discussion Highlights"]=$fdata;
//	WIN / Lost Analysis
	$fdata = array();
	$fdata["strName"] = "WIN / Lost Analysis";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "WIN___Lost_Analysis";
	
		$fdata["FullName"]= "lead_table.`WIN / Lost Analysis`";
	
		
		
		
		
		
				$fdata["Index"]= 22;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["WIN / Lost Analysis"]=$fdata;
//	Alligned Vendor
	$fdata = array();
	$fdata["strName"] = "Alligned Vendor";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Alligned_Vendor";
	
		$fdata["FullName"]= "lead_table.`Alligned Vendor`";
	
		
		
		
		
		
				$fdata["Index"]= 23;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["Alligned Vendor"]=$fdata;
//	SPC_Item_Count
	$fdata = array();
	$fdata["strName"] = "SPC_Item_Count";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="SPC Item Count"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SPC_Item_Count";
	
		$fdata["FullName"]= "COUNT(lead_bom.SPC_Status)";
	
		
		
		
		
		
				$fdata["Index"]= 24;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Pending["SPC_Item_Count"]=$fdata;

	
$tables_data["SPC-Pending"]=&$tdataSPC_Pending;
$field_labels["SPC_Pending"] = &$fieldLabelsSPC_Pending;
$fieldToolTips["SPC-Pending"] = &$fieldToolTipsSPC_Pending;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["SPC-Pending"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="lead_bom";
	$detailsTablesData["SPC-Pending"][$dIndex] = array(
		  "dDataSourceTable"=>"SPC_Approval"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"SPC_Approval"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "0"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT lead_bom.LBOMID,  lead_bom.Lead_ID,  lead_bom.`Material Category`,  lead_bom.`Material Code`,  lead_bom.Quantity,  lead_bom.SPC_REQ_BY,  lead_bom.Target_Price,  lead_bom.SPC_Status,  lead_bom.Special_Price,  lead_bom.SPC_Approved_By,  material_master.List_Price,  material_master.MDP,  material_master.`Last Updated on`,  material_master.`Last Updated by`,  lead_bom.Quantity*lead_bom.Target_Price AS Target_Amt,  lead_bom.Quantity*lead_bom.Special_Price AS SPC_Amt"	
		, "sqlFrom"=>"FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$detailsTablesData["SPC-Pending"][$dIndex]["masterKeys"][]="Leadid";
		$detailsTablesData["SPC-Pending"][$dIndex]["detailKeys"][]="Lead_ID";


	
// tables which are master tables for current table (detail)
$masterTablesData["SPC-Pending"] = array();

$mIndex = 1-1;
			$strOriginalDetailsTable="employee_list";
	$masterTablesData["SPC-Pending"][$mIndex] = array(
		  "mDataSourceTable"=>"My Home"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "My_Home"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 2
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$masterTablesData["SPC-Pending"][$mIndex]["masterKeys"][]="Region";
		$masterTablesData["SPC-Pending"][$mIndex]["detailKeys"][]="Region";

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

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










$proto248=array();
$proto248["m_strHead"] = "SELECT";
$proto248["m_strFieldList"] = "lead_table.Leadid,  lead_table.Region,  lead_table.`Customer Name`,  lead_table.`Contact Person`,  lead_table.`Lead Details`,  lead_table.`Employee Name`,  lead_table.`Approx Closure Date`,  lead_table.`Lead Status`,  lead_table.`Manager Name`,  lead_table.`Manager Remarks`,  lead_table.`Sales Call Status`,  lead_table.`Lead Level`,  lead_table.`Requirement Details`,  lead_table.`Approx Value`,  lead_table.`First Quote Remarks`,  lead_table.`Proposed Closure Date`,  lead_table.`Projected Closure QTR`,  lead_table.`Proposed Solution Details`,  lead_table.`Quoted Price`,  lead_table.`Final Quote Remarks`,  lead_table.`Discussion Highlights`,  lead_table.`WIN / Lost Analysis`,  lead_table.`Alligned Vendor`,  COUNT(lead_bom.SPC_Status) AS SPC_Item_Count";
$proto248["m_strFrom"] = "FROM lead_table  INNER JOIN lead_bom ON lead_table.Leadid = lead_bom.Lead_ID";
$proto248["m_strWhere"] = "(lead_bom.SPC_Status =\"Pending\")";
$proto248["m_strOrderBy"] = "";
$proto248["m_strTail"] = "GROUP BY lead_table.Leadid, lead_table.Region, lead_table.`Customer Name`, lead_table.`Contact Person`, lead_table.`Lead Details`, lead_table.`Employee Name`, lead_table.`Approx Closure Date`, lead_table.`Lead Status`, lead_table.`Manager Name`, lead_table.`Manager Remarks`, lead_table.`Sales Call Status`, lead_table.`Lead Level`, lead_table.`Requirement Details`, lead_table.`Approx Value`, lead_table.`First Quote Remarks`, lead_table.`Proposed Closure Date`, lead_table.`Projected Closure QTR`, lead_table.`Proposed Solution Details`, lead_table.`Quoted Price`, lead_table.`Final Quote Remarks`, lead_table.`Discussion Highlights`, lead_table.`WIN / Lost Analysis`, lead_table.`Alligned Vendor`";
$proto249=array();
$proto249["m_sql"] = "lead_bom.SPC_Status =\"Pending\"";
$proto249["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "SPC_Status",
	"m_strTable" => "lead_bom"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto248["m_fieldlist"][]=$obj;
						$proto269=array();
			$obj = new SQLField(array(
	"m_strName" => "Manager Name",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto271=array();
			$obj = new SQLField(array(
	"m_strName" => "Manager Remarks",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto273=array();
			$obj = new SQLField(array(
	"m_strName" => "Sales Call Status",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto275=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Level",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto277=array();
			$obj = new SQLField(array(
	"m_strName" => "Requirement Details",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto279=array();
			$obj = new SQLField(array(
	"m_strName" => "Approx Value",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto281=array();
			$obj = new SQLField(array(
	"m_strName" => "First Quote Remarks",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto283=array();
			$obj = new SQLField(array(
	"m_strName" => "Proposed Closure Date",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto285=array();
			$obj = new SQLField(array(
	"m_strName" => "Projected Closure QTR",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto287=array();
			$obj = new SQLField(array(
	"m_strName" => "Proposed Solution Details",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto289=array();
			$obj = new SQLField(array(
	"m_strName" => "Quoted Price",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto291=array();
			$obj = new SQLField(array(
	"m_strName" => "Final Quote Remarks",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto293=array();
			$obj = new SQLField(array(
	"m_strName" => "Discussion Highlights",
	"m_strTable" => "lead_table"
));

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

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

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

$proto248["m_fieldlist"][]=$obj;
						$proto297=array();
			$obj = new SQLField(array(
	"m_strName" => "Alligned Vendor",
	"m_strTable" => "lead_table"
));

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

$proto248["m_fieldlist"][]=$obj;
						$proto299=array();
			$proto300=array();
$proto300["m_functiontype"] = "SQLF_COUNT";
$proto300["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "SPC_Status",
	"m_strTable" => "lead_bom"
));

$proto300["m_arguments"][]=$obj;
$proto300["m_strFunctionName"] = "COUNT";
$obj = new SQLFunctionCall($proto300);

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

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

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

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

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

$proto248["m_fromlist"][]=$obj;
												$proto306=array();
$proto306["m_link"] = "SQLL_INNERJOIN";
			$proto307=array();
$proto307["m_strName"] = "lead_bom";
$proto307["m_columns"] = array();
$proto307["m_columns"][] = "LBOMID";
$proto307["m_columns"][] = "Lead_ID";
$proto307["m_columns"][] = "Material Category";
$proto307["m_columns"][] = "Material Code";
$proto307["m_columns"][] = "Quantity";
$proto307["m_columns"][] = "SPC_REQ_BY";
$proto307["m_columns"][] = "Target_Price";
$proto307["m_columns"][] = "SPC_Status";
$proto307["m_columns"][] = "Special_Price";
$proto307["m_columns"][] = "SPC_Approved_By";
$obj = new SQLTable($proto307);

$proto306["m_table"] = $obj;
$proto306["m_alias"] = "";
$proto308=array();
$proto308["m_sql"] = "lead_table.Leadid = lead_bom.Lead_ID";
$proto308["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

$proto308["m_column"]=$obj;
$proto308["m_contained"] = array();
$proto308["m_strCase"] = "= lead_bom.Lead_ID";
$proto308["m_havingmode"] = "0";
$proto308["m_inBrackets"] = "0";
$proto308["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto308);

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

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

$proto310["m_column"]=$obj;
$obj = new SQLGroupByItem($proto310);

$proto248["m_groupby"][]=$obj;
												$proto312=array();
						$obj = new SQLField(array(
	"m_strName" => "Region",
	"m_strTable" => "lead_table"
));

$proto312["m_column"]=$obj;
$obj = new SQLGroupByItem($proto312);

$proto248["m_groupby"][]=$obj;
												$proto314=array();
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

$proto314["m_column"]=$obj;
$obj = new SQLGroupByItem($proto314);

$proto248["m_groupby"][]=$obj;
												$proto316=array();
						$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

$proto316["m_column"]=$obj;
$obj = new SQLGroupByItem($proto316);

$proto248["m_groupby"][]=$obj;
												$proto318=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

$proto318["m_column"]=$obj;
$obj = new SQLGroupByItem($proto318);

$proto248["m_groupby"][]=$obj;
												$proto320=array();
						$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

$proto320["m_column"]=$obj;
$obj = new SQLGroupByItem($proto320);

$proto248["m_groupby"][]=$obj;
												$proto322=array();
						$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

$proto322["m_column"]=$obj;
$obj = new SQLGroupByItem($proto322);

$proto248["m_groupby"][]=$obj;
												$proto324=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

$proto324["m_column"]=$obj;
$obj = new SQLGroupByItem($proto324);

$proto248["m_groupby"][]=$obj;
												$proto326=array();
						$obj = new SQLField(array(
	"m_strName" => "Manager Name",
	"m_strTable" => "lead_table"
));

$proto326["m_column"]=$obj;
$obj = new SQLGroupByItem($proto326);

$proto248["m_groupby"][]=$obj;
												$proto328=array();
						$obj = new SQLField(array(
	"m_strName" => "Manager Remarks",
	"m_strTable" => "lead_table"
));

$proto328["m_column"]=$obj;
$obj = new SQLGroupByItem($proto328);

$proto248["m_groupby"][]=$obj;
												$proto330=array();
						$obj = new SQLField(array(
	"m_strName" => "Sales Call Status",
	"m_strTable" => "lead_table"
));

$proto330["m_column"]=$obj;
$obj = new SQLGroupByItem($proto330);

$proto248["m_groupby"][]=$obj;
												$proto332=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Level",
	"m_strTable" => "lead_table"
));

$proto332["m_column"]=$obj;
$obj = new SQLGroupByItem($proto332);

$proto248["m_groupby"][]=$obj;
												$proto334=array();
						$obj = new SQLField(array(
	"m_strName" => "Requirement Details",
	"m_strTable" => "lead_table"
));

$proto334["m_column"]=$obj;
$obj = new SQLGroupByItem($proto334);

$proto248["m_groupby"][]=$obj;
												$proto336=array();
						$obj = new SQLField(array(
	"m_strName" => "Approx Value",
	"m_strTable" => "lead_table"
));

$proto336["m_column"]=$obj;
$obj = new SQLGroupByItem($proto336);

$proto248["m_groupby"][]=$obj;
												$proto338=array();
						$obj = new SQLField(array(
	"m_strName" => "First Quote Remarks",
	"m_strTable" => "lead_table"
));

$proto338["m_column"]=$obj;
$obj = new SQLGroupByItem($proto338);

$proto248["m_groupby"][]=$obj;
												$proto340=array();
						$obj = new SQLField(array(
	"m_strName" => "Proposed Closure Date",
	"m_strTable" => "lead_table"
));

$proto340["m_column"]=$obj;
$obj = new SQLGroupByItem($proto340);

$proto248["m_groupby"][]=$obj;
												$proto342=array();
						$obj = new SQLField(array(
	"m_strName" => "Projected Closure QTR",
	"m_strTable" => "lead_table"
));

$proto342["m_column"]=$obj;
$obj = new SQLGroupByItem($proto342);

$proto248["m_groupby"][]=$obj;
												$proto344=array();
						$obj = new SQLField(array(
	"m_strName" => "Proposed Solution Details",
	"m_strTable" => "lead_table"
));

$proto344["m_column"]=$obj;
$obj = new SQLGroupByItem($proto344);

$proto248["m_groupby"][]=$obj;
												$proto346=array();
						$obj = new SQLField(array(
	"m_strName" => "Quoted Price",
	"m_strTable" => "lead_table"
));

$proto346["m_column"]=$obj;
$obj = new SQLGroupByItem($proto346);

$proto248["m_groupby"][]=$obj;
												$proto348=array();
						$obj = new SQLField(array(
	"m_strName" => "Final Quote Remarks",
	"m_strTable" => "lead_table"
));

$proto348["m_column"]=$obj;
$obj = new SQLGroupByItem($proto348);

$proto248["m_groupby"][]=$obj;
												$proto350=array();
						$obj = new SQLField(array(
	"m_strName" => "Discussion Highlights",
	"m_strTable" => "lead_table"
));

$proto350["m_column"]=$obj;
$obj = new SQLGroupByItem($proto350);

$proto248["m_groupby"][]=$obj;
												$proto352=array();
						$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

$proto352["m_column"]=$obj;
$obj = new SQLGroupByItem($proto352);

$proto248["m_groupby"][]=$obj;
												$proto354=array();
						$obj = new SQLField(array(
	"m_strName" => "Alligned Vendor",
	"m_strTable" => "lead_table"
));

$proto354["m_column"]=$obj;
$obj = new SQLGroupByItem($proto354);

$proto248["m_groupby"][]=$obj;
$proto248["m_orderby"] = array();
$obj = new SQLQuery($proto248);

$queryData_SPC_Pending = $obj;
$tdataSPC_Pending[".sqlquery"] = $queryData_SPC_Pending;

$tableEvents["SPC-Pending"] = new eventsBase;

?>
