<?php
$tdatamaterial_category=array();
	$tdatamaterial_category[".NumberOfChars"]=80; 
	$tdatamaterial_category[".ShortName"]="material_category";
	$tdatamaterial_category[".OwnerID"]="";
	$tdatamaterial_category[".OriginalTable"]="material category";


	
//	field labels
$fieldLabelsmaterial_category = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsmaterial_category["English"]=array();
	$fieldToolTipsmaterial_category["English"]=array();
	$fieldLabelsmaterial_category["English"]["Material_Category"] = "Material Category";
	$fieldToolTipsmaterial_category["English"]["Material Category"] = "";
	$fieldLabelsmaterial_category["English"]["Description"] = "Description";
	$fieldToolTipsmaterial_category["English"]["Description"] = "";
	if (count($fieldToolTipsmaterial_category["English"])){
		$tdatamaterial_category[".isUseToolTips"]=true;
	}
}


	
	$tdatamaterial_category[".NCSearch"]=true;

	

$tdatamaterial_category[".shortTableName"] = "material_category";
$tdatamaterial_category[".nSecOptions"] = 0;
$tdatamaterial_category[".recsPerRowList"] = 1;	
$tdatamaterial_category[".tableGroupBy"] = "0";
$tdatamaterial_category[".mainTableOwnerID"] = "";
$tdatamaterial_category[".moveNext"] = 1;




$tdatamaterial_category[".showAddInPopup"] = false;

$tdatamaterial_category[".showEditInPopup"] = false;

$tdatamaterial_category[".showViewInPopup"] = false;


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

$tdatamaterial_category[".listAjax"] = false;

	$tdatamaterial_category[".audit"] = false;

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

$tdatamaterial_category[".exportTo"] = true;



$tdatamaterial_category[".showSimpleSearchOptions"] = false;

$tdatamaterial_category[".showSearchPanel"] = true;


$tdatamaterial_category[".isUseAjaxSuggest"] = true;

$tdatamaterial_category[".rowHighlite"] = true;


// button handlers file names

$tdatamaterial_category[".addPageEvents"] = false;

$tdatamaterial_category[".arrKeyFields"][] = "Material Category";

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

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

$tdatamaterial_category[".isUseiBox"] = false;



$tdatamaterial_category[".isUseInlineAdd"] = true;

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

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

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


$tdatamaterial_category[".googleLikeFields"][] = "Material Category";
$tdatamaterial_category[".googleLikeFields"][] = "Description";



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

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


	

$tdatamaterial_category[".isDisplayLoading"] = true;

$tdatamaterial_category[".isResizeColumns"] = false;

	$tdatamaterial_category[".subQueriesSupAccess"] = true;




$tdatamaterial_category[".pageSize"] = 20;

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

$tdatamaterial_category[".sqlHead"] = "SELECT `Material Category`,  Description";
$tdatamaterial_category[".sqlFrom"] = "FROM `material category`";
$tdatamaterial_category[".sqlWhereExpr"] = "";
$tdatamaterial_category[".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;
$tdatamaterial_category[".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;
$tdatamaterial_category[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "Material Category";
	$tdatamaterial_category[".Keys"] = $tableKeys;

//	Material Category
	$fdata = array();
	$fdata["strName"] = "Material Category";
	$fdata["ownerTable"] = "material category";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Material_Category";
	
		$fdata["FullName"]= "`Material Category`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=25";
		
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatamaterial_category["Material Category"]=$fdata;
//	Description
	$fdata = array();
	$fdata["strName"] = "Description";
	$fdata["ownerTable"] = "material category";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Description";
	
		$fdata["FullName"]= "Description";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		
		$fdata["bAdvancedSearch"]=true; 
	
		
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatamaterial_category["Description"]=$fdata;

	
$tables_data["material category"]=&$tdatamaterial_category;
$field_labels["material_category"] = &$fieldLabelsmaterial_category;
$fieldToolTips["material category"] = &$fieldToolTipsmaterial_category;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["material category"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="material_master";
	$detailsTablesData["material category"][$dIndex] = array(
		  "dDataSourceTable"=>"Materials_Master"
		, "dOriginalTable"=>$strOriginalDetailsTable
		, "dShortTable"=>"Materials_Master"
		, "masterKeys"=>array()
		, "detailKeys"=>array()
		, "dispChildCount"=> "1"
		, "hideChild"=>"0"
		, "sqlHead"=>"SELECT `Material Code`,   `Material Description`,   `Material Category`,   Specification,   Status,   List_Price,   MDP,   Tax,   `Last Updated on`,   `Last Updated by`"	
		, "sqlFrom"=>"FROM material_master"	
		, "sqlWhere"=>""
		, "sqlTail"=>""
		, "groupBy"=>"0"
		, "previewOnList" => 0
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 0
	);	
		$detailsTablesData["material category"][$dIndex]["masterKeys"][]="Material Category";
		$detailsTablesData["material category"][$dIndex]["detailKeys"][]="Material Category";


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

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

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










$proto387=array();
$proto387["m_strHead"] = "SELECT";
$proto387["m_strFieldList"] = "`Material Category`,  Description";
$proto387["m_strFrom"] = "FROM `material category`";
$proto387["m_strWhere"] = "";
$proto387["m_strOrderBy"] = "";
$proto387["m_strTail"] = "";
$proto388=array();
$proto388["m_sql"] = "";
$proto388["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto387["m_having"] = $obj;
$proto387["m_fieldlist"] = array();
						$proto392=array();
			$obj = new SQLField(array(
	"m_strName" => "Material Category",
	"m_strTable" => "material category"
));

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

$proto387["m_fieldlist"][]=$obj;
						$proto394=array();
			$obj = new SQLField(array(
	"m_strName" => "Description",
	"m_strTable" => "material category"
));

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

$proto387["m_fieldlist"][]=$obj;
$proto387["m_fromlist"] = array();
												$proto396=array();
$proto396["m_link"] = "SQLL_MAIN";
			$proto397=array();
$proto397["m_strName"] = "material category";
$proto397["m_columns"] = array();
$proto397["m_columns"][] = "Material Category";
$proto397["m_columns"][] = "Description";
$obj = new SQLTable($proto397);

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

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

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

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

$queryData_material_category = $obj;
$tdatamaterial_category[".sqlquery"] = $queryData_material_category;

$tableEvents["material category"] = new eventsBase;

?>
