<?php



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


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

//	field labels
$fieldLabelsEntrega_Vinha_Report = array();
$fieldToolTipsEntrega_Vinha_Report = array();
$pageTitlesEntrega_Vinha_Report = array();
$placeHoldersEntrega_Vinha_Report = array();

if(mlang_getcurrentlang()=="Portuguese(Standard)")
{
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"] = array();
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"] = array();
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"] = array();
	$pageTitlesEntrega_Vinha_Report["Portuguese(Standard)"] = array();
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["NEntrega"] = "NEntrega";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["NEntrega"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["NEntrega"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["CodPHC"] = "Cod PHC";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["CodPHC"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["CodPHC"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["Nome"] = "Nome";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["Nome"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["Nome"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["CodPlanta"] = "Cod Planta";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["CodPlanta"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["CodPlanta"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["PE"] = "PE";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["PE"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["PE"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["Clone"] = "Clone";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["Clone"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["Clone"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["Codice"] = "Codice";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["Codice"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["Codice"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["Quantidade"] = "Quantidade";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["Quantidade"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["Quantidade"] = "";
	$fieldLabelsEntrega_Vinha_Report["Portuguese(Standard)"]["CodMarza"] = "Cod Marza";
	$fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]["CodMarza"] = "";
	$placeHoldersEntrega_Vinha_Report["Portuguese(Standard)"]["CodMarza"] = "";
	if (count($fieldToolTipsEntrega_Vinha_Report["Portuguese(Standard)"]))
		$tdataEntrega_Vinha_Report[".isUseToolTips"] = true;
}


	$tdataEntrega_Vinha_Report[".NCSearch"] = true;



$tdataEntrega_Vinha_Report[".shortTableName"] = "Entrega_Vinha_Report";
$tdataEntrega_Vinha_Report[".nSecOptions"] = 0;

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

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

	



$tdataEntrega_Vinha_Report[".showAddInPopup"] = false;

$tdataEntrega_Vinha_Report[".showEditInPopup"] = false;

$tdataEntrega_Vinha_Report[".showViewInPopup"] = false;

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


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

	$tdataEntrega_Vinha_Report[".audit"] = false;

	$tdataEntrega_Vinha_Report[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataEntrega_Vinha_Report[".isUseAjaxSuggest"] = true;




						

$tdataEntrega_Vinha_Report[".ajaxCodeSnippetAdded"] = false;

$tdataEntrega_Vinha_Report[".buttonsAdded"] = false;

$tdataEntrega_Vinha_Report[".addPageEvents"] = false;

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


$tdataEntrega_Vinha_Report[".badgeColor"] = "5f9ea0";


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

$tdataEntrega_Vinha_Report[".googleLikeFields"] = array();
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "NEntrega";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "CodPHC";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "Nome";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "CodPlanta";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "PE";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "Clone";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "Codice";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "Quantidade";
$tdataEntrega_Vinha_Report[".googleLikeFields"][] = "CodMarza";



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

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

$tdataEntrega_Vinha_Report[".nPrinterSplitRecords"] = 40;

$tdataEntrega_Vinha_Report[".geocodingEnabled"] = false;

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

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



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

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


$tdataEntrega_Vinha_Report[".isExistTotalFields"] = true;



$tdataEntrega_Vinha_Report[".reportGlobalSummary"] = true;

$tdataEntrega_Vinha_Report[".repShowDet"] = true;

$tdataEntrega_Vinha_Report[".reportLayout"] = 3;

//end of report settings










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

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

$tdataEntrega_Vinha_Report[".sqlHead"] = "SELECT `Vinha`.`NEntrega`,  `Clientes`.`CodPHC`,  `Clientes`.`Nome`,  `Vinha`.`CodPlanta`,  `Vinha`.`PE`,  `Vinha`.`Clone`,  `Assegnatos`.`Codice`,  `Vinha`.`Quantidade`,  `Vinha`.`CodMarza`";
$tdataEntrega_Vinha_Report[".sqlFrom"] = "FROM `Vinha`  LEFT OUTER JOIN `Assegnatos` ON `Vinha`.`CodPlanta` = `Assegnatos`.`Codice`  INNER JOIN `Clientes` ON `Vinha`.`CodCliente` = `Clientes`.`CodCliente`";
$tdataEntrega_Vinha_Report[".sqlWhereExpr"] = "(`Vinha`.`Quantidade` <>0)";
$tdataEntrega_Vinha_Report[".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;
$tdataEntrega_Vinha_Report[".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;
$tdataEntrega_Vinha_Report[".arrGroupsPerPage"] = $arrGPP;

$tdataEntrega_Vinha_Report[".highlightSearchResults"] = true;

$tableKeysEntrega_Vinha_Report = array();
$tdataEntrega_Vinha_Report[".Keys"] = $tableKeysEntrega_Vinha_Report;


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




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

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

	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`Vinha`.`NEntrega`";

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

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


	
	

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

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

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
							
	
	//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["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


	$tdataEntrega_Vinha_Report["NEntrega"] = $fdata;
		$tdataEntrega_Vinha_Report[".searchableFields"][] = "NEntrega";
//	CodPHC
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "CodPHC";
	$fdata["GoodName"] = "CodPHC";
	$fdata["ownerTable"] = "Clientes";
	$fdata["Label"] = GetFieldLabel("Entrega_Vinha_Report","CodPHC");
	$fdata["FieldType"] = 200;

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

	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`Clientes`.`CodPHC`";

	
	
				$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


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

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

	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`Clientes`.`Nome`";

	
	
				$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


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

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

	
	
			

		$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"]["report"] = $vdata;
//  End View Formats

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

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

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

	

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

	
	
	
	

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


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

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

	
	
			

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


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

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

	
	
			

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


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

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

	
	
			

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

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

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

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


	
	

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

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

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

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


	$tdataEntrega_Vinha_Report["Codice"] = $fdata;
		$tdataEntrega_Vinha_Report[".searchableFields"][] = "Codice";
//	Quantidade
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "Quantidade";
	$fdata["GoodName"] = "Quantidade";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Entrega_Vinha_Report","Quantidade");
	$fdata["FieldType"] = 14;

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

	
	
			

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


	$tdataEntrega_Vinha_Report["Quantidade"] = $fdata;
		$tdataEntrega_Vinha_Report[".searchableFields"][] = "Quantidade";
//	CodMarza
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "CodMarza";
	$fdata["GoodName"] = "CodMarza";
	$fdata["ownerTable"] = "Vinha";
	$fdata["Label"] = GetFieldLabel("Entrega_Vinha_Report","CodMarza");
	$fdata["FieldType"] = 200;

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

	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`Vinha`.`CodMarza`";

	
	
				$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["EditParams"].= " maxlength=50";

		$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


	$tdataEntrega_Vinha_Report["CodMarza"] = $fdata;
		$tdataEntrega_Vinha_Report[".searchableFields"][] = "CodMarza";


$tables_data["Entrega Vinha Report"]=&$tdataEntrega_Vinha_Report;
$field_labels["Entrega_Vinha_Report"] = &$fieldLabelsEntrega_Vinha_Report;
$fieldToolTips["Entrega_Vinha_Report"] = &$fieldToolTipsEntrega_Vinha_Report;
$placeHolders["Entrega_Vinha_Report"] = &$placeHoldersEntrega_Vinha_Report;
$page_titles["Entrega_Vinha_Report"] = &$pageTitlesEntrega_Vinha_Report;

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

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



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

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["Entrega Vinha Report"][0] = $masterParams;
				$masterTablesData["Entrega Vinha Report"][0]["masterKeys"] = array();
	$masterTablesData["Entrega Vinha Report"][0]["masterKeys"][]="CodEntrega";
				$masterTablesData["Entrega Vinha Report"][0]["detailKeys"] = array();
	$masterTablesData["Entrega Vinha Report"][0]["detailKeys"][]="NEntrega";
		
// -----------------end  prepare master-details data arrays ------------------------------//


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










function createSqlQuery_Entrega_Vinha_Report()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "`Vinha`.`NEntrega`,  `Clientes`.`CodPHC`,  `Clientes`.`Nome`,  `Vinha`.`CodPlanta`,  `Vinha`.`PE`,  `Vinha`.`Clone`,  `Assegnatos`.`Codice`,  `Vinha`.`Quantidade`,  `Vinha`.`CodMarza`";
$proto0["m_strFrom"] = "FROM `Vinha`  LEFT OUTER JOIN `Assegnatos` ON `Vinha`.`CodPlanta` = `Assegnatos`.`Codice`  INNER JOIN `Clientes` ON `Vinha`.`CodCliente` = `Clientes`.`CodCliente`";
$proto0["m_strWhere"] = "(`Vinha`.`Quantidade` <>0)";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "`Vinha`.`Quantidade` <>0";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

$proto2["m_column"]=$obj;
$proto2["m_contained"] = array();
$proto2["m_strCase"] = "<>0";
$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" => "NEntrega",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

$proto6["m_sql"] = "`Vinha`.`NEntrega`";
$proto6["m_srcTableName"] = "Entrega Vinha Report";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

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

$proto8["m_sql"] = "`Clientes`.`CodPHC`";
$proto8["m_srcTableName"] = "Entrega Vinha Report";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

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

$proto10["m_sql"] = "`Clientes`.`Nome`";
$proto10["m_srcTableName"] = "Entrega Vinha Report";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

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

$proto12["m_sql"] = "`Vinha`.`CodPlanta`";
$proto12["m_srcTableName"] = "Entrega Vinha Report";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "PE",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

$proto14["m_sql"] = "`Vinha`.`PE`";
$proto14["m_srcTableName"] = "Entrega Vinha Report";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "Clone",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

$proto16["m_sql"] = "`Vinha`.`Clone`";
$proto16["m_srcTableName"] = "Entrega Vinha Report";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

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

$proto18["m_sql"] = "`Assegnatos`.`Codice`";
$proto18["m_srcTableName"] = "Entrega Vinha Report";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "Quantidade",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

$proto20["m_sql"] = "`Vinha`.`Quantidade`";
$proto20["m_srcTableName"] = "Entrega Vinha Report";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "CodMarza",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

$proto22["m_sql"] = "`Vinha`.`CodMarza`";
$proto22["m_srcTableName"] = "Entrega Vinha Report";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto24=array();
$proto24["m_link"] = "SQLL_MAIN";
			$proto25=array();
$proto25["m_strName"] = "Vinha";
$proto25["m_srcTableName"] = "Entrega Vinha Report";
$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"] = "Entrega Vinha Report";
$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);

$proto0["m_fromlist"][]=$obj;
												$proto28=array();
$proto28["m_link"] = "SQLL_LEFTJOIN";
			$proto29=array();
$proto29["m_strName"] = "Assegnatos";
$proto29["m_srcTableName"] = "Entrega Vinha Report";
$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"] = "Entrega Vinha Report";
$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" => "Entrega Vinha Report"
));

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

$proto0["m_fromlist"][]=$obj;
												$proto32=array();
$proto32["m_link"] = "SQLL_INNERJOIN";
			$proto33=array();
$proto33["m_strName"] = "Clientes";
$proto33["m_srcTableName"] = "Entrega Vinha Report";
$proto33["m_columns"] = array();
$proto33["m_columns"][] = "CodCliente";
$proto33["m_columns"][] = "Nome";
$proto33["m_columns"][] = "Dados";
$proto33["m_columns"][] = "CodRegiao";
$proto33["m_columns"][] = "CodPHC";
$proto33["m_columns"][] = "Escolha";
$obj = new SQLTable($proto33);

$proto32["m_table"] = $obj;
$proto32["m_sql"] = "INNER JOIN `Clientes` ON `Vinha`.`CodCliente` = `Clientes`.`CodCliente`";
$proto32["m_alias"] = "";
$proto32["m_srcTableName"] = "Entrega Vinha Report";
$proto34=array();
$proto34["m_sql"] = "`Vinha`.`CodCliente` = `Clientes`.`CodCliente`";
$proto34["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "CodCliente",
	"m_strTable" => "Vinha",
	"m_srcTableName" => "Entrega Vinha Report"
));

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

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

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

	return $obj;
}
$queryData_Entrega_Vinha_Report = createSqlQuery_Entrega_Vinha_Report();


	
		;

									

$tdataEntrega_Vinha_Report[".sqlquery"] = $queryData_Entrega_Vinha_Report;

$tableEvents["Entrega Vinha Report"] = new eventsBase;
$tdataEntrega_Vinha_Report[".hasEvents"] = false;

?>