<?php



$tdatatb_materiais = array();
$tdatatb_materiais[".searchableFields"] = array();
$tdatatb_materiais[".ShortName"] = "tb_materiais";
$tdatatb_materiais[".OwnerID"] = "";
$tdatatb_materiais[".OriginalTable"] = "tb_materiais";


$tdatatb_materiais[".pagesByType"] = my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"list\":[\"list\"],\"masterlist\":[\"masterlist\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" );
$tdatatb_materiais[".originalPagesByType"] = $tdatatb_materiais[".pagesByType"];
$tdatatb_materiais[".pages"] = types2pages( my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"list\":[\"list\"],\"masterlist\":[\"masterlist\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" ) );
$tdatatb_materiais[".originalPages"] = $tdatatb_materiais[".pages"];
$tdatatb_materiais[".defaultPages"] = my_json_decode( "{\"add\":\"add\",\"edit\":\"edit\",\"list\":\"list\",\"masterlist\":\"masterlist\",\"print\":\"print\",\"search\":\"search\",\"view\":\"view\"}" );
$tdatatb_materiais[".originalDefaultPages"] = $tdatatb_materiais[".defaultPages"];

//	field labels
$fieldLabelstb_materiais = array();
$fieldToolTipstb_materiais = array();
$pageTitlestb_materiais = array();
$placeHolderstb_materiais = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelstb_materiais["Portuguese(Brazil)"] = array();
	$fieldToolTipstb_materiais["Portuguese(Brazil)"] = array();
	$placeHolderstb_materiais["Portuguese(Brazil)"] = array();
	$pageTitlestb_materiais["Portuguese(Brazil)"] = array();
	$fieldLabelstb_materiais["Portuguese(Brazil)"]["materialID"] = "Material ID";
	$fieldToolTipstb_materiais["Portuguese(Brazil)"]["materialID"] = "";
	$placeHolderstb_materiais["Portuguese(Brazil)"]["materialID"] = "";
	$fieldLabelstb_materiais["Portuguese(Brazil)"]["material"] = "Material";
	$fieldToolTipstb_materiais["Portuguese(Brazil)"]["material"] = "";
	$placeHolderstb_materiais["Portuguese(Brazil)"]["material"] = "";
	$fieldLabelstb_materiais["Portuguese(Brazil)"]["fornecedor"] = "Fornecedor";
	$fieldToolTipstb_materiais["Portuguese(Brazil)"]["fornecedor"] = "";
	$placeHolderstb_materiais["Portuguese(Brazil)"]["fornecedor"] = "";
	$fieldLabelstb_materiais["Portuguese(Brazil)"]["metrica"] = "Metrica";
	$fieldToolTipstb_materiais["Portuguese(Brazil)"]["metrica"] = "";
	$placeHolderstb_materiais["Portuguese(Brazil)"]["metrica"] = "";
	$fieldLabelstb_materiais["Portuguese(Brazil)"]["ativar"] = "Ativar";
	$fieldToolTipstb_materiais["Portuguese(Brazil)"]["ativar"] = "";
	$placeHolderstb_materiais["Portuguese(Brazil)"]["ativar"] = "";
	if (count($fieldToolTipstb_materiais["Portuguese(Brazil)"]))
		$tdatatb_materiais[".isUseToolTips"] = true;
}


	$tdatatb_materiais[".NCSearch"] = true;


	$tdatatb_materiais[".scrollGridBody"] = true;

$tdatatb_materiais[".shortTableName"] = "tb_materiais";
$tdatatb_materiais[".nSecOptions"] = 0;

$tdatatb_materiais[".mainTableOwnerID"] = "";
$tdatatb_materiais[".entityType"] = 0;

$tdatatb_materiais[".strOriginalTableName"] = "tb_materiais";

	



$tdatatb_materiais[".showAddInPopup"] = false;

$tdatatb_materiais[".showEditInPopup"] = false;

$tdatatb_materiais[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdatatb_materiais[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


$tdatatb_materiais[".listAjax"] = false;
//	temporary
$tdatatb_materiais[".listAjax"] = false;

	$tdatatb_materiais[".audit"] = false;

	$tdatatb_materiais[".locking"] = false;


$pages = $tdatatb_materiais[".defaultPages"];

if( $pages[PAGE_EDIT] ) {
	$tdatatb_materiais[".edit"] = true;
	$tdatatb_materiais[".afterEditAction"] = 0;
	$tdatatb_materiais[".closePopupAfterEdit"] = 1;
	$tdatatb_materiais[".afterEditActionDetTable"] = "Detail tables not found!";
}

if( $pages[PAGE_ADD] ) {
$tdatatb_materiais[".add"] = true;
$tdatatb_materiais[".afterAddAction"] = 0;
$tdatatb_materiais[".closePopupAfterAdd"] = 1;
$tdatatb_materiais[".afterAddActionDetTable"] = "Detail tables not found!";
}

if( $pages[PAGE_LIST] ) {
	$tdatatb_materiais[".list"] = true;
}



$tdatatb_materiais[".strSortControlSettingsJSON"] = "";




if( $pages[PAGE_VIEW] ) {
$tdatatb_materiais[".view"] = true;
}

if( $pages[PAGE_IMPORT] ) {
$tdatatb_materiais[".import"] = true;
}

if( $pages[PAGE_EXPORT] ) {
$tdatatb_materiais[".exportTo"] = true;
}

if( $pages[PAGE_PRINT] ) {
$tdatatb_materiais[".printFriendly"] = true;
}



$tdatatb_materiais[".showSimpleSearchOptions"] = true; // temp fix #13449

// Allow Show/Hide Fields in GRID
$tdatatb_materiais[".allowShowHideFields"] = true; // temp fix #13449
//

// Allow Fields Reordering in GRID
$tdatatb_materiais[".allowFieldsReordering"] = true; // temp fix #13449
//

$tdatatb_materiais[".isUseAjaxSuggest"] = true;

$tdatatb_materiais[".rowHighlite"] = true;





$tdatatb_materiais[".ajaxCodeSnippetAdded"] = false;

$tdatatb_materiais[".buttonsAdded"] = false;

$tdatatb_materiais[".addPageEvents"] = false;

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


$tdatatb_materiais[".badgeColor"] = "BC8F8F";


$tdatatb_materiais[".allSearchFields"] = array();
$tdatatb_materiais[".filterFields"] = array();
$tdatatb_materiais[".requiredSearchFields"] = array();

$tdatatb_materiais[".googleLikeFields"] = array();
$tdatatb_materiais[".googleLikeFields"][] = "materialID";
$tdatatb_materiais[".googleLikeFields"][] = "material";
$tdatatb_materiais[".googleLikeFields"][] = "fornecedor";
$tdatatb_materiais[".googleLikeFields"][] = "metrica";
$tdatatb_materiais[".googleLikeFields"][] = "ativar";



$tdatatb_materiais[".tableType"] = "list";

$tdatatb_materiais[".printerPageOrientation"] = 0;
$tdatatb_materiais[".nPrinterPageScale"] = 100;

$tdatatb_materiais[".nPrinterSplitRecords"] = 40;

$tdatatb_materiais[".geocodingEnabled"] = false;










$tdatatb_materiais[".pageSize"] = 20;

$tdatatb_materiais[".warnLeavingPages"] = true;



$tstrOrderBy = "";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatatb_materiais[".strOrderBy"] = $tstrOrderBy;

$tdatatb_materiais[".orderindexes"] = array();

$tdatatb_materiais[".sqlHead"] = "SELECT materialID,  	material,  	fornecedor,  	metrica,  	ativar";
$tdatatb_materiais[".sqlFrom"] = "FROM tb_materiais";
$tdatatb_materiais[".sqlWhereExpr"] = "";
$tdatatb_materiais[".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;
$tdatatb_materiais[".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;
$tdatatb_materiais[".arrGroupsPerPage"] = $arrGPP;

$tdatatb_materiais[".highlightSearchResults"] = true;

$tableKeystb_materiais = array();
$tableKeystb_materiais[] = "materialID";
$tdatatb_materiais[".Keys"] = $tableKeystb_materiais;


$tdatatb_materiais[".hideMobileList"] = array();




//	materialID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "materialID";
	$fdata["GoodName"] = "materialID";
	$fdata["ownerTable"] = "tb_materiais";
	$fdata["Label"] = GetFieldLabel("tb_materiais","materialID");
	$fdata["FieldType"] = 3;

	
	
	
			

		$fdata["strField"] = "materialID";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "materialID";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_materiais["materialID"] = $fdata;
		$tdatatb_materiais[".searchableFields"][] = "materialID";
//	material
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "material";
	$fdata["GoodName"] = "material";
	$fdata["ownerTable"] = "tb_materiais";
	$fdata["Label"] = GetFieldLabel("tb_materiais","material");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "material";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "material";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=50";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_materiais["material"] = $fdata;
		$tdatatb_materiais[".searchableFields"][] = "material";
//	fornecedor
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "fornecedor";
	$fdata["GoodName"] = "fornecedor";
	$fdata["ownerTable"] = "tb_materiais";
	$fdata["Label"] = GetFieldLabel("tb_materiais","fornecedor");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "fornecedor";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "fornecedor";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Lookup wizard");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "tb_fornecedores";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "fornecID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "fornecedor";

	

	
	$edata["LookupOrderBy"] = "fornecedor";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Equals";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_materiais["fornecedor"] = $fdata;
		$tdatatb_materiais[".searchableFields"][] = "fornecedor";
//	metrica
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "metrica";
	$fdata["GoodName"] = "metrica";
	$fdata["ownerTable"] = "tb_materiais";
	$fdata["Label"] = GetFieldLabel("tb_materiais","metrica");
	$fdata["FieldType"] = 200;

	
	
	
			

		$fdata["strField"] = "metrica";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "metrica";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Lookup wizard");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "tb_metricas";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "metricaID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "metrica";

	

	
	$edata["LookupOrderBy"] = "metrica";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Equals";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_materiais["metrica"] = $fdata;
		$tdatatb_materiais[".searchableFields"][] = "metrica";
//	ativar
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "ativar";
	$fdata["GoodName"] = "ativar";
	$fdata["ownerTable"] = "tb_materiais";
	$fdata["Label"] = GetFieldLabel("tb_materiais","ativar");
	$fdata["FieldType"] = 3;

	
	
	
			

		$fdata["strField"] = "ativar";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "ativar";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Checkbox");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Checkbox");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Equals";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatatb_materiais["ativar"] = $fdata;
		$tdatatb_materiais[".searchableFields"][] = "ativar";


$tables_data["tb_materiais"]=&$tdatatb_materiais;
$field_labels["tb_materiais"] = &$fieldLabelstb_materiais;
$fieldToolTips["tb_materiais"] = &$fieldToolTipstb_materiais;
$placeHolders["tb_materiais"] = &$placeHolderstb_materiais;
$page_titles["tb_materiais"] = &$pageTitlestb_materiais;

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

		$dIndex = 0;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="tb_cotacao_material";
		$detailsParam["dOriginalTable"] = "tb_cotacao_material";



				$detailsParam["dType"]=PAGE_LIST;
	$detailsParam["dShortTable"] = "tb_cotacao_material";
	$detailsParam["dCaptionTable"] = GetTableCaption("tb_cotacao_material");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


		
	$detailsTablesData["tb_materiais"][$dIndex] = $detailsParam;

	
		$detailsTablesData["tb_materiais"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["tb_materiais"][$dIndex]["masterKeys"][]="materialID";

				$detailsTablesData["tb_materiais"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["tb_materiais"][$dIndex]["detailKeys"][]="materialID";

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



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


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










function createSqlQuery_tb_materiais()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "materialID,  	material,  	fornecedor,  	metrica,  	ativar";
$proto0["m_strFrom"] = "FROM tb_materiais";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "materialID",
	"m_strTable" => "tb_materiais",
	"m_srcTableName" => "tb_materiais"
));

$proto6["m_sql"] = "materialID";
$proto6["m_srcTableName"] = "tb_materiais";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "material",
	"m_strTable" => "tb_materiais",
	"m_srcTableName" => "tb_materiais"
));

$proto8["m_sql"] = "material";
$proto8["m_srcTableName"] = "tb_materiais";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "fornecedor",
	"m_strTable" => "tb_materiais",
	"m_srcTableName" => "tb_materiais"
));

$proto10["m_sql"] = "fornecedor";
$proto10["m_srcTableName"] = "tb_materiais";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "metrica",
	"m_strTable" => "tb_materiais",
	"m_srcTableName" => "tb_materiais"
));

$proto12["m_sql"] = "metrica";
$proto12["m_srcTableName"] = "tb_materiais";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "ativar",
	"m_strTable" => "tb_materiais",
	"m_srcTableName" => "tb_materiais"
));

$proto14["m_sql"] = "ativar";
$proto14["m_srcTableName"] = "tb_materiais";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto16=array();
$proto16["m_link"] = "SQLL_MAIN";
			$proto17=array();
$proto17["m_strName"] = "tb_materiais";
$proto17["m_srcTableName"] = "tb_materiais";
$proto17["m_columns"] = array();
$proto17["m_columns"][] = "materialID";
$proto17["m_columns"][] = "material";
$proto17["m_columns"][] = "fornecedor";
$proto17["m_columns"][] = "metrica";
$proto17["m_columns"][] = "ativar";
$obj = new SQLTable($proto17);

$proto16["m_table"] = $obj;
$proto16["m_sql"] = "tb_materiais";
$proto16["m_alias"] = "";
$proto16["m_srcTableName"] = "tb_materiais";
$proto18=array();
$proto18["m_sql"] = "";
$proto18["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$proto0["m_srcTableName"]="tb_materiais";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_tb_materiais = createSqlQuery_tb_materiais();


	
		;

					

$tdatatb_materiais[".sqlquery"] = $queryData_tb_materiais;

$tableEvents["tb_materiais"] = new eventsBase;
$tdatatb_materiais[".hasEvents"] = false;

?>