<?php



$tdatatb_receitas = array();
$tdatatb_receitas[".searchableFields"] = array();
$tdatatb_receitas[".ShortName"] = "tb_receitas";
$tdatatb_receitas[".OwnerID"] = "";
$tdatatb_receitas[".OriginalTable"] = "tb_receitas";


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

//	field labels
$fieldLabelstb_receitas = array();
$fieldToolTipstb_receitas = array();
$pageTitlestb_receitas = array();
$placeHolderstb_receitas = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelstb_receitas["English"] = array();
	$fieldToolTipstb_receitas["English"] = array();
	$placeHolderstb_receitas["English"] = array();
	$pageTitlestb_receitas["English"] = array();
	$fieldLabelstb_receitas["English"]["receitaID"] = "ID";
	$fieldToolTipstb_receitas["English"]["receitaID"] = "";
	$placeHolderstb_receitas["English"]["receitaID"] = "";
	$fieldLabelstb_receitas["English"]["consulta_ID"] = "Consulta ID";
	$fieldToolTipstb_receitas["English"]["consulta_ID"] = "";
	$placeHolderstb_receitas["English"]["consulta_ID"] = "";
	$fieldLabelstb_receitas["English"]["Tipo"] = "Tipo";
	$fieldToolTipstb_receitas["English"]["Tipo"] = "";
	$placeHolderstb_receitas["English"]["Tipo"] = "";
	$fieldLabelstb_receitas["English"]["validade"] = "Validade";
	$fieldToolTipstb_receitas["English"]["validade"] = "";
	$placeHolderstb_receitas["English"]["validade"] = "";
	$fieldLabelstb_receitas["English"]["copia_pdf"] = "Copia Pdf";
	$fieldToolTipstb_receitas["English"]["copia_pdf"] = "";
	$placeHolderstb_receitas["English"]["copia_pdf"] = "";
	$fieldLabelstb_receitas["English"]["data"] = "Data";
	$fieldToolTipstb_receitas["English"]["data"] = "";
	$placeHolderstb_receitas["English"]["data"] = "";
	$pageTitlestb_receitas["English"]["view"] = "Receitas {%receitaID}";
	if (count($fieldToolTipstb_receitas["English"]))
		$tdatatb_receitas[".isUseToolTips"] = true;
}


	$tdatatb_receitas[".NCSearch"] = true;



$tdatatb_receitas[".shortTableName"] = "tb_receitas";
$tdatatb_receitas[".nSecOptions"] = 0;

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

$tdatatb_receitas[".strOriginalTableName"] = "tb_receitas";

	



$tdatatb_receitas[".showAddInPopup"] = false;

$tdatatb_receitas[".showEditInPopup"] = false;

$tdatatb_receitas[".showViewInPopup"] = false;

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


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

	$tdatatb_receitas[".audit"] = false;

	$tdatatb_receitas[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatatb_receitas[".isUseAjaxSuggest"] = true;

$tdatatb_receitas[".rowHighlite"] = true;





$tdatatb_receitas[".ajaxCodeSnippetAdded"] = false;

$tdatatb_receitas[".buttonsAdded"] = false;

$tdatatb_receitas[".addPageEvents"] = false;

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


$tdatatb_receitas[".badgeColor"] = "7b68ee";


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

$tdatatb_receitas[".googleLikeFields"] = array();
$tdatatb_receitas[".googleLikeFields"][] = "receitaID";
$tdatatb_receitas[".googleLikeFields"][] = "consulta ID";
$tdatatb_receitas[".googleLikeFields"][] = "Tipo";
$tdatatb_receitas[".googleLikeFields"][] = "validade";
$tdatatb_receitas[".googleLikeFields"][] = "copia_pdf";
$tdatatb_receitas[".googleLikeFields"][] = "data";



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

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

$tdatatb_receitas[".nPrinterSplitRecords"] = 40;

$tdatatb_receitas[".geocodingEnabled"] = false;










$tdatatb_receitas[".pageSize"] = 20;

$tdatatb_receitas[".warnLeavingPages"] = true;



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

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

$tdatatb_receitas[".sqlHead"] = "SELECT receitaID,  	`consulta ID`,  	Tipo,  	validade,  	copia_pdf,  	`data`";
$tdatatb_receitas[".sqlFrom"] = "FROM tb_receitas";
$tdatatb_receitas[".sqlWhereExpr"] = "";
$tdatatb_receitas[".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_receitas[".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_receitas[".arrGroupsPerPage"] = $arrGPP;

$tdatatb_receitas[".highlightSearchResults"] = true;

$tableKeystb_receitas = array();
$tableKeystb_receitas[] = "receitaID";
$tdatatb_receitas[".Keys"] = $tableKeystb_receitas;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

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

	
	
				$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_receitas["receitaID"] = $fdata;
		$tdatatb_receitas[".searchableFields"][] = "receitaID";
//	consulta ID
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "consulta ID";
	$fdata["GoodName"] = "consulta_ID";
	$fdata["ownerTable"] = "tb_receitas";
	$fdata["Label"] = GetFieldLabel("tb_receitas","consulta_ID");
	$fdata["FieldType"] = 3;

	
	
	
			

		$fdata["strField"] = "consulta ID";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`consulta ID`";

	
	
				$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_receitas["consulta ID"] = $fdata;
		$tdatatb_receitas[".searchableFields"][] = "consulta ID";
//	Tipo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Tipo";
	$fdata["GoodName"] = "Tipo";
	$fdata["ownerTable"] = "tb_receitas";
	$fdata["Label"] = GetFieldLabel("tb_receitas","Tipo");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "Controlada";
	$edata["LookupValues"][] = "Não Controlada";

	
		$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_receitas["Tipo"] = $fdata;
		$tdatatb_receitas[".searchableFields"][] = "Tipo";
//	validade
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "validade";
	$fdata["GoodName"] = "validade";
	$fdata["ownerTable"] = "tb_receitas";
	$fdata["Label"] = GetFieldLabel("tb_receitas","validade");
	$fdata["FieldType"] = 7;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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" => "Date");

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 2;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$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("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, 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_receitas["validade"] = $fdata;
		$tdatatb_receitas[".searchableFields"][] = "validade";
//	copia_pdf
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "copia_pdf";
	$fdata["GoodName"] = "copia_pdf";
	$fdata["ownerTable"] = "tb_receitas";
	$fdata["Label"] = GetFieldLabel("tb_receitas","copia_pdf");
	$fdata["FieldType"] = 201;

	
	
	
			

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

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

	
	
				$fdata["UploadFolder"] = "uploads\\receitas";

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

	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ShowThumbnail"] = true;
	$vdata["ThumbWidth"] = 72;
	$vdata["ThumbHeight"] = 72;
	$vdata["ImageWidth"] = 600;
	$vdata["ImageHeight"] = 400;

			$vdata["multipleImgMode"] = 3;
	$vdata["maxImages"] = 0;

			$vdata["showGallery"] = true;
	$vdata["galleryMode"] = 2;
	$vdata["captionMode"] = 2;
	$vdata["captionField"] = "";

	$vdata["imageBorder"] = 1;
	$vdata["imageFullWidth"] = 1;


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

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

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

	$edata = array("EditFormat" => "Document upload");

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 0;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

		$edata["CreateThumbnail"] = true;
	$edata["StrThumbnail"] = "th";
			$edata["ThumbnailSize"] = 600;

			
	
	
	
	$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_receitas["copia_pdf"] = $fdata;
		$tdatatb_receitas[".searchableFields"][] = "copia_pdf";
//	data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "data";
	$fdata["GoodName"] = "data";
	$fdata["ownerTable"] = "tb_receitas";
	$fdata["Label"] = GetFieldLabel("tb_receitas","data");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`data`";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$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" => "Date");

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 5;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$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("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, 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_receitas["data"] = $fdata;
		$tdatatb_receitas[".searchableFields"][] = "data";


$tables_data["tb_receitas"]=&$tdatatb_receitas;
$field_labels["tb_receitas"] = &$fieldLabelstb_receitas;
$fieldToolTips["tb_receitas"] = &$fieldToolTipstb_receitas;
$placeHolders["tb_receitas"] = &$placeHolderstb_receitas;
$page_titles["tb_receitas"] = &$pageTitlestb_receitas;

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

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



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


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

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

	$detailsTablesData["tb_receitas"][$dIndex]["masterKeys"][]="receitaID";

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

	$detailsTablesData["tb_receitas"][$dIndex]["detailKeys"][]="receitaID";

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



	
				$strOriginalDetailsTable="tb_consultas";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="tb_consultas";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "tb_consultas";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["tb_receitas"][0] = $masterParams;
				$masterTablesData["tb_receitas"][0]["masterKeys"] = array();
	$masterTablesData["tb_receitas"][0]["masterKeys"][]="consultaiD";
				$masterTablesData["tb_receitas"][0]["detailKeys"] = array();
	$masterTablesData["tb_receitas"][0]["detailKeys"][]="consulta ID";
		
// -----------------end  prepare master-details data arrays ------------------------------//


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










function createSqlQuery_tb_receitas()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "receitaID,  	`consulta ID`,  	Tipo,  	validade,  	copia_pdf,  	`data`";
$proto0["m_strFrom"] = "FROM tb_receitas";
$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" => "receitaID",
	"m_strTable" => "tb_receitas",
	"m_srcTableName" => "tb_receitas"
));

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

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

$proto8["m_sql"] = "`consulta ID`";
$proto8["m_srcTableName"] = "tb_receitas";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "data",
	"m_strTable" => "tb_receitas",
	"m_srcTableName" => "tb_receitas"
));

$proto16["m_sql"] = "`data`";
$proto16["m_srcTableName"] = "tb_receitas";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto18=array();
$proto18["m_link"] = "SQLL_MAIN";
			$proto19=array();
$proto19["m_strName"] = "tb_receitas";
$proto19["m_srcTableName"] = "tb_receitas";
$proto19["m_columns"] = array();
$proto19["m_columns"][] = "receitaID";
$proto19["m_columns"][] = "consulta ID";
$proto19["m_columns"][] = "Tipo";
$proto19["m_columns"][] = "validade";
$proto19["m_columns"][] = "copia_pdf";
$proto19["m_columns"][] = "data";
$obj = new SQLTable($proto19);

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

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

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

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

	return $obj;
}
$queryData_tb_receitas = createSqlQuery_tb_receitas();


	
		;

						

$tdatatb_receitas[".sqlquery"] = $queryData_tb_receitas;

$tableEvents["tb_receitas"] = new eventsBase;
$tdatatb_receitas[".hasEvents"] = false;

?>