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


	
//	field labels
$fieldLabelsQuote = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsQuote["English"]=array();
	$fieldToolTipsQuote["English"]=array();
	$fieldLabelsQuote["English"]["LBOMID"] = "LBOMID";
	$fieldToolTipsQuote["English"]["LBOMID"] = "";
	$fieldLabelsQuote["English"]["Lead_ID"] = "Lead ID";
	$fieldToolTipsQuote["English"]["Lead_ID"] = "";
	$fieldLabelsQuote["English"]["Material_Code"] = "Material Code";
	$fieldToolTipsQuote["English"]["Material Code"] = "";
	$fieldLabelsQuote["English"]["Quantity"] = "Quantity";
	$fieldToolTipsQuote["English"]["Quantity"] = "";
	$fieldLabelsQuote["English"]["Unit_Price"] = "Unit Price";
	$fieldToolTipsQuote["English"]["Unit_Price"] = "";
	$fieldLabelsQuote["English"]["Amonut"] = "Amonut";
	$fieldToolTipsQuote["English"]["Amonut"] = "";
	$fieldLabelsQuote["English"]["Tax__"] = "Tax %";
	$fieldToolTipsQuote["English"]["Tax %"] = "";
	$fieldLabelsQuote["English"]["Ext__Amount"] = "Ext. Amount";
	$fieldToolTipsQuote["English"]["Ext. Amount"] = "";
	$fieldLabelsQuote["English"]["Specification"] = "Specification";
	$fieldToolTipsQuote["English"]["Specification"] = "";
	if (count($fieldToolTipsQuote["English"])){
		$tdataQuote[".isUseToolTips"]=true;
	}
}


	
	$tdataQuote[".NCSearch"]=true;

	

$tdataQuote[".shortTableName"] = "Quote";
$tdataQuote[".nSecOptions"] = 0;
$tdataQuote[".recsPerRowList"] = 1;	
$tdataQuote[".tableGroupBy"] = "0";
$tdataQuote[".mainTableOwnerID"] = "";
$tdataQuote[".moveNext"] = 1;




$tdataQuote[".showAddInPopup"] = false;

$tdataQuote[".showEditInPopup"] = false;

$tdataQuote[".showViewInPopup"] = false;


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

$tdataQuote[".listAjax"] = false;

	$tdataQuote[".audit"] = false;

	$tdataQuote[".locking"] = false;
	
$tdataQuote[".listIcons"] = true;

$tdataQuote[".exportTo"] = true;

$tdataQuote[".printFriendly"] = true;


$tdataQuote[".showSimpleSearchOptions"] = false;

$tdataQuote[".showSearchPanel"] = true;


$tdataQuote[".isUseAjaxSuggest"] = true;

$tdataQuote[".rowHighlite"] = true;


// button handlers file names

$tdataQuote[".addPageEvents"] = false;

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

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

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

$tdataQuote[".isUseiBox"] = false;




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

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

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


$tdataQuote[".googleLikeFields"][] = "Material Code";
$tdataQuote[".googleLikeFields"][] = "Specification";
$tdataQuote[".googleLikeFields"][] = "Quantity";
$tdataQuote[".googleLikeFields"][] = "Unit_Price";
$tdataQuote[".googleLikeFields"][] = "Amonut";
$tdataQuote[".googleLikeFields"][] = "Tax %";
$tdataQuote[".googleLikeFields"][] = "Ext. Amount";
$tdataQuote[".googleLikeFields"][] = "LBOMID";
$tdataQuote[".googleLikeFields"][] = "Lead_ID";



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

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


	

$tdataQuote[".isDisplayLoading"] = true;

$tdataQuote[".isResizeColumns"] = false;




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

$tdataQuote[".pageSize"] = 20;

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

$tdataQuote[".sqlHead"] = "SELECT lead_bom.LBOMID,  lead_bom.Lead_ID,  lead_bom.`Material Code`,  lead_bom.Quantity,  material_master.List_Price AS Unit_Price,  lead_bom.Quantity*material_master.List_price AS Amonut,  material_master.Tax AS `Tax %`,  (lead_bom.Quantity*material_master.List_price)*(material_master.Tax/100)+(lead_bom.Quantity*material_master.List_price) AS `Ext. Amount`,  material_master.Specification";
$tdataQuote[".sqlFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$tdataQuote[".sqlWhereExpr"] = "";
$tdataQuote[".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;
$tdataQuote[".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;
$tdataQuote[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "LBOMID";
	$tdataQuote[".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["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				
		
				
		
		
		
			$tdataQuote["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
	
				
		
				
		
		
		
			$tdataQuote["Lead_ID"]=$fdata;
//	Material Code
	$fdata = array();
	$fdata["strName"] = "Material Code";
	$fdata["ownerTable"] = "lead_bom";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Material_Code";
	
		$fdata["FullName"]= "lead_bom.`Material Code`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=11";
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["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"]= 4;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["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"]= 5;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["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"]= 6;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["Amonut"]=$fdata;
//	Tax %
	$fdata = array();
	$fdata["strName"] = "Tax %";
	$fdata["ownerTable"] = "material_master";
		
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Tax__";
	
		$fdata["FullName"]= "material_master.Tax";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["Tax %"]=$fdata;
//	Ext. Amount
	$fdata = array();
	$fdata["strName"] = "Ext. Amount";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 5;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "Number";
	
		
		
		
		$fdata["DecimalDigits"] = 2;
	
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Ext__Amount";
	
		$fdata["FullName"]= "(lead_bom.Quantity*material_master.List_price)*(material_master.Tax/100)+(lead_bom.Quantity*material_master.List_price)";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["Ext. Amount"]=$fdata;
//	Specification
	$fdata = array();
	$fdata["strName"] = "Specification";
	$fdata["ownerTable"] = "material_master";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "HTML";
	
		
		
		
		
		
	$fdata["GoodName"]= "Specification";
	
		$fdata["FullName"]= "material_master.Specification";
	
		
		
		
		
		
				$fdata["Index"]= 9;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataQuote["Specification"]=$fdata;

	
$tables_data["Quote"]=&$tdataQuote;
$field_labels["Quote"] = &$fieldLabelsQuote;
$fieldToolTips["Quote"] = &$fieldToolTipsQuote;

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

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

$mIndex = 1-1;
			$strOriginalDetailsTable="lead_table";
	$masterTablesData["Quote"][$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["Quote"][$mIndex]["masterKeys"][]="Leadid";
		$masterTablesData["Quote"][$mIndex]["detailKeys"][]="Lead_ID";

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

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










$proto356=array();
$proto356["m_strHead"] = "SELECT";
$proto356["m_strFieldList"] = "lead_bom.LBOMID,  lead_bom.Lead_ID,  lead_bom.`Material Code`,  lead_bom.Quantity,  material_master.List_Price AS Unit_Price,  lead_bom.Quantity*material_master.List_price AS Amonut,  material_master.Tax AS `Tax %`,  (lead_bom.Quantity*material_master.List_price)*(material_master.Tax/100)+(lead_bom.Quantity*material_master.List_price) AS `Ext. Amount`,  material_master.Specification";
$proto356["m_strFrom"] = "FROM lead_bom  INNER JOIN material_master ON lead_bom.`Material Code` = material_master.`Material Code`";
$proto356["m_strWhere"] = "";
$proto356["m_strOrderBy"] = "";
$proto356["m_strTail"] = "";
$proto357=array();
$proto357["m_sql"] = "";
$proto357["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto356["m_fieldlist"][]=$obj;
						$proto373=array();
			$obj = new SQLField(array(
	"m_strName" => "Tax",
	"m_strTable" => "material_master"
));

$proto373["m_expr"]=$obj;
$proto373["m_alias"] = "Tax %";
$obj = new SQLFieldListItem($proto373);

$proto356["m_fieldlist"][]=$obj;
						$proto375=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(lead_bom.Quantity*material_master.List_price)*(material_master.Tax/100)+(lead_bom.Quantity*material_master.List_price)"
));

$proto375["m_expr"]=$obj;
$proto375["m_alias"] = "Ext. Amount";
$obj = new SQLFieldListItem($proto375);

$proto356["m_fieldlist"][]=$obj;
						$proto377=array();
			$obj = new SQLField(array(
	"m_strName" => "Specification",
	"m_strTable" => "material_master"
));

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

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

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

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

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

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

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

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

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

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

$queryData_Quote = $obj;
$tdataQuote[".sqlquery"] = $queryData_Quote;

$tableEvents["Quote"] = new eventsBase;

?>
