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


	
//	field labels
$fieldLabelsSPC_Req = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsSPC_Req["English"]=array();
	$fieldToolTipsSPC_Req["English"]=array();
	$fieldLabelsSPC_Req["English"]["LBOMID"] = "LBOMID";
	$fieldToolTipsSPC_Req["English"]["LBOMID"] = "";
	$fieldLabelsSPC_Req["English"]["Lead_ID"] = "Lead ID";
	$fieldToolTipsSPC_Req["English"]["Lead_ID"] = "";
	$fieldLabelsSPC_Req["English"]["Material_Category"] = "Material Category";
	$fieldToolTipsSPC_Req["English"]["Material Category"] = "";
	$fieldLabelsSPC_Req["English"]["Material_Code"] = "Material Code";
	$fieldToolTipsSPC_Req["English"]["Material Code"] = "";
	$fieldLabelsSPC_Req["English"]["Quantity"] = "Quantity";
	$fieldToolTipsSPC_Req["English"]["Quantity"] = "";
	$fieldLabelsSPC_Req["English"]["SPC_REQ_BY"] = "SPC REQ BY";
	$fieldToolTipsSPC_Req["English"]["SPC_REQ_BY"] = "";
	$fieldLabelsSPC_Req["English"]["Target_Price"] = "Target Price";
	$fieldToolTipsSPC_Req["English"]["Target_Price"] = "";
	$fieldLabelsSPC_Req["English"]["SPC_Status"] = "SPC Status";
	$fieldToolTipsSPC_Req["English"]["SPC_Status"] = "";
	$fieldLabelsSPC_Req["English"]["Unit_Price"] = "Unit Price";
	$fieldToolTipsSPC_Req["English"]["Unit Price"] = "";
	$fieldLabelsSPC_Req["English"]["Amount"] = "Amount";
	$fieldToolTipsSPC_Req["English"]["Amount"] = "";
	$fieldLabelsSPC_Req["English"]["Target_Amt"] = "Target Amt";
	$fieldToolTipsSPC_Req["English"]["Target Amt"] = "";
	if (count($fieldToolTipsSPC_Req["English"])){
		$tdataSPC_Req[".isUseToolTips"]=true;
	}
}


	
	$tdataSPC_Req[".NCSearch"]=true;

	

$tdataSPC_Req[".shortTableName"] = "SPC_Req";
$tdataSPC_Req[".nSecOptions"] = 0;
$tdataSPC_Req[".recsPerRowList"] = 1;	
$tdataSPC_Req[".tableGroupBy"] = "0";
$tdataSPC_Req[".mainTableOwnerID"] = "";
$tdataSPC_Req[".moveNext"] = 1;




$tdataSPC_Req[".showAddInPopup"] = false;

$tdataSPC_Req[".showEditInPopup"] = false;

$tdataSPC_Req[".showViewInPopup"] = false;


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

$tdataSPC_Req[".listAjax"] = false;

	$tdataSPC_Req[".audit"] = false;

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




$tdataSPC_Req[".showSimpleSearchOptions"] = false;

$tdataSPC_Req[".showSearchPanel"] = true;


$tdataSPC_Req[".isUseAjaxSuggest"] = true;

$tdataSPC_Req[".rowHighlite"] = true;


// button handlers file names

$tdataSPC_Req[".addPageEvents"] = false;

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

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

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

$tdataSPC_Req[".isUseiBox"] = false;




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

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

$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "LBOMID";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Material Category";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Material Code";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Quantity";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "SPC_REQ_BY";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Target_Price";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "SPC_Status";	
}
$tdataSPC_Req[".globSearchFields"][] = "Unit 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("Unit Price", $tdataSPC_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Unit Price";	
}
$tdataSPC_Req[".globSearchFields"][] = "Amount";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Amount", $tdataSPC_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Amount";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"]))
{
	$tdataSPC_Req[".allSearchFields"][] = "Target Amt";	
}


$tdataSPC_Req[".googleLikeFields"][] = "LBOMID";
$tdataSPC_Req[".googleLikeFields"][] = "Lead_ID";
$tdataSPC_Req[".googleLikeFields"][] = "Material Category";
$tdataSPC_Req[".googleLikeFields"][] = "Material Code";
$tdataSPC_Req[".googleLikeFields"][] = "Quantity";
$tdataSPC_Req[".googleLikeFields"][] = "SPC_REQ_BY";
$tdataSPC_Req[".googleLikeFields"][] = "Target_Price";
$tdataSPC_Req[".googleLikeFields"][] = "SPC_Status";
$tdataSPC_Req[".googleLikeFields"][] = "Unit Price";
$tdataSPC_Req[".googleLikeFields"][] = "Amount";
$tdataSPC_Req[".googleLikeFields"][] = "Target Amt";



$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "LBOMID";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Lead_ID";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Material Category";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Material Code";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Quantity";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "SPC_REQ_BY";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Target_Price";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "SPC_Status";	
}
$tdataSPC_Req[".advSearchFields"][] = "Unit 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("Unit Price", $tdataSPC_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Unit Price";	
}
$tdataSPC_Req[".advSearchFields"][] = "Amount";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Amount", $tdataSPC_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Amount";	
}
$tdataSPC_Req[".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_Req[".allSearchFields"])) 
{
	$tdataSPC_Req[".allSearchFields"][] = "Target Amt";	
}

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


	

$tdataSPC_Req[".isDisplayLoading"] = true;

$tdataSPC_Req[".isResizeColumns"] = false;




$tdataSPC_Req[".totalsFields"][] = array("fName"=>"Amount", "totalsType"=>"TOTAL", "viewFormat"=>"Number");
$tdataSPC_Req[".totalsFields"][] = array("fName"=>"Target Amt", "totalsType"=>"TOTAL", "viewFormat"=>"Number");

$tdataSPC_Req[".pageSize"] = 20;

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

$tdataSPC_Req[".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,  material_master.List_Price AS `Unit Price`,  lead_bom.Quantity*material_master.List_price AS Amount,  lead_bom.Quantity*lead_bom.Target_Price AS `Target Amt`";
$tdataSPC_Req[".sqlFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$tdataSPC_Req[".sqlWhereExpr"] = "";
$tdataSPC_Req[".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_Req[".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_Req[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "LBOMID";
	$tdataSPC_Req[".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_Req["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"]="";
			
		
		
		
		
		
		
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdataSPC_Req["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_Req["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"]= "";
	
		
		$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["NeedEncode"]=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_Req["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_Req["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"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "SPC_REQ_BY";
	
		$fdata["FullName"]= "lead_bom.SPC_REQ_BY";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 6;
				$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_Req["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"]= "Text field";
	$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["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_Req["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"]= "Lookup wizard";
	$fdata["ViewFormat"]= "";
	
		
		$fdata["LookupType"]=0;
	$fdata["pLookupType"] = 0;
	$fdata["freeInput"] = 0;	
	$fdata["autoCompleteFieldsOnEdit"] = 0;
	$fdata["autoCompleteFields"] = array();
									$fdata["LookupValues"]=array();
	$fdata["LookupValues"][]="Pending";
			
		
		
		$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_Req["SPC_Status"]=$fdata;
//	Unit Price
	$fdata = array();
	$fdata["strName"] = "Unit Price";
	$fdata["ownerTable"] = "material_master";
		
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Unit_Price";
	
		$fdata["FullName"]= "material_master.List_Price";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Req["Unit Price"]=$fdata;
//	Amount
	$fdata = array();
	$fdata["strName"] = "Amount";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Readonly";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Amount";
	
		$fdata["FullName"]= "lead_bom.Quantity*material_master.List_price";
	
		
		
		
		
		
				$fdata["Index"]= 10;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Req["Amount"]=$fdata;
//	Target Amt
	$fdata = array();
	$fdata["strName"] = "Target Amt";
	$fdata["ownerTable"] = "";
		
		
		
	$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"]= 11;
				
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC_Req["Target Amt"]=$fdata;

	
$tables_data["SPC_Req"]=&$tdataSPC_Req;
$field_labels["SPC_Req"] = &$fieldLabelsSPC_Req;
$fieldToolTips["SPC_Req"] = &$fieldToolTipsSPC_Req;

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

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

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

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

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










$proto194=array();
$proto194["m_strHead"] = "SELECT";
$proto194["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,  material_master.List_Price AS `Unit Price`,  lead_bom.Quantity*material_master.List_price AS Amount,  lead_bom.Quantity*lead_bom.Target_Price AS `Target Amt`";
$proto194["m_strFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$proto194["m_strWhere"] = "";
$proto194["m_strOrderBy"] = "";
$proto194["m_strTail"] = "";
$proto195=array();
$proto195["m_sql"] = "";
$proto195["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto215["m_expr"]=$obj;
$proto215["m_alias"] = "Unit Price";
$obj = new SQLFieldListItem($proto215);

$proto194["m_fieldlist"][]=$obj;
						$proto217=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "lead_bom.Quantity*material_master.List_price"
));

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

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

$proto219["m_expr"]=$obj;
$proto219["m_alias"] = "Target Amt";
$obj = new SQLFieldListItem($proto219);

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

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

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

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

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

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

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

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

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

$queryData_SPC_Req = $obj;
$tdataSPC_Req[".sqlquery"] = $queryData_SPC_Req;

$tableEvents["SPC_Req"] = new eventsBase;

?>
