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


	
//	field labels
$fieldLabelsLead_BOM = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsLead_BOM["English"]=array();
	$fieldToolTipsLead_BOM["English"]=array();
	$fieldLabelsLead_BOM["English"]["LBOMID"] = "LBOMID";
	$fieldToolTipsLead_BOM["English"]["LBOMID"] = "";
	$fieldLabelsLead_BOM["English"]["Lead_ID"] = "Lead ID";
	$fieldToolTipsLead_BOM["English"]["Lead_ID"] = "";
	$fieldLabelsLead_BOM["English"]["Material_Category"] = "Material Category";
	$fieldToolTipsLead_BOM["English"]["Material Category"] = "";
	$fieldLabelsLead_BOM["English"]["Material_Code"] = "Material Code";
	$fieldToolTipsLead_BOM["English"]["Material Code"] = "";
	$fieldLabelsLead_BOM["English"]["Quantity"] = "Quantity";
	$fieldToolTipsLead_BOM["English"]["Quantity"] = "";
	$fieldLabelsLead_BOM["English"]["Amonut"] = "Amonut";
	$fieldToolTipsLead_BOM["English"]["Amonut"] = "";
	$fieldLabelsLead_BOM["English"]["Unit_Price"] = "Unit Price";
	$fieldToolTipsLead_BOM["English"]["Unit_Price"] = "";
	if (count($fieldToolTipsLead_BOM["English"])){
		$tdataLead_BOM[".isUseToolTips"]=true;
	}
}


	
	$tdataLead_BOM[".NCSearch"]=true;

	

$tdataLead_BOM[".shortTableName"] = "Lead_BOM";
$tdataLead_BOM[".nSecOptions"] = 0;
$tdataLead_BOM[".recsPerRowList"] = 1;	
$tdataLead_BOM[".tableGroupBy"] = "0";
$tdataLead_BOM[".mainTableOwnerID"] = "";
$tdataLead_BOM[".moveNext"] = 1;




$tdataLead_BOM[".showAddInPopup"] = false;

$tdataLead_BOM[".showEditInPopup"] = false;

$tdataLead_BOM[".showViewInPopup"] = false;


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

$tdataLead_BOM[".listAjax"] = false;

	$tdataLead_BOM[".audit"] = false;

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



$tdataLead_BOM[".delete"] = true;

$tdataLead_BOM[".showSimpleSearchOptions"] = false;

$tdataLead_BOM[".showSearchPanel"] = true;


$tdataLead_BOM[".isUseAjaxSuggest"] = true;

$tdataLead_BOM[".rowHighlite"] = true;


// button handlers file names

$tdataLead_BOM[".addPageEvents"] = false;

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

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

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

$tdataLead_BOM[".isUseiBox"] = false;



$tdataLead_BOM[".isUseInlineAdd"] = true;

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

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

$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"]))
{
	$tdataLead_BOM[".allSearchFields"][] = "LBOMID";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"]))
{
	$tdataLead_BOM[".allSearchFields"][] = "Material Category";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"]))
{
	$tdataLead_BOM[".allSearchFields"][] = "Material Code";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"]))
{
	$tdataLead_BOM[".allSearchFields"][] = "Quantity";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"]))
{
	$tdataLead_BOM[".allSearchFields"][] = "Unit_Price";	
}
$tdataLead_BOM[".globSearchFields"][] = "Amonut";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Amonut", $tdataLead_BOM[".allSearchFields"]))
{
	$tdataLead_BOM[".allSearchFields"][] = "Amonut";	
}


$tdataLead_BOM[".googleLikeFields"][] = "LBOMID";
$tdataLead_BOM[".googleLikeFields"][] = "Material Category";
$tdataLead_BOM[".googleLikeFields"][] = "Lead_ID";
$tdataLead_BOM[".googleLikeFields"][] = "Material Code";
$tdataLead_BOM[".googleLikeFields"][] = "Quantity";
$tdataLead_BOM[".googleLikeFields"][] = "Unit_Price";
$tdataLead_BOM[".googleLikeFields"][] = "Amonut";



$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "LBOMID";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "Material Category";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "Lead_ID";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "Material Code";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "Quantity";	
}
$tdataLead_BOM[".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", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "Unit_Price";	
}
$tdataLead_BOM[".advSearchFields"][] = "Amonut";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Amonut", $tdataLead_BOM[".allSearchFields"])) 
{
	$tdataLead_BOM[".allSearchFields"][] = "Amonut";	
}

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


	

$tdataLead_BOM[".isDisplayLoading"] = true;

$tdataLead_BOM[".isResizeColumns"] = false;




$tdataLead_BOM[".totalsFields"][] = array("fName"=>"Amonut", "totalsType"=>"TOTAL", "viewFormat"=>"Number");

$tdataLead_BOM[".pageSize"] = 20;

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

$tdataLead_BOM[".sqlHead"] = "SELECT lead_bom.LBOMID,  lead_bom.Lead_ID,  lead_bom.`Material Category`,  lead_bom.`Material Code`,  lead_bom.Quantity,  material_master.List_Price AS Unit_Price,  lead_bom.Quantity*material_master.List_price AS Amonut";
$tdataLead_BOM[".sqlFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$tdataLead_BOM[".sqlWhereExpr"] = "";
$tdataLead_BOM[".sqlTail"] = "";




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

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

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

//	LBOMID
	$fdata = array();
	$fdata["strName"] = "LBOMID";
	$fdata["ownerTable"] = "lead_bom";
		
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "LBOMID";
	
		$fdata["FullName"]= "lead_bom.LBOMID";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["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["bAddPage"]=true; 
	
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["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["Index"]= 3;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["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["LookupWhere"] = "`Status` = 'Active' ";
				$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["Index"]= 4;
				
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["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["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["Quantity"]=$fdata;
//	Unit_Price
	$fdata = array();
	$fdata["strName"] = "Unit_Price";
	$fdata["ownerTable"] = "material_master";
		$fdata["Label"]="Unit Price"; 
	
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Unit_Price";
	
		$fdata["FullName"]= "material_master.List_Price";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["Unit_Price"]=$fdata;
//	Amonut
	$fdata = array();
	$fdata["strName"] = "Amonut";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Amonut";
	
		$fdata["FullName"]= "lead_bom.Quantity*material_master.List_price";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataLead_BOM["Amonut"]=$fdata;

	
$tables_data["Lead-BOM"]=&$tdataLead_BOM;
$field_labels["Lead_BOM"] = &$fieldLabelsLead_BOM;
$fieldToolTips["Lead-BOM"] = &$fieldToolTipsLead_BOM;

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

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

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

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

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










$proto229=array();
$proto229["m_strHead"] = "SELECT";
$proto229["m_strFieldList"] = "lead_bom.LBOMID,  lead_bom.Lead_ID,  lead_bom.`Material Category`,  lead_bom.`Material Code`,  lead_bom.Quantity,  material_master.List_Price AS Unit_Price,  lead_bom.Quantity*material_master.List_price AS Amonut";
$proto229["m_strFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$proto229["m_strWhere"] = "";
$proto229["m_strOrderBy"] = "";
$proto229["m_strTail"] = "";
$proto230=array();
$proto230["m_sql"] = "";
$proto230["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$queryData_Lead_BOM = $obj;
$tdataLead_BOM[".sqlquery"] = $queryData_Lead_BOM;

$tableEvents["Lead-BOM"] = new eventsBase;

?>
