<?php
$tdatapremios_fecha_report = array();
$tdatapremios_fecha_report[".searchableFields"] = array();
$tdatapremios_fecha_report[".ShortName"] = "premios_fecha_report";
$tdatapremios_fecha_report[".OwnerID"] = "";
$tdatapremios_fecha_report[".OriginalTable"] = "premios_fecha";


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

//	field labels
$fieldLabelspremios_fecha_report = array();
$fieldToolTipspremios_fecha_report = array();
$pageTitlespremios_fecha_report = array();
$placeHolderspremios_fecha_report = array();

if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelspremios_fecha_report["Spanish"] = array();
	$fieldToolTipspremios_fecha_report["Spanish"] = array();
	$placeHolderspremios_fecha_report["Spanish"] = array();
	$pageTitlespremios_fecha_report["Spanish"] = array();
	$fieldLabelspremios_fecha_report["Spanish"]["cantidad"] = "Cantidad";
	$fieldToolTipspremios_fecha_report["Spanish"]["cantidad"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["cantidad"] = "";
	$fieldLabelspremios_fecha_report["Spanish"]["detalle"] = "Detalle";
	$fieldToolTipspremios_fecha_report["Spanish"]["detalle"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["detalle"] = "";
	$fieldLabelspremios_fecha_report["Spanish"]["nombre_premio"] = "Nombre Premio";
	$fieldToolTipspremios_fecha_report["Spanish"]["nombre_premio"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["nombre_premio"] = "";
	$fieldLabelspremios_fecha_report["Spanish"]["promocion"] = "Promocion";
	$fieldToolTipspremios_fecha_report["Spanish"]["promocion"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["promocion"] = "";
	$fieldLabelspremios_fecha_report["Spanish"]["entregado"] = "Entregado";
	$fieldToolTipspremios_fecha_report["Spanish"]["entregado"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["entregado"] = "";
	$fieldLabelspremios_fecha_report["Spanish"]["saldo"] = "Saldo";
	$fieldToolTipspremios_fecha_report["Spanish"]["saldo"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["saldo"] = "";
	$fieldLabelspremios_fecha_report["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipspremios_fecha_report["Spanish"]["fecha"] = "";
	$placeHolderspremios_fecha_report["Spanish"]["fecha"] = "";
	if (count($fieldToolTipspremios_fecha_report["Spanish"]))
		$tdatapremios_fecha_report[".isUseToolTips"] = true;
}


	$tdatapremios_fecha_report[".NCSearch"] = true;



$tdatapremios_fecha_report[".shortTableName"] = "premios_fecha_report";
$tdatapremios_fecha_report[".nSecOptions"] = 0;

$tdatapremios_fecha_report[".mainTableOwnerID"] = "";
$tdatapremios_fecha_report[".entityType"] = 2;
$tdatapremios_fecha_report[".connId"] = "bsn_dividendos_at_localhost";


$tdatapremios_fecha_report[".strOriginalTableName"] = "premios_fecha";

	



$tdatapremios_fecha_report[".showAddInPopup"] = false;

$tdatapremios_fecha_report[".showEditInPopup"] = false;

$tdatapremios_fecha_report[".showViewInPopup"] = false;

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

	$tdatapremios_fecha_report[".audit"] = false;

	$tdatapremios_fecha_report[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatapremios_fecha_report[".isUseAjaxSuggest"] = true;



																																	

$tdatapremios_fecha_report[".ajaxCodeSnippetAdded"] = false;

$tdatapremios_fecha_report[".buttonsAdded"] = false;

$tdatapremios_fecha_report[".addPageEvents"] = false;

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


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


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

$tdatapremios_fecha_report[".googleLikeFields"] = array();
$tdatapremios_fecha_report[".googleLikeFields"][] = "promocion";
$tdatapremios_fecha_report[".googleLikeFields"][] = "nombre_premio";
$tdatapremios_fecha_report[".googleLikeFields"][] = "detalle";
$tdatapremios_fecha_report[".googleLikeFields"][] = "cantidad";
$tdatapremios_fecha_report[".googleLikeFields"][] = "entregado";
$tdatapremios_fecha_report[".googleLikeFields"][] = "saldo";
$tdatapremios_fecha_report[".googleLikeFields"][] = "fecha";



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

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

$tdatapremios_fecha_report[".nPrinterSplitRecords"] = 40;

$tdatapremios_fecha_report[".geocodingEnabled"] = false;

//report settings

$tdatapremios_fecha_report[".reportPrintGroupsPerPage"] = 3;
$tdatapremios_fecha_report[".reportPrintRecordsPerPage"] = 40;

$tdatapremios_fecha_report[".pageSizeGroups"] = 5;
$tdatapremios_fecha_report[".pageSizeRecords"] = 20;


//end of report settings










$tstrOrderBy = "ORDER BY nombre_premio";
$tdatapremios_fecha_report[".strOrderBy"] = $tstrOrderBy;

$tdatapremios_fecha_report[".orderindexes"] = array();
			$tdatapremios_fecha_report[".orderindexes"][] = array(2, (1 ? "ASC" : "DESC"), "nombre_premio");


$tdatapremios_fecha_report[".sqlHead"] = "SELECT nombre AS promocion,  nombre_premio,  detalle,  cantidad,  SUM(cantidad_entregado) AS entregado,  (	cantidad)-(	SUM( cantidad_entregado )) AS saldo,  fecha";
$tdatapremios_fecha_report[".sqlFrom"] = "FROM premios_fecha";
$tdatapremios_fecha_report[".sqlWhereExpr"] = "";
$tdatapremios_fecha_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;
$tdatapremios_fecha_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;
$tdatapremios_fecha_report[".arrGroupsPerPage"] = $arrGPP;

$tdatapremios_fecha_report[".highlightSearchResults"] = true;

$tableKeyspremios_fecha_report = array();
$tdatapremios_fecha_report[".Keys"] = $tableKeyspremios_fecha_report;


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




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


	
	
			

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

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

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


	$tdatapremios_fecha_report["promocion"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "promocion";
//	nombre_premio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "nombre_premio";
	$fdata["GoodName"] = "nombre_premio";
	$fdata["ownerTable"] = "premios_fecha";
	$fdata["Label"] = GetFieldLabel("premios_fecha_Report","nombre_premio");
	$fdata["FieldType"] = 200;


	
	
			

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

		$fdata["sourceSingle"] = "nombre_premio";

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

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

		$edata["maxNumberOfFiles"] = 1;

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

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=255";

		$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


	$tdatapremios_fecha_report["nombre_premio"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "nombre_premio";
//	detalle
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "detalle";
	$fdata["GoodName"] = "detalle";
	$fdata["ownerTable"] = "premios_fecha";
	$fdata["Label"] = GetFieldLabel("premios_fecha_Report","detalle");
	$fdata["FieldType"] = 200;


	
	
			

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

		$fdata["sourceSingle"] = "detalle";

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

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

		$edata["maxNumberOfFiles"] = 1;

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

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=255";

		$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


	$tdatapremios_fecha_report["detalle"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "detalle";
//	cantidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "cantidad";
	$fdata["GoodName"] = "cantidad";
	$fdata["ownerTable"] = "premios_fecha";
	$fdata["Label"] = GetFieldLabel("premios_fecha_Report","cantidad");
	$fdata["FieldType"] = 14;


	
	
			

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

		$fdata["sourceSingle"] = "cantidad";

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

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

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

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

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["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["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();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
//	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


	$tdatapremios_fecha_report["cantidad"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "cantidad";
//	entregado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "entregado";
	$fdata["GoodName"] = "entregado";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("premios_fecha_Report","entregado");
	$fdata["FieldType"] = 14;


	
	
			

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

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "SUM(cantidad_entregado)";

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

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

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

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["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["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();
				$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
		$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


	$tdatapremios_fecha_report["entregado"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "entregado";
//	saldo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "saldo";
	$fdata["GoodName"] = "saldo";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("premios_fecha_Report","saldo");
	$fdata["FieldType"] = 14;


	
	
			

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

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(	cantidad)-(	SUM( cantidad_entregado ))";

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

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

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

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["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["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();
				$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
		$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


	$tdatapremios_fecha_report["saldo"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "saldo";
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "fecha";
	$fdata["GoodName"] = "fecha";
	$fdata["ownerTable"] = "premios_fecha";
	$fdata["Label"] = GetFieldLabel("premios_fecha_Report","fecha");
	$fdata["FieldType"] = 135;


	
	
			

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

		$fdata["sourceSingle"] = "fecha";

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

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

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

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

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

		$edata["ShowTime"] = true;

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


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 2;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

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

			// the default search options list
				$fdata["searchOptionsList"] = array("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, 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


	$tdatapremios_fecha_report["fecha"] = $fdata;
		$tdatapremios_fecha_report[".searchableFields"][] = "fecha";


$tables_data["premios_fecha Report"]=&$tdatapremios_fecha_report;
$field_labels["premios_fecha_Report"] = &$fieldLabelspremios_fecha_report;
$fieldToolTips["premios_fecha_Report"] = &$fieldToolTipspremios_fecha_report;
$placeHolders["premios_fecha_Report"] = &$placeHolderspremios_fecha_report;
$page_titles["premios_fecha_Report"] = &$pageTitlespremios_fecha_report;


changeTextControlsToDate( "premios_fecha Report" );

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)

//if !@TABLE.bReportCrossTab

$detailsTablesData["premios_fecha Report"] = array();
//endif

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



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



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











function createSqlQuery_premios_fecha_report()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "nombre AS promocion,  nombre_premio,  detalle,  cantidad,  SUM(cantidad_entregado) AS entregado,  (	cantidad)-(	SUM( cantidad_entregado )) AS saldo,  fecha";
$proto0["m_strFrom"] = "FROM premios_fecha";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY nombre_premio";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto6["m_sql"] = "nombre";
$proto6["m_srcTableName"] = "premios_fecha Report";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "promocion";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "nombre_premio",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

$proto8["m_sql"] = "nombre_premio";
$proto8["m_srcTableName"] = "premios_fecha Report";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

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

$proto10["m_sql"] = "detalle";
$proto10["m_srcTableName"] = "premios_fecha Report";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

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

$proto12["m_sql"] = "cantidad";
$proto12["m_srcTableName"] = "premios_fecha Report";
$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" => "cantidad_entregado",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

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

$proto14["m_sql"] = "SUM(cantidad_entregado)";
$proto14["m_srcTableName"] = "premios_fecha Report";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "entregado";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "(	cantidad)-(	SUM( cantidad_entregado ))"
));

$proto17["m_sql"] = "(	cantidad)-(	SUM( cantidad_entregado ))";
$proto17["m_srcTableName"] = "premios_fecha Report";
$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "saldo";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "fecha",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

$proto19["m_sql"] = "fecha";
$proto19["m_srcTableName"] = "premios_fecha Report";
$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto21=array();
$proto21["m_link"] = "SQLL_MAIN";
			$proto22=array();
$proto22["m_strName"] = "premios_fecha";
$proto22["m_srcTableName"] = "premios_fecha Report";
$proto22["m_columns"] = array();
$proto22["m_columns"][] = "cantidad";
$proto22["m_columns"][] = "cantidad_entregado";
$proto22["m_columns"][] = "detalle";
$proto22["m_columns"][] = "fecha";
$proto22["m_columns"][] = "id_ganador";
$proto22["m_columns"][] = "nombre";
$proto22["m_columns"][] = "nombre_premio";
$obj = new SQLTable($proto22);

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

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
												$proto25=array();
						$obj = new SQLField(array(
	"m_strName" => "nombre",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

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

$proto0["m_groupby"][]=$obj;
												$proto27=array();
						$obj = new SQLField(array(
	"m_strName" => "nombre_premio",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

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

$proto0["m_groupby"][]=$obj;
												$proto29=array();
						$obj = new SQLField(array(
	"m_strName" => "detalle",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

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

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

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

$proto0["m_groupby"][]=$obj;
												$proto33=array();
						$obj = new SQLField(array(
	"m_strName" => "fecha",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

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

$proto0["m_groupby"][]=$obj;
$proto0["m_orderby"] = array();
												$proto35=array();
						$obj = new SQLField(array(
	"m_strName" => "nombre_premio",
	"m_strTable" => "premios_fecha",
	"m_srcTableName" => "premios_fecha Report"
));

$proto35["m_column"]=$obj;
$proto35["m_bAsc"] = 1;
$proto35["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto35);

$proto0["m_orderby"][]=$obj;					
$proto0["m_srcTableName"]="premios_fecha Report";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_premios_fecha_report = createSqlQuery_premios_fecha_report();


	
		;

							

$tdatapremios_fecha_report[".sqlquery"] = $queryData_premios_fecha_report;



$tdatapremios_fecha_report[".hasEvents"] = false;

?>