<?php
$tdataSPC_Approval=array();
	$tdataSPC_Approval[".NumberOfChars"]=80; 
	$tdataSPC_Approval[".ShortName"]="SPC_Approval";
	$tdataSPC_Approval[".OwnerID"]="";
	$tdataSPC_Approval[".OriginalTable"]="lead_bom";


	
//	field labels
$fieldLabelsSPC_Approval = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsSPC_Approval["English"]=array();
	$fieldToolTipsSPC_Approval["English"]=array();
	$fieldLabelsSPC_Approval["English"]["LBOMID"] = "LBOMID";
	$fieldToolTipsSPC_Approval["English"]["LBOMID"] = "";
	$fieldLabelsSPC_Approval["English"]["Lead_ID"] = "Lead ID";
	$fieldToolTipsSPC_Approval["English"]["Lead_ID"] = "";
	$fieldLabelsSPC_Approval["English"]["Material_Category"] = "Material Category";
	$fieldToolTipsSPC_Approval["English"]["Material Category"] = "";
	$fieldLabelsSPC_Approval["English"]["Material_Code"] = "Material Code";
	$fieldToolTipsSPC_Approval["English"]["Material Code"] = "";
	$fieldLabelsSPC_Approval["English"]["Quantity"] = "Quantity";
	$fieldToolTipsSPC_Approval["English"]["Quantity"] = "";
	$fieldLabelsSPC_Approval["English"]["SPC_REQ_BY"] = "SPC REQ BY";
	$fieldToolTipsSPC_Approval["English"]["SPC_REQ_BY"] = "";
	$fieldLabelsSPC_Approval["English"]["Target_Price"] = "Target Price";
	$fieldToolTipsSPC_Approval["English"]["Target_Price"] = "";
	$fieldLabelsSPC_Approval["English"]["SPC_Status"] = "SPC Status";
	$fieldToolTipsSPC_Approval["English"]["SPC_Status"] = "";
	$fieldLabelsSPC_Approval["English"]["Special_Price"] = "Special Price";
	$fieldToolTipsSPC_Approval["English"]["Special_Price"] = "";
	$fieldLabelsSPC_Approval["English"]["SPC_Approved_By"] = "SPC Approved By";
	$fieldToolTipsSPC_Approval["English"]["SPC_Approved_By"] = "";
	$fieldLabelsSPC_Approval["English"]["List_Price"] = "List Price";
	$fieldToolTipsSPC_Approval["English"]["List_Price"] = "";
	$fieldLabelsSPC_Approval["English"]["MDP"] = "MDP";
	$fieldToolTipsSPC_Approval["English"]["MDP"] = "";
	$fieldLabelsSPC_Approval["English"]["Last_Updated_on"] = "Last Updated on";
	$fieldToolTipsSPC_Approval["English"]["Last Updated on"] = "";
	$fieldLabelsSPC_Approval["English"]["Last_Updated_by"] = "Last Updated by";
	$fieldToolTipsSPC_Approval["English"]["Last Updated by"] = "";
	$fieldLabelsSPC_Approval["English"]["Target_Amt"] = "Target Amt";
	$fieldToolTipsSPC_Approval["English"]["Target_Amt"] = "";
	$fieldLabelsSPC_Approval["English"]["SPC_Amt"] = "SPC Amt";
	$fieldToolTipsSPC_Approval["English"]["SPC_Amt"] = "";
	if (count($fieldToolTipsSPC_Approval["English"])){
		$tdataSPC_Approval[".isUseToolTips"]=true;
	}
}


	
	$tdataSPC_Approval[".NCSearch"]=true;

	

$tdataSPC_Approval[".shortTableName"] = "SPC_Approval";
$tdataSPC_Approval[".nSecOptions"] = 0;
$tdataSPC_Approval[".recsPerRowList"] = 1;	
$tdataSPC_Approval[".tableGroupBy"] = "0";
$tdataSPC_Approval[".mainTableOwnerID"] = "";
$tdataSPC_Approval[".moveNext"] = 1;




$tdataSPC_Approval[".showAddInPopup"] = false;

$tdataSPC_Approval[".showEditInPopup"] = false;

$tdataSPC_Approval[".showViewInPopup"] = false;


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

$tdataSPC_Approval[".listAjax"] = false;

	$tdataSPC_Approval[".audit"] = false;

	$tdataSPC_Approval[".locking"] = false;
	
$tdataSPC_Approval[".listIcons"] = true;
$tdataSPC_Approval[".inlineEdit"] = true;




$tdataSPC_Approval[".showSimpleSearchOptions"] = false;

$tdataSPC_Approval[".showSearchPanel"] = true;


$tdataSPC_Approval[".isUseAjaxSuggest"] = true;

$tdataSPC_Approval[".rowHighlite"] = true;


// button handlers file names

$tdataSPC_Approval[".addPageEvents"] = false;

$tdataSPC_Approval[".arrKeyFields"][] = "LBOMID";

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

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

$tdataSPC_Approval[".isUseiBox"] = false;




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

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

$tdataSPC_Approval[".globSearchFields"][] = "LBOMID";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("LBOMID", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "LBOMID";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Lead_ID";
// 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_ID", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Lead_ID";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Material Category";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Material Category", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Material Category";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Material Code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Material Code", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Material Code";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Quantity";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Quantity", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Quantity";	
}
$tdataSPC_Approval[".globSearchFields"][] = "SPC_REQ_BY";
// 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_REQ_BY", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_REQ_BY";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Target_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("Target_Price", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Target_Price";	
}
$tdataSPC_Approval[".globSearchFields"][] = "SPC_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("SPC_Status", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_Status";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Special_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("Special_Price", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Special_Price";	
}
$tdataSPC_Approval[".globSearchFields"][] = "SPC_Approved_By";
// 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_Approved_By", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_Approved_By";	
}
$tdataSPC_Approval[".globSearchFields"][] = "List_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("List_Price", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "List_Price";	
}
$tdataSPC_Approval[".globSearchFields"][] = "MDP";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("MDP", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "MDP";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Last Updated on";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Last Updated on", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Last Updated on";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Last Updated by";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Last Updated by", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Last Updated by";	
}
$tdataSPC_Approval[".globSearchFields"][] = "Target_Amt";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Target_Amt", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "Target_Amt";	
}
$tdataSPC_Approval[".globSearchFields"][] = "SPC_Amt";
// 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_Amt", $tdataSPC_Approval[".allSearchFields"]))
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_Amt";	
}


$tdataSPC_Approval[".googleLikeFields"][] = "LBOMID";
$tdataSPC_Approval[".googleLikeFields"][] = "Lead_ID";
$tdataSPC_Approval[".googleLikeFields"][] = "Material Category";
$tdataSPC_Approval[".googleLikeFields"][] = "Material Code";
$tdataSPC_Approval[".googleLikeFields"][] = "Quantity";
$tdataSPC_Approval[".googleLikeFields"][] = "SPC_REQ_BY";
$tdataSPC_Approval[".googleLikeFields"][] = "Target_Price";
$tdataSPC_Approval[".googleLikeFields"][] = "SPC_Status";
$tdataSPC_Approval[".googleLikeFields"][] = "Special_Price";
$tdataSPC_Approval[".googleLikeFields"][] = "SPC_Approved_By";
$tdataSPC_Approval[".googleLikeFields"][] = "List_Price";
$tdataSPC_Approval[".googleLikeFields"][] = "MDP";
$tdataSPC_Approval[".googleLikeFields"][] = "Last Updated on";
$tdataSPC_Approval[".googleLikeFields"][] = "Last Updated by";
$tdataSPC_Approval[".googleLikeFields"][] = "Target_Amt";
$tdataSPC_Approval[".googleLikeFields"][] = "SPC_Amt";



$tdataSPC_Approval[".advSearchFields"][] = "LBOMID";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("LBOMID", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "LBOMID";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Lead_ID";
// 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_ID", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Lead_ID";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Material Category";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Material Category", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Material Category";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Material Code";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Material Code", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Material Code";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Quantity";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Quantity", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Quantity";	
}
$tdataSPC_Approval[".advSearchFields"][] = "SPC_REQ_BY";
// 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_REQ_BY", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_REQ_BY";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Target_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("Target_Price", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Target_Price";	
}
$tdataSPC_Approval[".advSearchFields"][] = "SPC_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("SPC_Status", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_Status";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Special_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("Special_Price", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Special_Price";	
}
$tdataSPC_Approval[".advSearchFields"][] = "SPC_Approved_By";
// 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_Approved_By", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_Approved_By";	
}
$tdataSPC_Approval[".advSearchFields"][] = "List_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("List_Price", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "List_Price";	
}
$tdataSPC_Approval[".advSearchFields"][] = "MDP";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("MDP", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "MDP";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Last Updated on";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Last Updated on", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Last Updated on";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Last Updated by";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Last Updated by", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Last Updated by";	
}
$tdataSPC_Approval[".advSearchFields"][] = "Target_Amt";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Target_Amt", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "Target_Amt";	
}
$tdataSPC_Approval[".advSearchFields"][] = "SPC_Amt";
// 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_Amt", $tdataSPC_Approval[".allSearchFields"])) 
{
	$tdataSPC_Approval[".allSearchFields"][] = "SPC_Amt";	
}

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


	

$tdataSPC_Approval[".isDisplayLoading"] = true;

$tdataSPC_Approval[".isResizeColumns"] = false;




$tdataSPC_Approval[".totalsFields"][] = array("fName"=>"Target_Amt", "totalsType"=>"TOTAL", "viewFormat"=>"Number");
$tdataSPC_Approval[".totalsFields"][] = array("fName"=>"SPC_Amt", "totalsType"=>"TOTAL", "viewFormat"=>"Number");

$tdataSPC_Approval[".pageSize"] = 20;

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

$tdataSPC_Approval[".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";
$tdataSPC_Approval[".sqlFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$tdataSPC_Approval[".sqlWhereExpr"] = "";
$tdataSPC_Approval[".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;
$tdataSPC_Approval[".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_Approval[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "LBOMID";
	$tdataSPC_Approval[".Keys"] = $tableKeys;

//	LBOMID
	$fdata = array();
	$fdata["strName"] = "LBOMID";
	$fdata["ownerTable"] = "lead_bom";
		
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "LBOMID";
	
		$fdata["FullName"]= "lead_bom.LBOMID";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["LBOMID"]=$fdata;
//	Lead_ID
	$fdata = array();
	$fdata["strName"] = "Lead_ID";
	$fdata["ownerTable"] = "lead_bom";
		$fdata["Label"]="Lead ID"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_ID";
	
		$fdata["FullName"]= "lead_bom.Lead_ID";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			
		
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdataSPC_Approval["Lead_ID"]=$fdata;
//	Material Category
	$fdata = array();
	$fdata["strName"] = "Material Category";
	$fdata["ownerTable"] = "lead_bom";
		
		
		
	$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"]="Material Category";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="Material Category";
				$fdata["LookupTable"]="material category";
	$fdata["LookupOrderBy"]="";
																			
				//	dependent dropdowns	
	$fdata["DependentLookups"]=array();
	$fdata["DependentLookups"][]="Material Code";
					
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Material_Category";
	
		$fdata["FullName"]= "lead_bom.`Material Category`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Material Category"]=$fdata;
//	Material Code
	$fdata = array();
	$fdata["strName"] = "Material Code";
	$fdata["ownerTable"] = "lead_bom";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Lookup wizard";
	$fdata["ViewFormat"]= "HTML";
	
		
		$fdata["LookupType"]=1;
	$fdata["pLookupType"] = 1;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
										$fdata["LinkField"]="Material Code";
	$fdata["LinkFieldType"]=200;
	$fdata["DisplayField"]="Material Description";
				$fdata["LookupTable"]="material_master";
	$fdata["LookupOrderBy"]="";
										$fdata["UseCategory"]=true; 
	$fdata["CategoryControl"]="Material Category"; 
	$fdata["CategoryFilter"]="Material Category"; 
										$fdata["SimpleAdd"]=true;
	
					
		
		
		
	$fdata["GoodName"]= "Material_Code";
	
		$fdata["FullName"]= "lead_bom.`Material Code`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Material Code"]=$fdata;
//	Quantity
	$fdata = array();
	$fdata["strName"] = "Quantity";
	$fdata["ownerTable"] = "lead_bom";
		
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Quantity";
	
		$fdata["FullName"]= "lead_bom.Quantity";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Quantity"]=$fdata;
//	SPC_REQ_BY
	$fdata = array();
	$fdata["strName"] = "SPC_REQ_BY";
	$fdata["ownerTable"] = "lead_bom";
		$fdata["Label"]="SPC REQ BY"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SPC_REQ_BY";
	
		$fdata["FullName"]= "lead_bom.SPC_REQ_BY";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["SPC_REQ_BY"]=$fdata;
//	Target_Price
	$fdata = array();
	$fdata["strName"] = "Target_Price";
	$fdata["ownerTable"] = "lead_bom";
		$fdata["Label"]="Target Price"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Target_Price";
	
		$fdata["FullName"]= "lead_bom.Target_Price";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 7;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Target_Price"]=$fdata;
//	SPC_Status
	$fdata = array();
	$fdata["strName"] = "SPC_Status";
	$fdata["ownerTable"] = "lead_bom";
		$fdata["Label"]="SPC Status"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Radio button";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=0;
	$fdata["pLookupType"] = 0;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
					$fdata["HorizontalLookup"]= true;
					$fdata["LookupValues"]=array();
	$fdata["LookupValues"][]="Pending";
	$fdata["LookupValues"][]="Approved";
			
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SPC_Status";
	
		$fdata["FullName"]= "lead_bom.SPC_Status";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 8;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["SPC_Status"]=$fdata;
//	Special_Price
	$fdata = array();
	$fdata["strName"] = "Special_Price";
	$fdata["ownerTable"] = "lead_bom";
		$fdata["Label"]="Special Price"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Special_Price";
	
		$fdata["FullName"]= "lead_bom.Special_Price";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Special_Price"]=$fdata;
//	SPC_Approved_By
	$fdata = array();
	$fdata["strName"] = "SPC_Approved_By";
	$fdata["ownerTable"] = "lead_bom";
		$fdata["Label"]="SPC Approved By"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SPC_Approved_By";
	
		$fdata["FullName"]= "lead_bom.SPC_Approved_By";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 10;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["SPC_Approved_By"]=$fdata;
//	List_Price
	$fdata = array();
	$fdata["strName"] = "List_Price";
	$fdata["ownerTable"] = "material_master";
		$fdata["Label"]="List Price"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "List_Price";
	
		$fdata["FullName"]= "material_master.List_Price";
	
		
		
		
		
		
				$fdata["Index"]= 11;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["List_Price"]=$fdata;
//	MDP
	$fdata = array();
	$fdata["strName"] = "MDP";
	$fdata["ownerTable"] = "material_master";
		
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "MDP";
	
		$fdata["FullName"]= "material_master.MDP";
	
		
		
		
		
		
				$fdata["Index"]= 12;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["MDP"]=$fdata;
//	Last Updated on
	$fdata = array();
	$fdata["strName"] = "Last Updated on";
	$fdata["ownerTable"] = "material_master";
		
		
		
	$fdata["FieldType"]= 135;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Last_Updated_on";
	
		$fdata["FullName"]= "material_master.`Last Updated on`";
	
		
		
		
		
		
				$fdata["Index"]= 13;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Last Updated on"]=$fdata;
//	Last Updated by
	$fdata = array();
	$fdata["strName"] = "Last Updated by";
	$fdata["ownerTable"] = "material_master";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Last_Updated_by";
	
		$fdata["FullName"]= "material_master.`Last Updated by`";
	
		
		
		
		
		
				$fdata["Index"]= 14;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Last Updated by"]=$fdata;
//	Target_Amt
	$fdata = array();
	$fdata["strName"] = "Target_Amt";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="Target Amt"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Target_Amt";
	
		$fdata["FullName"]= "lead_bom.Quantity*lead_bom.Target_Price";
	
		
		
		
		
		
				$fdata["Index"]= 15;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["Target_Amt"]=$fdata;
//	SPC_Amt
	$fdata = array();
	$fdata["strName"] = "SPC_Amt";
	$fdata["ownerTable"] = "";
		$fdata["Label"]="SPC Amt"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SPC_Amt";
	
		$fdata["FullName"]= "lead_bom.Quantity*lead_bom.Special_Price";
	
		
		
		
		
		
				$fdata["Index"]= 16;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Approval["SPC_Amt"]=$fdata;

	
$tables_data["SPC_Approval"]=&$tdataSPC_Approval;
$field_labels["SPC_Approval"] = &$fieldLabelsSPC_Approval;
$fieldToolTips["SPC_Approval"] = &$fieldToolTipsSPC_Approval;

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

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

$mIndex = 1-1;
			$strOriginalDetailsTable="lead_table";
	$masterTablesData["SPC_Approval"][$mIndex] = array(
		  "mDataSourceTable"=>"SPC-Pending"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "SPC_Pending"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "0"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$masterTablesData["SPC_Approval"][$mIndex]["masterKeys"][]="Leadid";
		$masterTablesData["SPC_Approval"][$mIndex]["detailKeys"][]="Lead_ID";

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

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










$proto118=array();
$proto118["m_strHead"] = "SELECT";
$proto118["m_strFieldList"] = "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";
$proto118["m_strFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$proto118["m_strWhere"] = "";
$proto118["m_strOrderBy"] = "";
$proto118["m_strTail"] = "";
$proto119=array();
$proto119["m_sql"] = "";
$proto119["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto118["m_having"] = $obj;
$proto118["m_fieldlist"] = array();
						$proto123=array();
			$obj = new SQLField(array(
	"m_strName" => "LBOMID",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto125=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead_ID",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto127=array();
			$obj = new SQLField(array(
	"m_strName" => "Material Category",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto129=array();
			$obj = new SQLField(array(
	"m_strName" => "Material Code",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto131=array();
			$obj = new SQLField(array(
	"m_strName" => "Quantity",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto133=array();
			$obj = new SQLField(array(
	"m_strName" => "SPC_REQ_BY",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto135=array();
			$obj = new SQLField(array(
	"m_strName" => "Target_Price",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto137=array();
			$obj = new SQLField(array(
	"m_strName" => "SPC_Status",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto139=array();
			$obj = new SQLField(array(
	"m_strName" => "Special_Price",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto141=array();
			$obj = new SQLField(array(
	"m_strName" => "SPC_Approved_By",
	"m_strTable" => "lead_bom"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto143=array();
			$obj = new SQLField(array(
	"m_strName" => "List_Price",
	"m_strTable" => "material_master"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto145=array();
			$obj = new SQLField(array(
	"m_strName" => "MDP",
	"m_strTable" => "material_master"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto147=array();
			$obj = new SQLField(array(
	"m_strName" => "Last Updated on",
	"m_strTable" => "material_master"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto149=array();
			$obj = new SQLField(array(
	"m_strName" => "Last Updated by",
	"m_strTable" => "material_master"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto151=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "lead_bom.Quantity*lead_bom.Target_Price"
));

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

$proto118["m_fieldlist"][]=$obj;
						$proto153=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "lead_bom.Quantity*lead_bom.Special_Price"
));

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

$proto118["m_fieldlist"][]=$obj;
$proto118["m_fromlist"] = array();
												$proto155=array();
$proto155["m_link"] = "SQLL_MAIN";
			$proto156=array();
$proto156["m_strName"] = "lead_bom";
$proto156["m_columns"] = array();
$proto156["m_columns"][] = "LBOMID";
$proto156["m_columns"][] = "Lead_ID";
$proto156["m_columns"][] = "Material Category";
$proto156["m_columns"][] = "Material Code";
$proto156["m_columns"][] = "Quantity";
$proto156["m_columns"][] = "SPC_REQ_BY";
$proto156["m_columns"][] = "Target_Price";
$proto156["m_columns"][] = "SPC_Status";
$proto156["m_columns"][] = "Special_Price";
$proto156["m_columns"][] = "SPC_Approved_By";
$obj = new SQLTable($proto156);

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

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

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

$proto118["m_fromlist"][]=$obj;
												$proto159=array();
$proto159["m_link"] = "SQLL_INNERJOIN";
			$proto160=array();
$proto160["m_strName"] = "material_master";
$proto160["m_columns"] = array();
$proto160["m_columns"][] = "Material Code";
$proto160["m_columns"][] = "Material Description";
$proto160["m_columns"][] = "Material Category";
$proto160["m_columns"][] = "Specification";
$proto160["m_columns"][] = "Status";
$proto160["m_columns"][] = "List_Price";
$proto160["m_columns"][] = "MDP";
$proto160["m_columns"][] = "Tax";
$proto160["m_columns"][] = "Last Updated on";
$proto160["m_columns"][] = "Last Updated by";
$obj = new SQLTable($proto160);

$proto159["m_table"] = $obj;
$proto159["m_alias"] = "";
$proto161=array();
$proto161["m_sql"] = "lead_bom.`Material Code` = material_master.`Material Code`";
$proto161["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Material Code",
	"m_strTable" => "lead_bom"
));

$proto161["m_column"]=$obj;
$proto161["m_contained"] = array();
$proto161["m_strCase"] = "= material_master.`Material Code`";
$proto161["m_havingmode"] = "0";
$proto161["m_inBrackets"] = "0";
$proto161["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto161);

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

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

$queryData_SPC_Approval = $obj;
$tdataSPC_Approval[".sqlquery"] = $queryData_SPC_Approval;

$tableEvents["SPC_Approval"] = new eventsBase;

?>
