<?php



$tdatatb_dist_cotas = array();
$tdatatb_dist_cotas[".searchableFields"] = array();
$tdatatb_dist_cotas[".ShortName"] = "tb_dist_cotas";
$tdatatb_dist_cotas[".OwnerID"] = "";
$tdatatb_dist_cotas[".OriginalTable"] = "tb_dist_cotas";


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

//	field labels
$fieldLabelstb_dist_cotas = array();
$fieldToolTipstb_dist_cotas = array();
$pageTitlestb_dist_cotas = array();
$placeHolderstb_dist_cotas = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelstb_dist_cotas["Portuguese(Brazil)"] = array();
	$fieldToolTipstb_dist_cotas["Portuguese(Brazil)"] = array();
	$placeHolderstb_dist_cotas["Portuguese(Brazil)"] = array();
	$pageTitlestb_dist_cotas["Portuguese(Brazil)"] = array();
	$fieldLabelstb_dist_cotas["Portuguese(Brazil)"]["distcotaID"] = "Distcota ID";
	$fieldToolTipstb_dist_cotas["Portuguese(Brazil)"]["distcotaID"] = "";
	$placeHolderstb_dist_cotas["Portuguese(Brazil)"]["distcotaID"] = "";
	$fieldLabelstb_dist_cotas["Portuguese(Brazil)"]["cotista"] = "Cotista";
	$fieldToolTipstb_dist_cotas["Portuguese(Brazil)"]["cotista"] = "";
	$placeHolderstb_dist_cotas["Portuguese(Brazil)"]["cotista"] = "";
	$fieldLabelstb_dist_cotas["Portuguese(Brazil)"]["percentual"] = "Percentual";
	$fieldToolTipstb_dist_cotas["Portuguese(Brazil)"]["percentual"] = "";
	$placeHolderstb_dist_cotas["Portuguese(Brazil)"]["percentual"] = "";
	$fieldLabelstb_dist_cotas["Portuguese(Brazil)"]["cota"] = "Cota";
	$fieldToolTipstb_dist_cotas["Portuguese(Brazil)"]["cota"] = "";
	$placeHolderstb_dist_cotas["Portuguese(Brazil)"]["cota"] = "";
	$fieldLabelstb_dist_cotas["Portuguese(Brazil)"]["ativar"] = "Ativar";
	$fieldToolTipstb_dist_cotas["Portuguese(Brazil)"]["ativar"] = "";
	$placeHolderstb_dist_cotas["Portuguese(Brazil)"]["ativar"] = "";
	if (count($fieldToolTipstb_dist_cotas["Portuguese(Brazil)"]))
		$tdatatb_dist_cotas[".isUseToolTips"] = true;
}


	$tdatatb_dist_cotas[".NCSearch"] = true;


	$tdatatb_dist_cotas[".scrollGridBody"] = true;

$tdatatb_dist_cotas[".shortTableName"] = "tb_dist_cotas";
$tdatatb_dist_cotas[".nSecOptions"] = 0;

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

$tdatatb_dist_cotas[".strOriginalTableName"] = "tb_dist_cotas";

	



$tdatatb_dist_cotas[".showAddInPopup"] = false;

$tdatatb_dist_cotas[".showEditInPopup"] = false;

$tdatatb_dist_cotas[".showViewInPopup"] = false;

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


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

	$tdatatb_dist_cotas[".audit"] = false;

	$tdatatb_dist_cotas[".locking"] = false;


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

if( $pages[PAGE_EDIT] ) {
	$tdatatb_dist_cotas[".edit"] = true;
	$tdatatb_dist_cotas[".afterEditAction"] = 1;
	$tdatatb_dist_cotas[".closePopupAfterEdit"] = 1;
	$tdatatb_dist_cotas[".afterEditActionDetTable"] = "";
}

if( $pages[PAGE_ADD] ) {
$tdatatb_dist_cotas[".add"] = true;
$tdatatb_dist_cotas[".afterAddAction"] = 1;
$tdatatb_dist_cotas[".closePopupAfterAdd"] = 1;
$tdatatb_dist_cotas[".afterAddActionDetTable"] = "";
}

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



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




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

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

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

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



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

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

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

$tdatatb_dist_cotas[".isUseAjaxSuggest"] = true;

$tdatatb_dist_cotas[".rowHighlite"] = true;





$tdatatb_dist_cotas[".ajaxCodeSnippetAdded"] = false;

$tdatatb_dist_cotas[".buttonsAdded"] = false;

$tdatatb_dist_cotas[".addPageEvents"] = false;

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


$tdatatb_dist_cotas[".badgeColor"] = "DC143C";


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

$tdatatb_dist_cotas[".googleLikeFields"] = array();
$tdatatb_dist_cotas[".googleLikeFields"][] = "distcotaID";
$tdatatb_dist_cotas[".googleLikeFields"][] = "cotista";
$tdatatb_dist_cotas[".googleLikeFields"][] = "percentual";
$tdatatb_dist_cotas[".googleLikeFields"][] = "cota";
$tdatatb_dist_cotas[".googleLikeFields"][] = "ativar";



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

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

$tdatatb_dist_cotas[".nPrinterSplitRecords"] = 40;

$tdatatb_dist_cotas[".geocodingEnabled"] = false;










$tdatatb_dist_cotas[".pageSize"] = 20;

$tdatatb_dist_cotas[".warnLeavingPages"] = true;



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

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

$tdatatb_dist_cotas[".sqlHead"] = "SELECT distcotaID,  	cotista,  	percentual,  	cota,  	ativar";
$tdatatb_dist_cotas[".sqlFrom"] = "FROM tb_dist_cotas";
$tdatatb_dist_cotas[".sqlWhereExpr"] = "";
$tdatatb_dist_cotas[".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_dist_cotas[".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_dist_cotas[".arrGroupsPerPage"] = $arrGPP;

$tdatatb_dist_cotas[".highlightSearchResults"] = true;

$tableKeystb_dist_cotas = array();
$tableKeystb_dist_cotas[] = "distcotaID";
$tdatatb_dist_cotas[".Keys"] = $tableKeystb_dist_cotas;


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




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

	
	
	
			

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

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

	
	
				$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_dist_cotas["distcotaID"] = $fdata;
		$tdatatb_dist_cotas[".searchableFields"][] = "distcotaID";
//	cotista
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "cotista";
	$fdata["GoodName"] = "cotista";
	$fdata["ownerTable"] = "tb_dist_cotas";
	$fdata["Label"] = GetFieldLabel("tb_dist_cotas","cotista");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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_dist_cotas["cotista"] = $fdata;
		$tdatatb_dist_cotas[".searchableFields"][] = "cotista";
//	percentual
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "percentual";
	$fdata["GoodName"] = "percentual";
	$fdata["ownerTable"] = "tb_dist_cotas";
	$fdata["Label"] = GetFieldLabel("tb_dist_cotas","percentual");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
		$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["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
	//	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_dist_cotas["percentual"] = $fdata;
		$tdatatb_dist_cotas[".searchableFields"][] = "percentual";
//	cota
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "cota";
	$fdata["GoodName"] = "cota";
	$fdata["ownerTable"] = "tb_dist_cotas";
	$fdata["Label"] = GetFieldLabel("tb_dist_cotas","cota");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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_dist_cotas["cota"] = $fdata;
		$tdatatb_dist_cotas[".searchableFields"][] = "cota";
//	ativar
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "ativar";
	$fdata["GoodName"] = "ativar";
	$fdata["ownerTable"] = "tb_dist_cotas";
	$fdata["Label"] = GetFieldLabel("tb_dist_cotas","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" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$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["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
	//	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_dist_cotas["ativar"] = $fdata;
		$tdatatb_dist_cotas[".searchableFields"][] = "ativar";


$tables_data["tb_dist_cotas"]=&$tdatatb_dist_cotas;
$field_labels["tb_dist_cotas"] = &$fieldLabelstb_dist_cotas;
$fieldToolTips["tb_dist_cotas"] = &$fieldToolTipstb_dist_cotas;
$placeHolders["tb_dist_cotas"] = &$placeHolderstb_dist_cotas;
$page_titles["tb_dist_cotas"] = &$pageTitlestb_dist_cotas;

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

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



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


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










function createSqlQuery_tb_dist_cotas()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "distcotaID,  	cotista,  	percentual,  	cota,  	ativar";
$proto0["m_strFrom"] = "FROM tb_dist_cotas";
$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" => "distcotaID",
	"m_strTable" => "tb_dist_cotas",
	"m_srcTableName" => "tb_dist_cotas"
));

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

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

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

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

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

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

$proto12["m_sql"] = "cota";
$proto12["m_srcTableName"] = "tb_dist_cotas";
$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_dist_cotas",
	"m_srcTableName" => "tb_dist_cotas"
));

$proto14["m_sql"] = "ativar";
$proto14["m_srcTableName"] = "tb_dist_cotas";
$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_dist_cotas";
$proto17["m_srcTableName"] = "tb_dist_cotas";
$proto17["m_columns"] = array();
$proto17["m_columns"][] = "distcotaID";
$proto17["m_columns"][] = "cotista";
$proto17["m_columns"][] = "percentual";
$proto17["m_columns"][] = "cota";
$proto17["m_columns"][] = "ativar";
$obj = new SQLTable($proto17);

$proto16["m_table"] = $obj;
$proto16["m_sql"] = "tb_dist_cotas";
$proto16["m_alias"] = "";
$proto16["m_srcTableName"] = "tb_dist_cotas";
$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_dist_cotas";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_tb_dist_cotas = createSqlQuery_tb_dist_cotas();


	
		;

					

$tdatatb_dist_cotas[".sqlquery"] = $queryData_tb_dist_cotas;

$tableEvents["tb_dist_cotas"] = new eventsBase;
$tdatatb_dist_cotas[".hasEvents"] = false;

?>