<?php



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


$tdatavinha_report_talea[".pagesByType"] = my_json_decode( "{\"report\":[\"report\"],\"rprint\":[\"rprint\"],\"search\":[\"search\"]}" );
$tdatavinha_report_talea[".originalPagesByType"] = $tdatavinha_report_talea[".pagesByType"];
$tdatavinha_report_talea[".pages"] = types2pages( my_json_decode( "{\"report\":[\"report\"],\"rprint\":[\"rprint\"],\"search\":[\"search\"]}" ) );
$tdatavinha_report_talea[".originalPages"] = $tdatavinha_report_talea[".pages"];
$tdatavinha_report_talea[".defaultPages"] = my_json_decode( "{\"report\":\"report\",\"rprint\":\"rprint\",\"search\":\"search\"}" );
$tdatavinha_report_talea[".originalDefaultPages"] = $tdatavinha_report_talea[".defaultPages"];

//	field labels
$fieldLabelsvinha_report_talea = array();
$fieldToolTipsvinha_report_talea = array();
$pageTitlesvinha_report_talea = array();
$placeHoldersvinha_report_talea = array();

if(mlang_getcurrentlang()=="Portuguese(Standard)")
{
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"] = array();
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"] = array();
	$placeHoldersvinha_report_talea["Portuguese(Standard)"] = array();
	$pageTitlesvinha_report_talea["Portuguese(Standard)"] = array();
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"]["Marza"] = "Marza";
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"]["Marza"] = "";
	$placeHoldersvinha_report_talea["Portuguese(Standard)"]["Marza"] = "";
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"]["Varieta"] = "Varieta";
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"]["Varieta"] = "";
	$placeHoldersvinha_report_talea["Portuguese(Standard)"]["Varieta"] = "";
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"]["Totale"] = "Totale";
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"]["Totale"] = "";
	$placeHoldersvinha_report_talea["Portuguese(Standard)"]["Totale"] = "";
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"]["Quantidade_Vendida"] = "Quantidade Vendida";
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"]["Quantidade_Vendida"] = "";
	$placeHoldersvinha_report_talea["Portuguese(Standard)"]["Quantidade_Vendida"] = "";
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"]["Stock"] = "Stock";
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"]["Stock"] = "";
	$placeHoldersvinha_report_talea["Portuguese(Standard)"]["Stock"] = "";
	$fieldLabelsvinha_report_talea["Portuguese(Standard)"]["Talea"] = "Talea";
	$fieldToolTipsvinha_report_talea["Portuguese(Standard)"]["Talea"] = "";
	$placeHoldersvinha_report_talea["Portuguese(Standard)"]["Talea"] = "";
	if (count($fieldToolTipsvinha_report_talea["Portuguese(Standard)"]))
		$tdatavinha_report_talea[".isUseToolTips"] = true;
}


	$tdatavinha_report_talea[".NCSearch"] = true;



$tdatavinha_report_talea[".shortTableName"] = "vinha_report_talea";
$tdatavinha_report_talea[".nSecOptions"] = 0;

$tdatavinha_report_talea[".mainTableOwnerID"] = "";
$tdatavinha_report_talea[".entityType"] = 2;

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

	



$tdatavinha_report_talea[".showAddInPopup"] = false;

$tdatavinha_report_talea[".showEditInPopup"] = false;

$tdatavinha_report_talea[".showViewInPopup"] = false;

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


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

	$tdatavinha_report_talea[".audit"] = false;

	$tdatavinha_report_talea[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatavinha_report_talea[".isUseAjaxSuggest"] = true;




			

$tdatavinha_report_talea[".ajaxCodeSnippetAdded"] = false;

$tdatavinha_report_talea[".buttonsAdded"] = false;

$tdatavinha_report_talea[".addPageEvents"] = false;

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


$tdatavinha_report_talea[".badgeColor"] = "1E90FF";


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

$tdatavinha_report_talea[".googleLikeFields"] = array();
$tdatavinha_report_talea[".googleLikeFields"][] = "Marza";
$tdatavinha_report_talea[".googleLikeFields"][] = "Varieta";
$tdatavinha_report_talea[".googleLikeFields"][] = "Talea";
$tdatavinha_report_talea[".googleLikeFields"][] = "Totale";
$tdatavinha_report_talea[".googleLikeFields"][] = "Quantidade Vendida";
$tdatavinha_report_talea[".googleLikeFields"][] = "Stock";



$tdatavinha_report_talea[".tableType"] = "report";

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

$tdatavinha_report_talea[".nPrinterSplitRecords"] = 40;

$tdatavinha_report_talea[".geocodingEnabled"] = false;

//report settings
$tdatavinha_report_talea[".printReportLayout"] = 3;

$tdatavinha_report_talea[".reportPrintPartitionType"] = 1;
$tdatavinha_report_talea[".reportPrintGroupsPerPage"] = 3;
$tdatavinha_report_talea[".lowGroup"] = 2;



$tdatavinha_report_talea[".reportGroupFields"] = true;
$tdatavinha_report_talea[".pageSize"] = 999;
$tdatavinha_report_talea[".showGroupSummaryCount"] = true;
$reportGroupFieldsList = array();
$reportGroupFields = array();
	$reportGroupFieldsList []= "Marza";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "Marza";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 1;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
	$reportGroupFieldsList []= "Talea";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "Talea";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 2;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
$tdatavinha_report_talea[".reportGroupFieldsData"] = $reportGroupFields;
$tdatavinha_report_talea[".reportGroupFieldsList"] = $reportGroupFieldsList;


$tdatavinha_report_talea[".isExistTotalFields"] = true;



$tdatavinha_report_talea[".reportGlobalSummary"] = true;

$tdatavinha_report_talea[".repShowDet"] = true;

$tdatavinha_report_talea[".reportLayout"] = 3;

//end of report settings










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

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

$tdatavinha_report_talea[".sqlHead"] = "SELECT Assegnatos.Marza,  Assegnatos.Varieta,  Assegnatos.Talea,  Assegnatos.Totale,  SUM(Vinha.Quantidade) AS `Quantidade Vendida`,  COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0)) AS Stock";
$tdatavinha_report_talea[".sqlFrom"] = "FROM Vinha  LEFT OUTER JOIN Assegnatos ON Vinha.CodPlanta = Assegnatos.Codice";
$tdatavinha_report_talea[".sqlWhereExpr"] = "(Vinha.Confirmado =1)";
$tdatavinha_report_talea[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatavinha_report_talea[".arrGridTabs"] = $arrGridTabs;









//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_report_talea[".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_report_talea[".arrGroupsPerPage"] = $arrGPP;

$tdatavinha_report_talea[".highlightSearchResults"] = true;

$tableKeysvinha_report_talea = array();
$tdatavinha_report_talea[".Keys"] = $tableKeysvinha_report_talea;


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




//	Marza
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "Marza";
	$fdata["GoodName"] = "Marza";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("Vinha_Report_Talea","Marza");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
	
			// 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_report_talea["Marza"] = $fdata;
		$tdatavinha_report_talea[".searchableFields"][] = "Marza";
//	Varieta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "Varieta";
	$fdata["GoodName"] = "Varieta";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("Vinha_Report_Talea","Varieta");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
	
			// 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_report_talea["Varieta"] = $fdata;
		$tdatavinha_report_talea[".searchableFields"][] = "Varieta";
//	Talea
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "Talea";
	$fdata["GoodName"] = "Talea";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("Vinha_Report_Talea","Talea");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

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


	$tdatavinha_report_talea["Talea"] = $fdata;
		$tdatavinha_report_talea[".searchableFields"][] = "Talea";
//	Totale
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Totale";
	$fdata["GoodName"] = "Totale";
	$fdata["ownerTable"] = "Assegnatos";
	$fdata["Label"] = GetFieldLabel("Vinha_Report_Talea","Totale");
	$fdata["FieldType"] = 14;

		// report field settings
					$fdata["isTotalSum"] = true;
	// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
	
			// 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_report_talea["Totale"] = $fdata;
		$tdatavinha_report_talea[".searchableFields"][] = "Totale";
//	Quantidade Vendida
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Quantidade Vendida";
	$fdata["GoodName"] = "Quantidade_Vendida";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Vinha_Report_Talea","Quantidade_Vendida");
	$fdata["FieldType"] = 14;

		// report field settings
					$fdata["isTotalSum"] = true;
	// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
	
			// 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_report_talea["Quantidade Vendida"] = $fdata;
		$tdatavinha_report_talea[".searchableFields"][] = "Quantidade Vendida";
//	Stock
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "Stock";
	$fdata["GoodName"] = "Stock";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Vinha_Report_Talea","Stock");
	$fdata["FieldType"] = 14;

		// report field settings
					$fdata["isTotalSum"] = true;
	// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
	
			// 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_report_talea["Stock"] = $fdata;
		$tdatavinha_report_talea[".searchableFields"][] = "Stock";


$tables_data["Vinha Report Talea"]=&$tdatavinha_report_talea;
$field_labels["Vinha_Report_Talea"] = &$fieldLabelsvinha_report_talea;
$fieldToolTips["Vinha_Report_Talea"] = &$fieldToolTipsvinha_report_talea;
$placeHolders["Vinha_Report_Talea"] = &$placeHoldersvinha_report_talea;
$page_titles["Vinha_Report_Talea"] = &$pageTitlesvinha_report_talea;

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

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



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


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










function createSqlQuery_vinha_report_talea()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "Assegnatos.Marza,  Assegnatos.Varieta,  Assegnatos.Talea,  Assegnatos.Totale,  SUM(Vinha.Quantidade) AS `Quantidade Vendida`,  COALESCE(Assegnatos.Totale,0)-SUM(COALESCE(Vinha.Quantidade,0)) AS Stock";
$proto0["m_strFrom"] = "FROM Vinha  LEFT OUTER JOIN Assegnatos ON Vinha.CodPlanta = Assegnatos.Codice";
$proto0["m_strWhere"] = "(Vinha.Confirmado =1)";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "Vinha.Confirmado =1";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Confirmado",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha Report Talea"
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "Marza",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

$proto6["m_sql"] = "Assegnatos.Marza";
$proto6["m_srcTableName"] = "Vinha Report Talea";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "Varieta",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

$proto8["m_sql"] = "Assegnatos.Varieta";
$proto8["m_srcTableName"] = "Vinha Report Talea";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "Talea",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

$proto10["m_sql"] = "Assegnatos.Talea";
$proto10["m_srcTableName"] = "Vinha Report Talea";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "Totale",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

$proto12["m_sql"] = "Assegnatos.Totale";
$proto12["m_srcTableName"] = "Vinha Report Talea";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$proto15=array();
$proto15["m_functiontype"] = "SQLF_SUM";
$proto15["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha Report Talea"
));

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

$proto14["m_sql"] = "SUM(Vinha.Quantidade)";
$proto14["m_srcTableName"] = "Vinha Report Talea";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "Quantidade Vendida";
$obj = new SQLFieldListItem($proto14);

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

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

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

$proto19["m_table"] = $obj;
$proto19["m_sql"] = "Vinha";
$proto19["m_alias"] = "";
$proto19["m_srcTableName"] = "Vinha Report Talea";
$proto21=array();
$proto21["m_sql"] = "";
$proto21["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto23=array();
$proto23["m_link"] = "SQLL_LEFTJOIN";
			$proto24=array();
$proto24["m_strName"] = "Assegnatos";
$proto24["m_srcTableName"] = "Vinha Report Talea";
$proto24["m_columns"] = array();
$proto24["m_columns"][] = "Data";
$proto24["m_columns"][] = "Marza";
$proto24["m_columns"][] = "Talea";
$proto24["m_columns"][] = "Varieta";
$proto24["m_columns"][] = "Totale";
$proto24["m_columns"][] = "Codice";
$proto24["m_columns"][] = "Clone";
$obj = new SQLTable($proto24);

$proto23["m_table"] = $obj;
$proto23["m_sql"] = "LEFT OUTER JOIN Assegnatos ON Vinha.CodPlanta = Assegnatos.Codice";
$proto23["m_alias"] = "";
$proto23["m_srcTableName"] = "Vinha Report Talea";
$proto25=array();
$proto25["m_sql"] = "Vinha.CodPlanta = Assegnatos.Codice";
$proto25["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "CodPlanta",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Vinha Report Talea"
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
												$proto27=array();
						$obj = new SQLField(array(
	"m_strName" => "Marza",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

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

$proto0["m_groupby"][]=$obj;
												$proto29=array();
						$obj = new SQLField(array(
	"m_strName" => "Varieta",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

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

$proto0["m_groupby"][]=$obj;
												$proto31=array();
						$obj = new SQLField(array(
	"m_strName" => "Talea",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

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

$proto0["m_groupby"][]=$obj;
												$proto33=array();
						$obj = new SQLField(array(
	"m_strName" => "Totale",
	"m_strTable" => "Assegnatos",
	"m_srcTableName" => "Vinha Report Talea"
));

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

$proto0["m_groupby"][]=$obj;
$proto0["m_orderby"] = array();
$proto0["m_srcTableName"]="Vinha Report Talea";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_vinha_report_talea = createSqlQuery_vinha_report_talea();


	
		;

						

$tdatavinha_report_talea[".sqlquery"] = $queryData_vinha_report_talea;

$tableEvents["Vinha Report Talea"] = new eventsBase;
$tdatavinha_report_talea[".hasEvents"] = false;

?>