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


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


	
	$tdataSPC__Quote[".NCSearch"]=true;

	

$tdataSPC__Quote[".shortTableName"] = "SPC__Quote";
$tdataSPC__Quote[".nSecOptions"] = 0;
$tdataSPC__Quote[".recsPerRowList"] = 1;	
$tdataSPC__Quote[".tableGroupBy"] = "0";
$tdataSPC__Quote[".mainTableOwnerID"] = "";
$tdataSPC__Quote[".moveNext"] = 1;




$tdataSPC__Quote[".showAddInPopup"] = false;

$tdataSPC__Quote[".showEditInPopup"] = false;

$tdataSPC__Quote[".showViewInPopup"] = false;


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

$tdataSPC__Quote[".listAjax"] = false;

	$tdataSPC__Quote[".audit"] = false;

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

$tdataSPC__Quote[".exportTo"] = true;

$tdataSPC__Quote[".printFriendly"] = true;


$tdataSPC__Quote[".showSimpleSearchOptions"] = false;

$tdataSPC__Quote[".showSearchPanel"] = true;


$tdataSPC__Quote[".isUseAjaxSuggest"] = true;

$tdataSPC__Quote[".rowHighlite"] = true;


// button handlers file names

$tdataSPC__Quote[".addPageEvents"] = false;

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

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

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

$tdataSPC__Quote[".isUseiBox"] = false;




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

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

$tdataSPC__Quote[".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__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "LBOMID";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Lead_ID";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Material Code";	
}
$tdataSPC__Quote[".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", $tdataSPC__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Specification";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Quantity";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Unit_Price";	
}
$tdataSPC__Quote[".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", $tdataSPC__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Amonut";	
}
$tdataSPC__Quote[".globSearchFields"][] = "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 %", $tdataSPC__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Tax %";	
}
$tdataSPC__Quote[".globSearchFields"][] = "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", $tdataSPC__Quote[".allSearchFields"]))
{
	$tdataSPC__Quote[".allSearchFields"][] = "Ext. Amount";	
}


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



$tdataSPC__Quote[".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__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "LBOMID";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Lead_ID";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Material Code";	
}
$tdataSPC__Quote[".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", $tdataSPC__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Specification";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Quantity";	
}
$tdataSPC__Quote[".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__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Unit_Price";	
}
$tdataSPC__Quote[".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", $tdataSPC__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Amonut";	
}
$tdataSPC__Quote[".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 %", $tdataSPC__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Tax %";	
}
$tdataSPC__Quote[".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", $tdataSPC__Quote[".allSearchFields"])) 
{
	$tdataSPC__Quote[".allSearchFields"][] = "Ext. Amount";	
}

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


	

$tdataSPC__Quote[".isDisplayLoading"] = true;

$tdataSPC__Quote[".isResizeColumns"] = false;




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

$tdataSPC__Quote[".pageSize"] = 20;

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

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

	$tableKeys = array();
	$tableKeys[] = "LBOMID";
	$tdataSPC__Quote[".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["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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["bAdvancedSearch"]=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;
	
		
				
		
		
		
			$tdataSPC__Quote["Quantity"]=$fdata;
//	Unit_Price
	$fdata = array();
	$fdata["strName"] = "Unit_Price";
	$fdata["ownerTable"] = "lead_bom";
		$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"]= "lead_bom.Special_Price";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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*lead_bom.Special_Price";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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*lead_bom.Special_Price)*(material_master.Tax/100)+(lead_bom.Quantity*lead_bom.Special_Price)";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataSPC__Quote["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"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$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;
	
		
				
		
		
		
			$tdataSPC__Quote["Specification"]=$fdata;

	
$tables_data["SPC__Quote"]=&$tdataSPC__Quote;
$field_labels["SPC__Quote"] = &$fieldLabelsSPC__Quote;
$fieldToolTips["SPC__Quote"] = &$fieldToolTipsSPC__Quote;

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

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

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

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

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










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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$queryData_SPC__Quote = $obj;
$tdataSPC__Quote[".sqlquery"] = $queryData_SPC__Quote;

$tableEvents["SPC__Quote"] = new eventsBase;

?>
