<?php



$tdataVinha = array();
$tdataVinha[".searchableFields"] = array();
$tdataVinha[".ShortName"] = "Vinha";
$tdataVinha[".OwnerID"] = "";
$tdataVinha[".OriginalTable"] = "Vinha";


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

//	field labels
$fieldLabelsVinha = array();
$fieldToolTipsVinha = array();
$pageTitlesVinha = array();
$placeHoldersVinha = array();

if(mlang_getcurrentlang()=="Portuguese(Standard)")
{
	$fieldLabelsVinha["Portuguese(Standard)"] = array();
	$fieldToolTipsVinha["Portuguese(Standard)"] = array();
	$placeHoldersVinha["Portuguese(Standard)"] = array();
	$pageTitlesVinha["Portuguese(Standard)"] = array();
	$fieldLabelsVinha["Portuguese(Standard)"]["CodVenda"] = "Cod Venda";
	$fieldToolTipsVinha["Portuguese(Standard)"]["CodVenda"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["CodVenda"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["CodUser"] = "Cod User";
	$fieldToolTipsVinha["Portuguese(Standard)"]["CodUser"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["CodUser"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Data"] = "Data";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Data"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Data"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["CodPlanta"] = "Cod Planta";
	$fieldToolTipsVinha["Portuguese(Standard)"]["CodPlanta"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["CodPlanta"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["CodCliente"] = "Cod Cliente";
	$fieldToolTipsVinha["Portuguese(Standard)"]["CodCliente"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["CodCliente"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Quantidade"] = "Quantidade";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Quantidade"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Quantidade"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Confirmado"] = "Confirmado";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Confirmado"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Confirmado"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["NEntrega"] = "NEntrega";
	$fieldToolTipsVinha["Portuguese(Standard)"]["NEntrega"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["NEntrega"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["PE"] = "PE";
	$fieldToolTipsVinha["Portuguese(Standard)"]["PE"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["PE"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Clone"] = "Clone";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Clone"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Clone"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["NE"] = "NE";
	$fieldToolTipsVinha["Portuguese(Standard)"]["NE"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["NE"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Saldo"] = "Stock todos";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Saldo"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Saldo"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["CodMarza"] = "Cod Marza";
	$fieldToolTipsVinha["Portuguese(Standard)"]["CodMarza"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["CodMarza"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Saldo1"] = "Stock Confirmados";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Saldo1"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Saldo1"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Escolha"] = "Escolha";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Escolha"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Escolha"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Pago20_"] = "Pago20%";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Pago20_"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Pago20_"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Encomendado"] = "Encomendado";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Encomendado"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Encomendado"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["PagoTotal"] = "Pago Total";
	$fieldToolTipsVinha["Portuguese(Standard)"]["PagoTotal"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["PagoTotal"] = "";
	$fieldLabelsVinha["Portuguese(Standard)"]["Fornecido"] = "Fornecido";
	$fieldToolTipsVinha["Portuguese(Standard)"]["Fornecido"] = "";
	$placeHoldersVinha["Portuguese(Standard)"]["Fornecido"] = "";
	if (count($fieldToolTipsVinha["Portuguese(Standard)"]))
		$tdataVinha[".isUseToolTips"] = true;
}


	$tdataVinha[".NCSearch"] = true;


	$tdataVinha[".scrollGridBody"] = true;

$tdataVinha[".shortTableName"] = "Vinha";
$tdataVinha[".nSecOptions"] = 0;

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

$tdataVinha[".strOriginalTableName"] = "Vinha";

	



$tdataVinha[".showAddInPopup"] = true;

$tdataVinha[".showEditInPopup"] = false;

$tdataVinha[".showViewInPopup"] = false;

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


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

	$tdataVinha[".audit"] = true;

	$tdataVinha[".locking"] = true;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataVinha[".isUseAjaxSuggest"] = true;

$tdataVinha[".rowHighlite"] = true;



																											

$tdataVinha[".ajaxCodeSnippetAdded"] = false;

$tdataVinha[".buttonsAdded"] = false;

$tdataVinha[".addPageEvents"] = false;

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


$tdataVinha[".badgeColor"] = "000000";


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

$tdataVinha[".googleLikeFields"] = array();
$tdataVinha[".googleLikeFields"][] = "CodCliente";
$tdataVinha[".googleLikeFields"][] = "NEntrega";
$tdataVinha[".googleLikeFields"][] = "NE";
$tdataVinha[".googleLikeFields"][] = "Saldo";
$tdataVinha[".googleLikeFields"][] = "CodMarza";
$tdataVinha[".googleLikeFields"][] = "Saldo1";
$tdataVinha[".googleLikeFields"][] = "Escolha";
$tdataVinha[".googleLikeFields"][] = "Pago20%";
$tdataVinha[".googleLikeFields"][] = "Encomendado";
$tdataVinha[".googleLikeFields"][] = "PagoTotal";
$tdataVinha[".googleLikeFields"][] = "Fornecido";



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

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

$tdataVinha[".nPrinterSplitRecords"] = 40;

$tdataVinha[".geocodingEnabled"] = false;










$tdataVinha[".pageSize"] = 999;

$tdataVinha[".warnLeavingPages"] = true;



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

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

$tdataVinha[".sqlHead"] = "SELECT CodVenda,  CodUser,  `Data`,  CodPlanta,  CodCliente,  Quantidade,  Confirmado,  NEntrega,  PE,  Clone,  NE,  Saldo,  CodMarza,  Saldo1,  Escolha,  `Pago20%`,  Encomendado,  PagoTotal,  Fornecido";
$tdataVinha[".sqlFrom"] = "FROM Vinha";
$tdataVinha[".sqlWhereExpr"] = "(CodCliente <>1)";
$tdataVinha[".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;
$tdataVinha[".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;
$tdataVinha[".arrGroupsPerPage"] = $arrGPP;

$tdataVinha[".highlightSearchResults"] = true;

$tableKeysVinha = array();
$tableKeysVinha[] = "CodVenda";
$tdataVinha[".Keys"] = $tableKeysVinha;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

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

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

		$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";
			$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "Value %value% already exists", "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"] = "Equals";

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["CodVenda"] = $fdata;
		$tdataVinha[".searchableFields"][] = "CodVenda";
//	CodUser
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "CodUser";
	$fdata["GoodName"] = "CodUser";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","CodUser");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["list"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["print"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

	
		
	$edata["LinkField"] = "CodAdin";
	$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();
							
		$edata["autoUpdatable"] = true;

	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

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

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

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$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";
		
		$edata["autoUpdatable"] = true;

	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["add"] = $edata;
	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

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

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

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
		$edata["Multiselect"] = true;

	
// 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();
							
		$edata["autoUpdatable"] = true;

	//	End validation

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


	$fdata["isSeparate"] = true;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["CodUser"] = $fdata;
		$tdataVinha[".searchableFields"][] = "CodUser";
//	Data
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Data";
	$fdata["GoodName"] = "Data";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Data");
	$fdata["FieldType"] = 135;

	
	
	
			

		$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["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["autoUpdatable"] = true;

	//	End validation

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


	$fdata["isSeparate"] = false;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["Data"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Data";
//	CodPlanta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "CodPlanta";
	$fdata["GoodName"] = "CodPlanta";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","CodPlanta");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "Codice";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "Varieta";

	

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

	
		$edata["UseCategory"] = true;
	$edata["categoryFields"] = array();
	$edata["categoryFields"][] = array( "main" => "CodMarza", "lookup" => "Marza" );

	
	
				//dependent dropdowns @deprecated data ?
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "Escolha";

	
	
		$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["CodPlanta"] = $fdata;
		$tdataVinha[".searchableFields"][] = "CodPlanta";
//	CodCliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "CodCliente";
	$fdata["GoodName"] = "CodCliente";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","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" => "Lookup wizard");

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


	
	

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

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

	

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

	
	
	
	

	
	
		$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["CodCliente"] = $fdata;
		$tdataVinha[".searchableFields"][] = "CodCliente";
//	Quantidade
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "Quantidade";
	$fdata["GoodName"] = "Quantidade";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Quantidade");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

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

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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["Quantidade"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Quantidade";
//	Confirmado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Confirmado";
	$fdata["GoodName"] = "Confirmado";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Confirmado");
	$fdata["FieldType"] = 16;

	
	
	
			

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

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

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["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["filterFormat"] = "Options list";
		$fdata["showCollapsed"] = false;

	
	
	
		$fdata["filterCheckedMessageType"] = "Text";
	$fdata["filterCheckedMessageText"] = "Checked";
	$fdata["filterUncheckedMessageType"] = "Text";
	$fdata["filterUncheckedMessageText"] = "Unchecked";

//end of Filters settings


	$tdataVinha["Confirmado"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Confirmado";
//	NEntrega
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "NEntrega";
	$fdata["GoodName"] = "NEntrega";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","NEntrega");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "CodEntrega";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "CodEntrega";

	

	
	$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["NEntrega"] = $fdata;
		$tdataVinha[".searchableFields"][] = "NEntrega";
//	PE
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "PE";
	$fdata["GoodName"] = "PE";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","PE");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "CodPE";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "PE";

	

	
	$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["PE"] = $fdata;
		$tdataVinha[".searchableFields"][] = "PE";
//	Clone
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "Clone";
	$fdata["GoodName"] = "Clone";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Clone");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "CodClone";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "Clone";

	

	
	$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Equals";
// 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


	$tdataVinha["Clone"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Clone";
//	NE
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "NE";
	$fdata["GoodName"] = "NE";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","NE");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["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


	$tdataVinha["NE"] = $fdata;
		$tdataVinha[".searchableFields"][] = "NE";
//	Saldo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "Saldo";
	$fdata["GoodName"] = "Saldo";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Saldo");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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


	
	

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

	
		
	$edata["LinkField"] = "Codice";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "stock";

	

	
	$edata["LookupOrderBy"] = "";

	
		$edata["UseCategory"] = true;
	$edata["categoryFields"] = array();
	$edata["categoryFields"][] = array( "main" => "Escolha", "lookup" => "Codice" );

	
	

	
	
		$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


	$tdataVinha["Saldo"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Saldo";
//	CodMarza
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "CodMarza";
	$fdata["GoodName"] = "CodMarza";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","CodMarza");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

	
			$edata["LookupUnique"] = true;

	$edata["LinkField"] = "Marza";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "Marza";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	
				//dependent dropdowns @deprecated data ?
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "CodPlanta";

	
	
		$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


	$tdataVinha["CodMarza"] = $fdata;
		$tdataVinha[".searchableFields"][] = "CodMarza";
//	Saldo1
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "Saldo1";
	$fdata["GoodName"] = "Saldo1";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Saldo1");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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


	
	

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

	
		
	$edata["LinkField"] = "Codice";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "stock";

	

	
	$edata["LookupOrderBy"] = "";

	
		$edata["UseCategory"] = true;
	$edata["categoryFields"] = array();
	$edata["categoryFields"][] = array( "main" => "Escolha", "lookup" => "Codice" );

	
	

	
	
		$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


	$tdataVinha["Saldo1"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Saldo1";
//	Escolha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "Escolha";
	$fdata["GoodName"] = "Escolha";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Escolha");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

	
		
	$edata["LinkField"] = "Codice";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "Codice";

	

	
	$edata["LookupOrderBy"] = "";

	
		$edata["UseCategory"] = true;
	$edata["categoryFields"] = array();
	$edata["categoryFields"][] = array( "main" => "CodPlanta", "lookup" => "Codice" );

	
	
				//dependent dropdowns @deprecated data ?
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "Saldo";
				//dependent dropdowns @deprecated data ?
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "Saldo1";

	
	
		$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


	$tdataVinha["Escolha"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Escolha";
//	Pago20%
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "Pago20%";
	$fdata["GoodName"] = "Pago20_";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Pago20_");
	$fdata["FieldType"] = 16;

	
	
	
			

		$fdata["strField"] = "Pago20%";

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`Pago20%`";

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["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"] = "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["filterFormat"] = "Options list";
		$fdata["showCollapsed"] = false;

	
	
	
		$fdata["filterCheckedMessageType"] = "Text";
	$fdata["filterCheckedMessageText"] = "Checked";
	$fdata["filterUncheckedMessageType"] = "Text";
	$fdata["filterUncheckedMessageText"] = "Unchecked";

//end of Filters settings


	$tdataVinha["Pago20%"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Pago20%";
//	Encomendado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 17;
	$fdata["strName"] = "Encomendado";
	$fdata["GoodName"] = "Encomendado";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Encomendado");
	$fdata["FieldType"] = 16;

	
	
	
			

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

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

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["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"] = "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["filterFormat"] = "Options list";
		$fdata["showCollapsed"] = false;

	
	
	
		$fdata["filterCheckedMessageType"] = "Text";
	$fdata["filterCheckedMessageText"] = "Checked";
	$fdata["filterUncheckedMessageType"] = "Text";
	$fdata["filterUncheckedMessageText"] = "Unchecked";

//end of Filters settings


	$tdataVinha["Encomendado"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Encomendado";
//	PagoTotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 18;
	$fdata["strName"] = "PagoTotal";
	$fdata["GoodName"] = "PagoTotal";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","PagoTotal");
	$fdata["FieldType"] = 16;

	
	
	
			

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

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

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["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"] = "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["filterFormat"] = "Options list";
		$fdata["showCollapsed"] = false;

	
	
	
		$fdata["filterCheckedMessageType"] = "Text";
	$fdata["filterCheckedMessageText"] = "Checked";
	$fdata["filterUncheckedMessageType"] = "Text";
	$fdata["filterUncheckedMessageText"] = "Unchecked";

//end of Filters settings


	$tdataVinha["PagoTotal"] = $fdata;
		$tdataVinha[".searchableFields"][] = "PagoTotal";
//	Fornecido
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 19;
	$fdata["strName"] = "Fornecido";
	$fdata["GoodName"] = "Fornecido";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Vinha","Fornecido");
	$fdata["FieldType"] = 16;

	
	
	
			

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

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

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["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"] = "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["filterFormat"] = "Options list";
		$fdata["showCollapsed"] = false;

	
	
	
		$fdata["filterCheckedMessageType"] = "Text";
	$fdata["filterCheckedMessageText"] = "Checked";
	$fdata["filterUncheckedMessageType"] = "Text";
	$fdata["filterUncheckedMessageText"] = "Unchecked";

//end of Filters settings


	$tdataVinha["Fornecido"] = $fdata;
		$tdataVinha[".searchableFields"][] = "Fornecido";


$tables_data["Vinha"]=&$tdataVinha;
$field_labels["Vinha"] = &$fieldLabelsVinha;
$fieldToolTips["Vinha"] = &$fieldToolTipsVinha;
$placeHolders["Vinha"] = &$placeHoldersVinha;
$page_titles["Vinha"] = &$pageTitlesVinha;

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

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



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

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][0] = $masterParams;
				$masterTablesData["Vinha"][0]["masterKeys"] = array();
	$masterTablesData["Vinha"][0]["masterKeys"][]="Codice";
				$masterTablesData["Vinha"][0]["detailKeys"] = array();
	$masterTablesData["Vinha"][0]["detailKeys"][]="CodPlanta";
		
	
				$strOriginalDetailsTable="Clientes";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Clientes";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "Clientes";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][1] = $masterParams;
				$masterTablesData["Vinha"][1]["masterKeys"] = array();
	$masterTablesData["Vinha"][1]["masterKeys"][]="CodCliente";
				$masterTablesData["Vinha"][1]["detailKeys"] = array();
	$masterTablesData["Vinha"][1]["detailKeys"][]="CodCliente";
		
	
				$strOriginalDetailsTable="Entregas";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Entregas";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "Entregas";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][2] = $masterParams;
				$masterTablesData["Vinha"][2]["masterKeys"] = array();
	$masterTablesData["Vinha"][2]["masterKeys"][]="CodEntrega";
				$masterTablesData["Vinha"][2]["detailKeys"] = array();
	$masterTablesData["Vinha"][2]["detailKeys"][]="NEntrega";
		
	
				$strOriginalDetailsTable="Vinha";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Lista Pedidos Clone_PE";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "Lista_Pedidos_Clone_PE";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][3] = $masterParams;
				$masterTablesData["Vinha"][3]["masterKeys"] = array();
	$masterTablesData["Vinha"][3]["masterKeys"][]="CodCliente";
				$masterTablesData["Vinha"][3]["detailKeys"] = array();
	$masterTablesData["Vinha"][3]["detailKeys"][]="CodCliente";
		
	
				$strOriginalDetailsTable="Vinha";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Marza stock(confirmados)";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "marza_stock_confirmados_";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][4] = $masterParams;
				$masterTablesData["Vinha"][4]["masterKeys"] = array();
	$masterTablesData["Vinha"][4]["masterKeys"][]="Marza";
				$masterTablesData["Vinha"][4]["detailKeys"] = array();
	$masterTablesData["Vinha"][4]["detailKeys"][]="CodMarza";
		
	
				$strOriginalDetailsTable="Vinha";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Marza stock";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "marza_stock";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][5] = $masterParams;
				$masterTablesData["Vinha"][5]["masterKeys"] = array();
	$masterTablesData["Vinha"][5]["masterKeys"][]="Marza";
				$masterTablesData["Vinha"][5]["detailKeys"] = array();
	$masterTablesData["Vinha"][5]["detailKeys"][]="CodMarza";
		
	
				$strOriginalDetailsTable="Vinha";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Planta stock(confirmados)";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "planta_stock_confirmados_";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][6] = $masterParams;
				$masterTablesData["Vinha"][6]["masterKeys"] = array();
	$masterTablesData["Vinha"][6]["masterKeys"][]="Codice";
				$masterTablesData["Vinha"][6]["detailKeys"] = array();
	$masterTablesData["Vinha"][6]["detailKeys"][]="CodPlanta";
		
	
				$strOriginalDetailsTable="Vinha";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Planta stock";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "planta_stock";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Vinha"][7] = $masterParams;
				$masterTablesData["Vinha"][7]["masterKeys"] = array();
	$masterTablesData["Vinha"][7]["masterKeys"][]="Codice";
				$masterTablesData["Vinha"][7]["detailKeys"] = array();
	$masterTablesData["Vinha"][7]["detailKeys"][]="CodPlanta";
		
// -----------------end  prepare master-details data arrays ------------------------------//


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










function createSqlQuery_Vinha()
{
$proto1=array();
$proto1["m_strHead"] = "SELECT";
$proto1["m_strFieldList"] = "CodVenda,  CodUser,  `Data`,  CodPlanta,  CodCliente,  Quantidade,  Confirmado,  NEntrega,  PE,  Clone,  NE,  Saldo,  CodMarza,  Saldo1,  Escolha,  `Pago20%`,  Encomendado,  PagoTotal,  Fornecido";
$proto1["m_strFrom"] = "FROM Vinha";
$proto1["m_strWhere"] = "(CodCliente <>1)";
$proto1["m_strOrderBy"] = "";
	
		;
			$proto1["cipherer"] = null;
$proto3=array();
$proto3["m_sql"] = "CodCliente <>1";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "CodCliente",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "<>1";
$proto3["m_havingmode"] = false;
$proto3["m_inBrackets"] = false;
$proto3["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto3);

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

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

$proto1["m_having"] = $obj;
$proto1["m_fieldlist"] = array();
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "CodVenda",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto7["m_sql"] = "CodVenda";
$proto7["m_srcTableName"] = "Vinha";
$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto1["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "CodUser",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto9["m_sql"] = "CodUser";
$proto9["m_srcTableName"] = "Vinha";
$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto1["m_fieldlist"][]=$obj;
						$proto11=array();
			$obj = new SQLField(array(
	"m_strName" => "Data",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

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

$proto1["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "CodPlanta",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto13["m_sql"] = "CodPlanta";
$proto13["m_srcTableName"] = "Vinha";
$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto1["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "CodCliente",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

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

$proto1["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

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

$proto1["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "Confirmado",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto19["m_sql"] = "Confirmado";
$proto19["m_srcTableName"] = "Vinha";
$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "";
$obj = new SQLFieldListItem($proto19);

$proto1["m_fieldlist"][]=$obj;
						$proto21=array();
			$obj = new SQLField(array(
	"m_strName" => "NEntrega",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto21["m_sql"] = "NEntrega";
$proto21["m_srcTableName"] = "Vinha";
$proto21["m_expr"]=$obj;
$proto21["m_alias"] = "";
$obj = new SQLFieldListItem($proto21);

$proto1["m_fieldlist"][]=$obj;
						$proto23=array();
			$obj = new SQLField(array(
	"m_strName" => "PE",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto23["m_sql"] = "PE";
$proto23["m_srcTableName"] = "Vinha";
$proto23["m_expr"]=$obj;
$proto23["m_alias"] = "";
$obj = new SQLFieldListItem($proto23);

$proto1["m_fieldlist"][]=$obj;
						$proto25=array();
			$obj = new SQLField(array(
	"m_strName" => "Clone",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto25["m_sql"] = "Clone";
$proto25["m_srcTableName"] = "Vinha";
$proto25["m_expr"]=$obj;
$proto25["m_alias"] = "";
$obj = new SQLFieldListItem($proto25);

$proto1["m_fieldlist"][]=$obj;
						$proto27=array();
			$obj = new SQLField(array(
	"m_strName" => "NE",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto27["m_sql"] = "NE";
$proto27["m_srcTableName"] = "Vinha";
$proto27["m_expr"]=$obj;
$proto27["m_alias"] = "";
$obj = new SQLFieldListItem($proto27);

$proto1["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLField(array(
	"m_strName" => "Saldo",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto29["m_sql"] = "Saldo";
$proto29["m_srcTableName"] = "Vinha";
$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "";
$obj = new SQLFieldListItem($proto29);

$proto1["m_fieldlist"][]=$obj;
						$proto31=array();
			$obj = new SQLField(array(
	"m_strName" => "CodMarza",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto31["m_sql"] = "CodMarza";
$proto31["m_srcTableName"] = "Vinha";
$proto31["m_expr"]=$obj;
$proto31["m_alias"] = "";
$obj = new SQLFieldListItem($proto31);

$proto1["m_fieldlist"][]=$obj;
						$proto33=array();
			$obj = new SQLField(array(
	"m_strName" => "Saldo1",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto33["m_sql"] = "Saldo1";
$proto33["m_srcTableName"] = "Vinha";
$proto33["m_expr"]=$obj;
$proto33["m_alias"] = "";
$obj = new SQLFieldListItem($proto33);

$proto1["m_fieldlist"][]=$obj;
						$proto35=array();
			$obj = new SQLField(array(
	"m_strName" => "Escolha",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto35["m_sql"] = "Escolha";
$proto35["m_srcTableName"] = "Vinha";
$proto35["m_expr"]=$obj;
$proto35["m_alias"] = "";
$obj = new SQLFieldListItem($proto35);

$proto1["m_fieldlist"][]=$obj;
						$proto37=array();
			$obj = new SQLField(array(
	"m_strName" => "Pago20%",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto37["m_sql"] = "`Pago20%`";
$proto37["m_srcTableName"] = "Vinha";
$proto37["m_expr"]=$obj;
$proto37["m_alias"] = "";
$obj = new SQLFieldListItem($proto37);

$proto1["m_fieldlist"][]=$obj;
						$proto39=array();
			$obj = new SQLField(array(
	"m_strName" => "Encomendado",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto39["m_sql"] = "Encomendado";
$proto39["m_srcTableName"] = "Vinha";
$proto39["m_expr"]=$obj;
$proto39["m_alias"] = "";
$obj = new SQLFieldListItem($proto39);

$proto1["m_fieldlist"][]=$obj;
						$proto41=array();
			$obj = new SQLField(array(
	"m_strName" => "PagoTotal",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto41["m_sql"] = "PagoTotal";
$proto41["m_srcTableName"] = "Vinha";
$proto41["m_expr"]=$obj;
$proto41["m_alias"] = "";
$obj = new SQLFieldListItem($proto41);

$proto1["m_fieldlist"][]=$obj;
						$proto43=array();
			$obj = new SQLField(array(
	"m_strName" => "Fornecido",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha"
));

$proto43["m_sql"] = "Fornecido";
$proto43["m_srcTableName"] = "Vinha";
$proto43["m_expr"]=$obj;
$proto43["m_alias"] = "";
$obj = new SQLFieldListItem($proto43);

$proto1["m_fieldlist"][]=$obj;
$proto1["m_fromlist"] = array();
												$proto45=array();
$proto45["m_link"] = "SQLL_MAIN";
			$proto46=array();
$proto46["m_strName"] = "Vinha";
$proto46["m_srcTableName"] = "Vinha";
$proto46["m_columns"] = array();
$proto46["m_columns"][] = "CodVenda";
$proto46["m_columns"][] = "CodUser";
$proto46["m_columns"][] = "Data";
$proto46["m_columns"][] = "CodPlanta";
$proto46["m_columns"][] = "CodCliente";
$proto46["m_columns"][] = "Quantidade";
$proto46["m_columns"][] = "Confirmado";
$proto46["m_columns"][] = "Pago20%";
$proto46["m_columns"][] = "Encomendado";
$proto46["m_columns"][] = "PagoTotal";
$proto46["m_columns"][] = "Fornecido";
$proto46["m_columns"][] = "NEntrega";
$proto46["m_columns"][] = "PE";
$proto46["m_columns"][] = "Clone";
$proto46["m_columns"][] = "NE";
$proto46["m_columns"][] = "Saldo";
$proto46["m_columns"][] = "CodMarza";
$proto46["m_columns"][] = "Saldo1";
$proto46["m_columns"][] = "Escolha";
$obj = new SQLTable($proto46);

$proto45["m_table"] = $obj;
$proto45["m_sql"] = "Vinha";
$proto45["m_alias"] = "";
$proto45["m_srcTableName"] = "Vinha";
$proto47=array();
$proto47["m_sql"] = "";
$proto47["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_Vinha = createSqlQuery_Vinha();


	
		;

																			

$tdataVinha[".sqlquery"] = $queryData_Vinha;

$tableEvents["Vinha"] = new eventsBase;
$tdataVinha[".hasEvents"] = false;

?>