<?php
$tdatasuma = array();
$tdatasuma[".searchableFields"] = array();
$tdatasuma[".ShortName"] = "suma";
$tdatasuma[".OwnerID"] = "";
$tdatasuma[".OriginalTable"] = "suma";


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

//	field labels
$fieldLabelssuma = array();
$fieldToolTipssuma = array();
$pageTitlessuma = array();
$placeHolderssuma = array();

if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelssuma["Spanish"] = array();
	$fieldToolTipssuma["Spanish"] = array();
	$placeHolderssuma["Spanish"] = array();
	$pageTitlessuma["Spanish"] = array();
	$fieldLabelssuma["Spanish"]["id_premio"] = "Id Premio";
	$fieldToolTipssuma["Spanish"]["id_premio"] = "";
	$placeHolderssuma["Spanish"]["id_premio"] = "";
	$fieldLabelssuma["Spanish"]["premio"] = "Premio";
	$fieldToolTipssuma["Spanish"]["premio"] = "";
	$placeHolderssuma["Spanish"]["premio"] = "";
	$fieldLabelssuma["Spanish"]["cantidad"] = "Cantidad";
	$fieldToolTipssuma["Spanish"]["cantidad"] = "";
	$placeHolderssuma["Spanish"]["cantidad"] = "";
	$fieldLabelssuma["Spanish"]["cantidad_entregada"] = "Cantidad Entregada";
	$fieldToolTipssuma["Spanish"]["cantidad_entregada"] = "";
	$placeHolderssuma["Spanish"]["cantidad_entregada"] = "";
	$fieldLabelssuma["Spanish"]["saldo"] = "Saldo";
	$fieldToolTipssuma["Spanish"]["saldo"] = "";
	$placeHolderssuma["Spanish"]["saldo"] = "";
	if (count($fieldToolTipssuma["Spanish"]))
		$tdatasuma[".isUseToolTips"] = true;
}


	$tdatasuma[".NCSearch"] = true;



$tdatasuma[".shortTableName"] = "suma";
$tdatasuma[".nSecOptions"] = 0;

$tdatasuma[".mainTableOwnerID"] = "";
$tdatasuma[".entityType"] = 0;
$tdatasuma[".connId"] = "bsn_dividendos_at_localhost";


$tdatasuma[".strOriginalTableName"] = "suma";

	



$tdatasuma[".showAddInPopup"] = false;

$tdatasuma[".showEditInPopup"] = false;

$tdatasuma[".showViewInPopup"] = false;

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

	$tdatasuma[".audit"] = false;

	$tdatasuma[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatasuma[".isUseAjaxSuggest"] = true;



																																	

$tdatasuma[".ajaxCodeSnippetAdded"] = false;

$tdatasuma[".buttonsAdded"] = false;

$tdatasuma[".addPageEvents"] = false;

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


$tdatasuma[".badgeColor"] = "E07878";


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

$tdatasuma[".googleLikeFields"] = array();
$tdatasuma[".googleLikeFields"][] = "cantidad";
$tdatasuma[".googleLikeFields"][] = "cantidad_entregada";
$tdatasuma[".googleLikeFields"][] = "id_premio";
$tdatasuma[".googleLikeFields"][] = "premio";
$tdatasuma[".googleLikeFields"][] = "saldo";



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

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

$tdatasuma[".nPrinterSplitRecords"] = 40;

$tdatasuma[".geocodingEnabled"] = false;










$tdatasuma[".pageSize"] = 20;

$tdatasuma[".warnLeavingPages"] = true;



$tstrOrderBy = "";
$tdatasuma[".strOrderBy"] = $tstrOrderBy;

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


$tdatasuma[".sqlHead"] = "SELECT cantidad,  	cantidad_entregada,  	id_premio,  	premio,  	saldo";
$tdatasuma[".sqlFrom"] = "FROM suma";
$tdatasuma[".sqlWhereExpr"] = "";
$tdatasuma[".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;
$tdatasuma[".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;
$tdatasuma[".arrGroupsPerPage"] = $arrGPP;

$tdatasuma[".highlightSearchResults"] = true;

$tableKeyssuma = array();
$tdatasuma[".Keys"] = $tableKeyssuma;


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




//	cantidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "cantidad";
	$fdata["GoodName"] = "cantidad";
	$fdata["ownerTable"] = "suma";
	$fdata["Label"] = GetFieldLabel("suma","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"]["view"] = $vdata;
//  End View Formats

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

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

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


	
	



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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasuma["cantidad"] = $fdata;
		$tdatasuma[".searchableFields"][] = "cantidad";
//	cantidad_entregada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "cantidad_entregada";
	$fdata["GoodName"] = "cantidad_entregada";
	$fdata["ownerTable"] = "suma";
	$fdata["Label"] = GetFieldLabel("suma","cantidad_entregada");
	$fdata["FieldType"] = 20;


	
	
			

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

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasuma["cantidad_entregada"] = $fdata;
		$tdatasuma[".searchableFields"][] = "cantidad_entregada";
//	id_premio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "id_premio";
	$fdata["GoodName"] = "id_premio";
	$fdata["ownerTable"] = "suma";
	$fdata["Label"] = GetFieldLabel("suma","id_premio");
	$fdata["FieldType"] = 3;


	
	
			

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

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasuma["id_premio"] = $fdata;
		$tdatasuma[".searchableFields"][] = "id_premio";
//	premio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "premio";
	$fdata["GoodName"] = "premio";
	$fdata["ownerTable"] = "suma";
	$fdata["Label"] = GetFieldLabel("suma","premio");
	$fdata["FieldType"] = 200;


	
	
			

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

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasuma["premio"] = $fdata;
		$tdatasuma[".searchableFields"][] = "premio";
//	saldo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "saldo";
	$fdata["GoodName"] = "saldo";
	$fdata["ownerTable"] = "suma";
	$fdata["Label"] = GetFieldLabel("suma","saldo");
	$fdata["FieldType"] = 14;


	
	
			

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

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

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

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

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

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

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


	
	



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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasuma["saldo"] = $fdata;
		$tdatasuma[".searchableFields"][] = "saldo";


$tables_data["suma"]=&$tdatasuma;
$field_labels["suma"] = &$fieldLabelssuma;
$fieldToolTips["suma"] = &$fieldToolTipssuma;
$placeHolders["suma"] = &$placeHolderssuma;
$page_titles["suma"] = &$pageTitlessuma;


changeTextControlsToDate( "suma" );

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

//if !@TABLE.bReportCrossTab

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

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



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



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











function createSqlQuery_suma()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "cantidad,  	cantidad_entregada,  	id_premio,  	premio,  	saldo";
$proto0["m_strFrom"] = "FROM suma";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$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" => "cantidad",
	"m_strTable" => "suma",
	"m_srcTableName" => "suma"
));

$proto6["m_sql"] = "cantidad";
$proto6["m_srcTableName"] = "suma";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

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

$proto8["m_sql"] = "cantidad_entregada";
$proto8["m_srcTableName"] = "suma";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

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

$proto10["m_sql"] = "id_premio";
$proto10["m_srcTableName"] = "suma";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

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

$proto12["m_sql"] = "premio";
$proto12["m_srcTableName"] = "suma";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "saldo",
	"m_strTable" => "suma",
	"m_srcTableName" => "suma"
));

$proto14["m_sql"] = "saldo";
$proto14["m_srcTableName"] = "suma";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto16=array();
$proto16["m_link"] = "SQLL_MAIN";
			$proto17=array();
$proto17["m_strName"] = "suma";
$proto17["m_srcTableName"] = "suma";
$proto17["m_columns"] = array();
$proto17["m_columns"][] = "cantidad";
$proto17["m_columns"][] = "cantidad_entregada";
$proto17["m_columns"][] = "id_premio";
$proto17["m_columns"][] = "premio";
$proto17["m_columns"][] = "saldo";
$obj = new SQLTable($proto17);

$proto16["m_table"] = $obj;
$proto16["m_sql"] = "suma";
$proto16["m_alias"] = "";
$proto16["m_srcTableName"] = "suma";
$proto18=array();
$proto18["m_sql"] = "";
$proto18["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_suma = createSqlQuery_suma();


	
		;

					

$tdatasuma[".sqlquery"] = $queryData_suma;



$tdatasuma[".hasEvents"] = false;

?>