<?php



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


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

//	field labels
$fieldLabelsLista_Pedidos_Clone_PE = array();
$fieldToolTipsLista_Pedidos_Clone_PE = array();
$pageTitlesLista_Pedidos_Clone_PE = array();
$placeHoldersLista_Pedidos_Clone_PE = array();

if(mlang_getcurrentlang()=="Portuguese(Standard)")
{
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"] = array();
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"] = array();
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"] = array();
	$pageTitlesLista_Pedidos_Clone_PE["Portuguese(Standard)"] = array();
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["NE"] = "NE";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["NE"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["NE"] = "";
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["CodPlanta"] = "Cod Planta";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["CodPlanta"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["CodPlanta"] = "";
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["CodCliente"] = "Cod Cliente";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["CodCliente"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["CodCliente"] = "";
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["PE"] = "PE";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["PE"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["PE"] = "";
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Clone"] = "Clone";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Clone"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Clone"] = "";
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Quantidade"] = "Quantidade";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Quantidade"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Quantidade"] = "";
	$fieldLabelsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Marza"] = "Marza";
	$fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Marza"] = "";
	$placeHoldersLista_Pedidos_Clone_PE["Portuguese(Standard)"]["Marza"] = "";
	if (count($fieldToolTipsLista_Pedidos_Clone_PE["Portuguese(Standard)"]))
		$tdataLista_Pedidos_Clone_PE[".isUseToolTips"] = true;
}


	$tdataLista_Pedidos_Clone_PE[".NCSearch"] = true;


	$tdataLista_Pedidos_Clone_PE[".scrollGridBody"] = true;

$tdataLista_Pedidos_Clone_PE[".shortTableName"] = "Lista_Pedidos_Clone_PE";
$tdataLista_Pedidos_Clone_PE[".nSecOptions"] = 0;

$tdataLista_Pedidos_Clone_PE[".mainTableOwnerID"] = "";
$tdataLista_Pedidos_Clone_PE[".entityType"] = 1;

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

	



$tdataLista_Pedidos_Clone_PE[".showAddInPopup"] = true;

$tdataLista_Pedidos_Clone_PE[".showEditInPopup"] = true;

$tdataLista_Pedidos_Clone_PE[".showViewInPopup"] = false;

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


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

	$tdataLista_Pedidos_Clone_PE[".audit"] = true;

	$tdataLista_Pedidos_Clone_PE[".locking"] = true;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataLista_Pedidos_Clone_PE[".isUseAjaxSuggest"] = true;

$tdataLista_Pedidos_Clone_PE[".rowHighlite"] = true;



			

$tdataLista_Pedidos_Clone_PE[".ajaxCodeSnippetAdded"] = false;

$tdataLista_Pedidos_Clone_PE[".buttonsAdded"] = false;

$tdataLista_Pedidos_Clone_PE[".addPageEvents"] = false;

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




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

$tdataLista_Pedidos_Clone_PE[".googleLikeFields"] = array();
$tdataLista_Pedidos_Clone_PE[".googleLikeFields"][] = "CodCliente";
$tdataLista_Pedidos_Clone_PE[".googleLikeFields"][] = "Marza";



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

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

$tdataLista_Pedidos_Clone_PE[".nPrinterSplitRecords"] = 40;

$tdataLista_Pedidos_Clone_PE[".geocodingEnabled"] = false;










$tdataLista_Pedidos_Clone_PE[".pageSize"] = 999;

$tdataLista_Pedidos_Clone_PE[".warnLeavingPages"] = true;



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

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

$tdataLista_Pedidos_Clone_PE[".sqlHead"] = "SELECT Vinha.NE,  Vinha.CodPlanta,  Vinha.CodCliente,  Vinha.PE,  Vinha.Clone,  Vinha.Quantidade,  Assegnatos.Marza";
$tdataLista_Pedidos_Clone_PE[".sqlFrom"] = "FROM Vinha  INNER JOIN Assegnatos ON Vinha.CodPlanta = Assegnatos.Codice";
$tdataLista_Pedidos_Clone_PE[".sqlWhereExpr"] = "(Vinha.NE =1)";
$tdataLista_Pedidos_Clone_PE[".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;
$tdataLista_Pedidos_Clone_PE[".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;
$tdataLista_Pedidos_Clone_PE[".arrGroupsPerPage"] = $arrGPP;

$tdataLista_Pedidos_Clone_PE[".highlightSearchResults"] = true;

$tableKeysLista_Pedidos_Clone_PE = array();
$tdataLista_Pedidos_Clone_PE[".Keys"] = $tableKeysLista_Pedidos_Clone_PE;


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




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

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Vinha.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" => "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"] = "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


	$tdataLista_Pedidos_Clone_PE["NE"] = $fdata;
		$tdataLista_Pedidos_Clone_PE[".searchableFields"][] = "NE";
//	CodPlanta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "CodPlanta";
	$fdata["GoodName"] = "CodPlanta";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Lista_Pedidos_Clone_PE","CodPlanta");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Vinha.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"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

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

	

	
	$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["filterTotalFields"] = "NE";
		$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataLista_Pedidos_Clone_PE["CodPlanta"] = $fdata;
		$tdataLista_Pedidos_Clone_PE[".searchableFields"][] = "CodPlanta";
//	CodCliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "CodCliente";
	$fdata["GoodName"] = "CodCliente";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Lista_Pedidos_Clone_PE","CodCliente");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Vinha.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"] = "";

	
	
	
	

	
	
		$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


	$tdataLista_Pedidos_Clone_PE["CodCliente"] = $fdata;
		$tdataLista_Pedidos_Clone_PE[".searchableFields"][] = "CodCliente";
//	PE
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "PE";
	$fdata["GoodName"] = "PE";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Lista_Pedidos_Clone_PE","PE");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Vinha.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 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


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

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Vinha.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 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


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

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Vinha.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"] = "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


	$tdataLista_Pedidos_Clone_PE["Quantidade"] = $fdata;
		$tdataLista_Pedidos_Clone_PE[".searchableFields"][] = "Quantidade";
//	Marza
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Marza";
	$fdata["GoodName"] = "Marza";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("Lista_Pedidos_Clone_PE","Marza");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "Assegnatos.Marza";

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

	
	
	
	

	
	
		$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


	$tdataLista_Pedidos_Clone_PE["Marza"] = $fdata;
		$tdataLista_Pedidos_Clone_PE[".searchableFields"][] = "Marza";


$tables_data["Lista Pedidos Clone_PE"]=&$tdataLista_Pedidos_Clone_PE;
$field_labels["Lista_Pedidos_Clone_PE"] = &$fieldLabelsLista_Pedidos_Clone_PE;
$fieldToolTips["Lista_Pedidos_Clone_PE"] = &$fieldToolTipsLista_Pedidos_Clone_PE;
$placeHolders["Lista_Pedidos_Clone_PE"] = &$placeHoldersLista_Pedidos_Clone_PE;
$page_titles["Lista_Pedidos_Clone_PE"] = &$pageTitlesLista_Pedidos_Clone_PE;

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

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



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


		
	$detailsTablesData["Lista Pedidos Clone_PE"][$dIndex] = $detailsParam;

	
		$detailsTablesData["Lista Pedidos Clone_PE"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["Lista Pedidos Clone_PE"][$dIndex]["masterKeys"][]="CodCliente";

				$detailsTablesData["Lista Pedidos Clone_PE"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["Lista Pedidos Clone_PE"][$dIndex]["detailKeys"][]="CodCliente";

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



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


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










function createSqlQuery_Lista_Pedidos_Clone_PE()
{
$proto2=array();
$proto2["m_strHead"] = "SELECT";
$proto2["m_strFieldList"] = "Vinha.NE,  Vinha.CodPlanta,  Vinha.CodCliente,  Vinha.PE,  Vinha.Clone,  Vinha.Quantidade,  Assegnatos.Marza";
$proto2["m_strFrom"] = "FROM Vinha  INNER JOIN Assegnatos ON Vinha.CodPlanta = Assegnatos.Codice";
$proto2["m_strWhere"] = "(Vinha.NE =1)";
$proto2["m_strOrderBy"] = "";
	
		;
			$proto2["cipherer"] = null;
$proto4=array();
$proto4["m_sql"] = "Vinha.NE =1";
$proto4["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "NE",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

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

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

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

$proto2["m_having"] = $obj;
$proto2["m_fieldlist"] = array();
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "NE",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto8["m_sql"] = "Vinha.NE";
$proto8["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto2["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "CodPlanta",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto10["m_sql"] = "Vinha.CodPlanta";
$proto10["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto2["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "CodCliente",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto12["m_sql"] = "Vinha.CodCliente";
$proto12["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto2["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "PE",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto14["m_sql"] = "Vinha.PE";
$proto14["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto2["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "Clone",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto16["m_sql"] = "Vinha.Clone";
$proto16["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto2["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto18["m_sql"] = "Vinha.Quantidade";
$proto18["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto2["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "Marza",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto20["m_sql"] = "Assegnatos.Marza";
$proto20["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

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

$proto22["m_table"] = $obj;
$proto22["m_sql"] = "Vinha";
$proto22["m_alias"] = "";
$proto22["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto24=array();
$proto24["m_sql"] = "";
$proto24["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto2["m_fromlist"][]=$obj;
												$proto26=array();
$proto26["m_link"] = "SQLL_INNERJOIN";
			$proto27=array();
$proto27["m_strName"] = "Assegnatos";
$proto27["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto27["m_columns"] = array();
$proto27["m_columns"][] = "Data";
$proto27["m_columns"][] = "Marza";
$proto27["m_columns"][] = "Talea";
$proto27["m_columns"][] = "Varieta";
$proto27["m_columns"][] = "Totale";
$proto27["m_columns"][] = "Codice";
$proto27["m_columns"][] = "Clone";
$obj = new SQLTable($proto27);

$proto26["m_table"] = $obj;
$proto26["m_sql"] = "INNER JOIN Assegnatos ON Vinha.CodPlanta = Assegnatos.Codice";
$proto26["m_alias"] = "";
$proto26["m_srcTableName"] = "Lista Pedidos Clone_PE";
$proto28=array();
$proto28["m_sql"] = "Vinha.CodPlanta = Assegnatos.Codice";
$proto28["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "CodPlanta",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Lista Pedidos Clone_PE"
));

$proto28["m_column"]=$obj;
$proto28["m_contained"] = array();
$proto28["m_strCase"] = "= Assegnatos.Codice";
$proto28["m_havingmode"] = false;
$proto28["m_inBrackets"] = false;
$proto28["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto28);

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

$proto2["m_fromlist"][]=$obj;
$proto2["m_groupby"] = array();
$proto2["m_orderby"] = array();
$proto2["m_srcTableName"]="Lista Pedidos Clone_PE";		
$obj = new SQLQuery($proto2);

	return $obj;
}
$queryData_Lista_Pedidos_Clone_PE = createSqlQuery_Lista_Pedidos_Clone_PE();


	
		;

							

$tdataLista_Pedidos_Clone_PE[".sqlquery"] = $queryData_Lista_Pedidos_Clone_PE;

$tableEvents["Lista Pedidos Clone_PE"] = new eventsBase;
$tdataLista_Pedidos_Clone_PE[".hasEvents"] = false;

?>