<?php



$tdataclientesvinha = array();
$tdataclientesvinha[".searchableFields"] = array();
$tdataclientesvinha[".ShortName"] = "clientesvinha";
$tdataclientesvinha[".OwnerID"] = "";
$tdataclientesvinha[".OriginalTable"] = "ClientesVinha";


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

//	field labels
$fieldLabelsclientesvinha = array();
$fieldToolTipsclientesvinha = array();
$pageTitlesclientesvinha = array();
$placeHoldersclientesvinha = array();

if(mlang_getcurrentlang()=="Portuguese(Standard)")
{
	$fieldLabelsclientesvinha["Portuguese(Standard)"] = array();
	$fieldToolTipsclientesvinha["Portuguese(Standard)"] = array();
	$placeHoldersclientesvinha["Portuguese(Standard)"] = array();
	$pageTitlesclientesvinha["Portuguese(Standard)"] = array();
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["CodCliente"] = "Cod Cliente";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["CodCliente"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["CodCliente"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["CodPHC"] = "Cod PHC";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["CodPHC"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["CodPHC"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Nome"] = "Nome";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Nome"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Nome"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Morada"] = "Morada";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Morada"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Morada"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Contacto"] = "Contacto";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Contacto"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Contacto"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["AnoCompra"] = "Ano Compra";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["AnoCompra"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["AnoCompra"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Quantidade"] = "Quantidade";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Quantidade"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Quantidade"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Regiao"] = "Regiao";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Regiao"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Regiao"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Localidade"] = "Localidade";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Localidade"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Localidade"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Email"] = "Email";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Email"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Email"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Ligar"] = "Ligar";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Ligar"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Ligar"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Data"] = "Data";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Data"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Data"] = "";
	$fieldLabelsclientesvinha["Portuguese(Standard)"]["Obs"] = "Obs";
	$fieldToolTipsclientesvinha["Portuguese(Standard)"]["Obs"] = "";
	$placeHoldersclientesvinha["Portuguese(Standard)"]["Obs"] = "";
	if (count($fieldToolTipsclientesvinha["Portuguese(Standard)"]))
		$tdataclientesvinha[".isUseToolTips"] = true;
}


	$tdataclientesvinha[".NCSearch"] = true;



$tdataclientesvinha[".shortTableName"] = "clientesvinha";
$tdataclientesvinha[".nSecOptions"] = 0;

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

$tdataclientesvinha[".strOriginalTableName"] = "ClientesVinha";

	



$tdataclientesvinha[".showAddInPopup"] = false;

$tdataclientesvinha[".showEditInPopup"] = false;

$tdataclientesvinha[".showViewInPopup"] = false;

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


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

	$tdataclientesvinha[".audit"] = false;

	$tdataclientesvinha[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataclientesvinha[".isUseAjaxSuggest"] = true;

$tdataclientesvinha[".rowHighlite"] = true;



			

$tdataclientesvinha[".ajaxCodeSnippetAdded"] = false;

$tdataclientesvinha[".buttonsAdded"] = false;

$tdataclientesvinha[".addPageEvents"] = false;

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


$tdataclientesvinha[".badgeColor"] = "D2691E";


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

$tdataclientesvinha[".googleLikeFields"] = array();
$tdataclientesvinha[".googleLikeFields"][] = "CodCliente";
$tdataclientesvinha[".googleLikeFields"][] = "CodPHC";
$tdataclientesvinha[".googleLikeFields"][] = "Nome";
$tdataclientesvinha[".googleLikeFields"][] = "Morada";
$tdataclientesvinha[".googleLikeFields"][] = "Contacto";
$tdataclientesvinha[".googleLikeFields"][] = "AnoCompra";
$tdataclientesvinha[".googleLikeFields"][] = "Quantidade";
$tdataclientesvinha[".googleLikeFields"][] = "Regiao";
$tdataclientesvinha[".googleLikeFields"][] = "Localidade";
$tdataclientesvinha[".googleLikeFields"][] = "Email";
$tdataclientesvinha[".googleLikeFields"][] = "Ligar";
$tdataclientesvinha[".googleLikeFields"][] = "Data";
$tdataclientesvinha[".googleLikeFields"][] = "Obs";



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

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

$tdataclientesvinha[".nPrinterSplitRecords"] = 40;

$tdataclientesvinha[".geocodingEnabled"] = false;










$tdataclientesvinha[".pageSize"] = 999;

$tdataclientesvinha[".warnLeavingPages"] = true;



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

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

$tdataclientesvinha[".sqlHead"] = "SELECT CodCliente,  	CodPHC,  	Nome,  	Morada,  	Contacto,  	AnoCompra,  	Quantidade,  	Regiao,  	Localidade,  	Email,  	Ligar,  	`Data`,  	Obs";
$tdataclientesvinha[".sqlFrom"] = "FROM ClientesVinha";
$tdataclientesvinha[".sqlWhereExpr"] = "";
$tdataclientesvinha[".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;
$tdataclientesvinha[".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;
$tdataclientesvinha[".arrGroupsPerPage"] = $arrGPP;

$tdataclientesvinha[".highlightSearchResults"] = true;

$tableKeysclientesvinha = array();
$tableKeysclientesvinha[] = "CodCliente";
$tdataclientesvinha[".Keys"] = $tableKeysclientesvinha;


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




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

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["CodCliente"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "CodCliente";
//	CodPHC
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "CodPHC";
	$fdata["GoodName"] = "CodPHC";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","CodPHC");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["CodPHC"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "CodPHC";
//	Nome
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Nome";
	$fdata["GoodName"] = "Nome";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Nome");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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();
								$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "O nome %value% já existe", "messageType" => "Text");

	
	//	End validation

	
			
	
		$edata["denyDuplicates"] = true;

	
	$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


	$tdataclientesvinha["Nome"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Nome";
//	Morada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Morada";
	$fdata["GoodName"] = "Morada";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Morada");
	$fdata["FieldType"] = 201;

	
	
	
			

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
				$edata["nRows"] = 100;
			$edata["nCols"] = 200;

	
	
		$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


	$tdataclientesvinha["Morada"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Morada";
//	Contacto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Contacto";
	$fdata["GoodName"] = "Contacto";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Contacto");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["Contacto"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Contacto";
//	AnoCompra
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "AnoCompra";
	$fdata["GoodName"] = "AnoCompra";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","AnoCompra");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

		$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


	$tdataclientesvinha["AnoCompra"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "AnoCompra";
//	Quantidade
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Quantidade";
	$fdata["GoodName"] = "Quantidade";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Quantidade");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["Quantidade"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Quantidade";
//	Regiao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "Regiao";
	$fdata["GoodName"] = "Regiao";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Regiao");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "CodRegiao";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "Nome";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$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"] = "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


	$tdataclientesvinha["Regiao"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Regiao";
//	Localidade
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "Localidade";
	$fdata["GoodName"] = "Localidade";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Localidade");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "CodRegiao";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "Nome";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$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"] = "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


	$tdataclientesvinha["Localidade"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Localidade";
//	Email
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "Email";
	$fdata["GoodName"] = "Email";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Email");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["Email"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Email";
//	Ligar
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "Ligar";
	$fdata["GoodName"] = "Ligar";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Ligar");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["Ligar"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Ligar";
//	Data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "Data";
	$fdata["GoodName"] = "Data";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","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" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

	
	
	
		$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"] = "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


	$tdataclientesvinha["Data"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Data";
//	Obs
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "Obs";
	$fdata["GoodName"] = "Obs";
	$fdata["ownerTable"] = "ClientesVinha";
	$fdata["Label"] = GetFieldLabel("ClientesVinha","Obs");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataclientesvinha["Obs"] = $fdata;
		$tdataclientesvinha[".searchableFields"][] = "Obs";


$tables_data["ClientesVinha"]=&$tdataclientesvinha;
$field_labels["ClientesVinha"] = &$fieldLabelsclientesvinha;
$fieldToolTips["ClientesVinha"] = &$fieldToolTipsclientesvinha;
$placeHolders["ClientesVinha"] = &$placeHoldersclientesvinha;
$page_titles["ClientesVinha"] = &$pageTitlesclientesvinha;

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

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



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


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










function createSqlQuery_clientesvinha()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "CodCliente,  	CodPHC,  	Nome,  	Morada,  	Contacto,  	AnoCompra,  	Quantidade,  	Regiao,  	Localidade,  	Email,  	Ligar,  	`Data`,  	Obs";
$proto0["m_strFrom"] = "FROM ClientesVinha";
$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" => "CodCliente",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

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

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

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

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

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

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

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

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

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

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

$proto16["m_sql"] = "AnoCompra";
$proto16["m_srcTableName"] = "ClientesVinha";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto18["m_sql"] = "Quantidade";
$proto18["m_srcTableName"] = "ClientesVinha";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "Regiao",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto20["m_sql"] = "Regiao";
$proto20["m_srcTableName"] = "ClientesVinha";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "Localidade",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto22["m_sql"] = "Localidade";
$proto22["m_srcTableName"] = "ClientesVinha";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "Email",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto24["m_sql"] = "Email";
$proto24["m_srcTableName"] = "ClientesVinha";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
						$proto26=array();
			$obj = new SQLField(array(
	"m_strName" => "Ligar",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto26["m_sql"] = "Ligar";
$proto26["m_srcTableName"] = "ClientesVinha";
$proto26["m_expr"]=$obj;
$proto26["m_alias"] = "";
$obj = new SQLFieldListItem($proto26);

$proto0["m_fieldlist"][]=$obj;
						$proto28=array();
			$obj = new SQLField(array(
	"m_strName" => "Data",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto28["m_sql"] = "`Data`";
$proto28["m_srcTableName"] = "ClientesVinha";
$proto28["m_expr"]=$obj;
$proto28["m_alias"] = "";
$obj = new SQLFieldListItem($proto28);

$proto0["m_fieldlist"][]=$obj;
						$proto30=array();
			$obj = new SQLField(array(
	"m_strName" => "Obs",
	"m_strTable" => "ClientesVinha",
	"m_srcTableName" => "ClientesVinha"
));

$proto30["m_sql"] = "Obs";
$proto30["m_srcTableName"] = "ClientesVinha";
$proto30["m_expr"]=$obj;
$proto30["m_alias"] = "";
$obj = new SQLFieldListItem($proto30);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto32=array();
$proto32["m_link"] = "SQLL_MAIN";
			$proto33=array();
$proto33["m_strName"] = "ClientesVinha";
$proto33["m_srcTableName"] = "ClientesVinha";
$proto33["m_columns"] = array();
$proto33["m_columns"][] = "CodCliente";
$proto33["m_columns"][] = "CodPHC";
$proto33["m_columns"][] = "Nome";
$proto33["m_columns"][] = "Morada";
$proto33["m_columns"][] = "Contacto";
$proto33["m_columns"][] = "AnoCompra";
$proto33["m_columns"][] = "Quantidade";
$proto33["m_columns"][] = "Regiao";
$proto33["m_columns"][] = "Localidade";
$proto33["m_columns"][] = "Email";
$proto33["m_columns"][] = "Ligar";
$proto33["m_columns"][] = "Data";
$proto33["m_columns"][] = "Obs";
$obj = new SQLTable($proto33);

$proto32["m_table"] = $obj;
$proto32["m_sql"] = "ClientesVinha";
$proto32["m_alias"] = "";
$proto32["m_srcTableName"] = "ClientesVinha";
$proto34=array();
$proto34["m_sql"] = "";
$proto34["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_clientesvinha = createSqlQuery_clientesvinha();


	
		;

													

$tdataclientesvinha[".sqlquery"] = $queryData_clientesvinha;

$tableEvents["ClientesVinha"] = new eventsBase;
$tdataclientesvinha[".hasEvents"] = false;

?>