<?php



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


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

//	field labels
$fieldLabelsexportadisponibilidade = array();
$fieldToolTipsexportadisponibilidade = array();
$pageTitlesexportadisponibilidade = array();
$placeHoldersexportadisponibilidade = array();

if(mlang_getcurrentlang()=="Portuguese(Standard)")
{
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"] = array();
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"] = array();
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"] = array();
	$pageTitlesexportadisponibilidade["Portuguese(Standard)"] = array();
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Varieta"] = "Varieta";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Varieta"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Varieta"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Totale"] = "Totale";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Totale"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Totale"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Quantidade_Vendida"] = "Quantidade Vendida";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Quantidade_Vendida"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Quantidade_Vendida"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Stock"] = "Stock";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Stock"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Stock"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Marza"] = "Marza";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Marza"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Marza"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Talea"] = "Talea";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Talea"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Talea"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Clone"] = "Clone";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Clone"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Clone"] = "";
	$fieldLabelsexportadisponibilidade["Portuguese(Standard)"]["Confirmado"] = "Confirmado";
	$fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]["Confirmado"] = "";
	$placeHoldersexportadisponibilidade["Portuguese(Standard)"]["Confirmado"] = "";
	if (count($fieldToolTipsexportadisponibilidade["Portuguese(Standard)"]))
		$tdataexportadisponibilidade[".isUseToolTips"] = true;
}


	$tdataexportadisponibilidade[".NCSearch"] = true;


	$tdataexportadisponibilidade[".scrollGridBody"] = true;

$tdataexportadisponibilidade[".shortTableName"] = "exportadisponibilidade";
$tdataexportadisponibilidade[".nSecOptions"] = 0;

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

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

	



$tdataexportadisponibilidade[".showAddInPopup"] = true;

$tdataexportadisponibilidade[".showEditInPopup"] = false;

$tdataexportadisponibilidade[".showViewInPopup"] = false;

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


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

	$tdataexportadisponibilidade[".audit"] = true;

	$tdataexportadisponibilidade[".locking"] = true;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataexportadisponibilidade[".isUseAjaxSuggest"] = true;

$tdataexportadisponibilidade[".rowHighlite"] = true;



			

$tdataexportadisponibilidade[".ajaxCodeSnippetAdded"] = false;

$tdataexportadisponibilidade[".buttonsAdded"] = false;

$tdataexportadisponibilidade[".addPageEvents"] = false;

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


$tdataexportadisponibilidade[".badgeColor"] = "CD853F";


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

$tdataexportadisponibilidade[".googleLikeFields"] = array();
$tdataexportadisponibilidade[".googleLikeFields"][] = "Marza";
$tdataexportadisponibilidade[".googleLikeFields"][] = "Talea";
$tdataexportadisponibilidade[".googleLikeFields"][] = "Clone";
$tdataexportadisponibilidade[".googleLikeFields"][] = "Confirmado";



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

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

$tdataexportadisponibilidade[".nPrinterSplitRecords"] = 40;

$tdataexportadisponibilidade[".geocodingEnabled"] = false;










$tdataexportadisponibilidade[".pageSize"] = 999;

$tdataexportadisponibilidade[".warnLeavingPages"] = true;



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

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

$tdataexportadisponibilidade[".sqlHead"] = "SELECT `Assegnatos`.`Marza`,  `Assegnatos`.`Varieta`,  `Assegnatos`.`Totale`,  SUM(`Vinha`.`Quantidade`) AS `Quantidade Vendida`,  COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0)) AS `Stock`,  `Assegnatos`.`Talea`,  `Assegnatos`.`Clone`,  `Vinha`.`Confirmado`";
$tdataexportadisponibilidade[".sqlFrom"] = "FROM `Vinha`  LEFT OUTER JOIN `Assegnatos` ON `Vinha`.`CodPlanta` = `Assegnatos`.`Codice`";
$tdataexportadisponibilidade[".sqlWhereExpr"] = "";
$tdataexportadisponibilidade[".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;
$tdataexportadisponibilidade[".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;
$tdataexportadisponibilidade[".arrGroupsPerPage"] = $arrGPP;

$tdataexportadisponibilidade[".highlightSearchResults"] = true;

$tableKeysexportadisponibilidade = array();
$tdataexportadisponibilidade[".Keys"] = $tableKeysexportadisponibilidade;


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




//	Marza
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "Marza";
	$fdata["GoodName"] = "Marza";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","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


	$tdataexportadisponibilidade["Marza"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Marza";
//	Varieta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "Varieta";
	$fdata["GoodName"] = "Varieta";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Varieta");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Text field");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	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


	$tdataexportadisponibilidade["Varieta"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Varieta";
//	Totale
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Totale";
	$fdata["GoodName"] = "Totale";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Totale");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

	
	
				$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["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";
		
	
	//	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


	$tdataexportadisponibilidade["Totale"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Totale";
//	Quantidade Vendida
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Quantidade Vendida";
	$fdata["GoodName"] = "Quantidade_Vendida";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Quantidade_Vendida");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "SUM(`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["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";
		
	
	//	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


	$tdataexportadisponibilidade["Quantidade Vendida"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Quantidade Vendida";
//	Stock
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Stock";
	$fdata["GoodName"] = "Stock";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Stock");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0))";

	
	
				$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["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";
		
	
	//	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


	$tdataexportadisponibilidade["Stock"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Stock";
//	Talea
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "Talea";
	$fdata["GoodName"] = "Talea";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Talea");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Text field");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
	//	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


	$tdataexportadisponibilidade["Talea"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Talea";
//	Clone
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Clone";
	$fdata["GoodName"] = "Clone";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Clone");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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


	$tdataexportadisponibilidade["Clone"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Clone";
//	Confirmado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "Confirmado";
	$fdata["GoodName"] = "Confirmado";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("ExportaDisponibilidade","Confirmado");
	$fdata["FieldType"] = 16;

	
	
	
			

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

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


	$tdataexportadisponibilidade["Confirmado"] = $fdata;
		$tdataexportadisponibilidade[".searchableFields"][] = "Confirmado";


$tables_data["ExportaDisponibilidade"]=&$tdataexportadisponibilidade;
$field_labels["ExportaDisponibilidade"] = &$fieldLabelsexportadisponibilidade;
$fieldToolTips["ExportaDisponibilidade"] = &$fieldToolTipsexportadisponibilidade;
$placeHolders["ExportaDisponibilidade"] = &$placeHoldersexportadisponibilidade;
$page_titles["ExportaDisponibilidade"] = &$pageTitlesexportadisponibilidade;

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

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



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


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










function createSqlQuery_exportadisponibilidade()
{
$proto1=array();
$proto1["m_strHead"] = "SELECT";
$proto1["m_strFieldList"] = "`Assegnatos`.`Marza`,  `Assegnatos`.`Varieta`,  `Assegnatos`.`Totale`,  SUM(`Vinha`.`Quantidade`) AS `Quantidade Vendida`,  COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0)) AS `Stock`,  `Assegnatos`.`Talea`,  `Assegnatos`.`Clone`,  `Vinha`.`Confirmado`";
$proto1["m_strFrom"] = "FROM `Vinha`  LEFT OUTER JOIN `Assegnatos` ON `Vinha`.`CodPlanta` = `Assegnatos`.`Codice`";
$proto1["m_strWhere"] = "";
$proto1["m_strOrderBy"] = "";
	
		;
			$proto1["cipherer"] = null;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto3["m_column"]=$obj;
$proto3["m_contained"] = array();
$proto3["m_strCase"] = "";
$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" => "Marza",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "ExportaDisponibilidade"
));

$proto7["m_sql"] = "`Assegnatos`.`Marza`";
$proto7["m_srcTableName"] = "ExportaDisponibilidade";
$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

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

$proto9["m_sql"] = "`Assegnatos`.`Varieta`";
$proto9["m_srcTableName"] = "ExportaDisponibilidade";
$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

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

$proto11["m_sql"] = "`Assegnatos`.`Totale`";
$proto11["m_srcTableName"] = "ExportaDisponibilidade";
$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "";
$obj = new SQLFieldListItem($proto11);

$proto1["m_fieldlist"][]=$obj;
						$proto13=array();
			$proto14=array();
$proto14["m_functiontype"] = "SQLF_SUM";
$proto14["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "ExportaDisponibilidade"
));

$proto14["m_arguments"][]=$obj;
$proto14["m_strFunctionName"] = "SUM";
$obj = new SQLFunctionCall($proto14);

$proto13["m_sql"] = "SUM(`Vinha`.`Quantidade`)";
$proto13["m_srcTableName"] = "ExportaDisponibilidade";
$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "Quantidade Vendida";
$obj = new SQLFieldListItem($proto13);

$proto1["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0))"
));

$proto16["m_sql"] = "COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0))";
$proto16["m_srcTableName"] = "ExportaDisponibilidade";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "Stock";
$obj = new SQLFieldListItem($proto16);

$proto1["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "Talea",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "ExportaDisponibilidade"
));

$proto18["m_sql"] = "`Assegnatos`.`Talea`";
$proto18["m_srcTableName"] = "ExportaDisponibilidade";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

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

$proto20["m_sql"] = "`Assegnatos`.`Clone`";
$proto20["m_srcTableName"] = "ExportaDisponibilidade";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

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

$proto22["m_sql"] = "`Vinha`.`Confirmado`";
$proto22["m_srcTableName"] = "ExportaDisponibilidade";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

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

$proto24["m_table"] = $obj;
$proto24["m_sql"] = "`Vinha`";
$proto24["m_alias"] = "";
$proto24["m_srcTableName"] = "ExportaDisponibilidade";
$proto26=array();
$proto26["m_sql"] = "";
$proto26["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto1["m_fromlist"][]=$obj;
												$proto28=array();
$proto28["m_link"] = "SQLL_LEFTJOIN";
			$proto29=array();
$proto29["m_strName"] = "Assegnatos";
$proto29["m_srcTableName"] = "ExportaDisponibilidade";
$proto29["m_columns"] = array();
$proto29["m_columns"][] = "Data";
$proto29["m_columns"][] = "Marza";
$proto29["m_columns"][] = "Talea";
$proto29["m_columns"][] = "Varieta";
$proto29["m_columns"][] = "Totale";
$proto29["m_columns"][] = "Codice";
$proto29["m_columns"][] = "Clone";
$obj = new SQLTable($proto29);

$proto28["m_table"] = $obj;
$proto28["m_sql"] = "LEFT OUTER JOIN `Assegnatos` ON `Vinha`.`CodPlanta` = `Assegnatos`.`Codice`";
$proto28["m_alias"] = "";
$proto28["m_srcTableName"] = "ExportaDisponibilidade";
$proto30=array();
$proto30["m_sql"] = "`Vinha`.`CodPlanta` = `Assegnatos`.`Codice`";
$proto30["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "CodPlanta",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "ExportaDisponibilidade"
));

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

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

$proto1["m_fromlist"][]=$obj;
$proto1["m_groupby"] = array();
												$proto32=array();
						$obj = new SQLField(array(
	"m_strName" => "Marza",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "ExportaDisponibilidade"
));

$proto32["m_column"]=$obj;
$obj = new SQLGroupByItem($proto32);

$proto1["m_groupby"][]=$obj;
												$proto34=array();
						$obj = new SQLField(array(
	"m_strName" => "Varieta",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "ExportaDisponibilidade"
));

$proto34["m_column"]=$obj;
$obj = new SQLGroupByItem($proto34);

$proto1["m_groupby"][]=$obj;
												$proto36=array();
						$obj = new SQLField(array(
	"m_strName" => "Totale",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "ExportaDisponibilidade"
));

$proto36["m_column"]=$obj;
$obj = new SQLGroupByItem($proto36);

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

	return $obj;
}
$queryData_exportadisponibilidade = createSqlQuery_exportadisponibilidade();


	
		;

								

$tdataexportadisponibilidade[".sqlquery"] = $queryData_exportadisponibilidade;

$tableEvents["ExportaDisponibilidade"] = new eventsBase;
$tdataexportadisponibilidade[".hasEvents"] = false;

?>