<?php
require_once(getabspath("classes/cipherer.php"));
$tdatainf_gasto = array();
	$tdatainf_gasto[".NumberOfChars"] = 80; 
	$tdatainf_gasto[".ShortName"] = "inf_gasto";
	$tdatainf_gasto[".OwnerID"] = "";
	$tdatainf_gasto[".OriginalTable"] = "gasto";

//	field labels
$fieldLabelsinf_gasto = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsinf_gasto["Spanish"] = array();
	$fieldToolTipsinf_gasto["Spanish"] = array();
	$fieldLabelsinf_gasto["Spanish"]["idgasto"] = "ID Gasto";
	$fieldToolTipsinf_gasto["Spanish"]["idgasto"] = "";
	$fieldLabelsinf_gasto["Spanish"]["idmovimiento"] = "ID Movimiento";
	$fieldToolTipsinf_gasto["Spanish"]["idmovimiento"] = "";
	$fieldLabelsinf_gasto["Spanish"]["tipo"] = "Tipo";
	$fieldToolTipsinf_gasto["Spanish"]["tipo"] = "";
	$fieldLabelsinf_gasto["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipsinf_gasto["Spanish"]["fecha"] = "";
	$fieldLabelsinf_gasto["Spanish"]["descripcion"] = "Descripción";
	$fieldToolTipsinf_gasto["Spanish"]["descripcion"] = "";
	$fieldLabelsinf_gasto["Spanish"]["total"] = "Total";
	$fieldToolTipsinf_gasto["Spanish"]["total"] = "";
	$fieldLabelsinf_gasto["Spanish"]["anulado"] = "Anulado";
	$fieldToolTipsinf_gasto["Spanish"]["anulado"] = "";
	$fieldLabelsinf_gasto["Spanish"]["idcuenta"] = "Cuenta";
	$fieldToolTipsinf_gasto["Spanish"]["idcuenta"] = "";
	$fieldLabelsinf_gasto["Spanish"]["importe"] = "Importe";
	$fieldToolTipsinf_gasto["Spanish"]["importe"] = "";
	$fieldLabelsinf_gasto["Spanish"]["idtipo_cuenta"] = "Idtipo Cuenta";
	$fieldToolTipsinf_gasto["Spanish"]["idtipo_cuenta"] = "";
	if (count($fieldToolTipsinf_gasto["Spanish"]))
		$tdatainf_gasto[".isUseToolTips"] = true;
}
	
	
	$tdatainf_gasto[".NCSearch"] = true;



$tdatainf_gasto[".shortTableName"] = "inf_gasto";
$tdatainf_gasto[".nSecOptions"] = 0;
$tdatainf_gasto[".recsPerRowList"] = 1;
$tdatainf_gasto[".mainTableOwnerID"] = "";
$tdatainf_gasto[".moveNext"] = 1;
$tdatainf_gasto[".nType"] = 2;

$tdatainf_gasto[".strOriginalTableName"] = "gasto";




$tdatainf_gasto[".showAddInPopup"] = false;

$tdatainf_gasto[".showEditInPopup"] = false;

$tdatainf_gasto[".showViewInPopup"] = false;

$tdatainf_gasto[".fieldsForRegister"] = array();
	
$tdatainf_gasto[".listAjax"] = false;

	$tdatainf_gasto[".audit"] = false;

	$tdatainf_gasto[".locking"] = false;

$tdatainf_gasto[".listIcons"] = true;
$tdatainf_gasto[".edit"] = true;
$tdatainf_gasto[".inlineEdit"] = true;
$tdatainf_gasto[".inlineAdd"] = true;
$tdatainf_gasto[".view"] = true;

$tdatainf_gasto[".exportTo"] = true;

$tdatainf_gasto[".printFriendly"] = true;

$tdatainf_gasto[".delete"] = true;

$tdatainf_gasto[".showSimpleSearchOptions"] = false;

$tdatainf_gasto[".showSearchPanel"] = true;

if (isMobile())
	$tdatainf_gasto[".isUseAjaxSuggest"] = false;
else 
	$tdatainf_gasto[".isUseAjaxSuggest"] = true;


// button handlers file names

$tdatainf_gasto[".addPageEvents"] = false;

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




$tdatainf_gasto[".allSearchFields"] = array();

$tdatainf_gasto[".allSearchFields"][] = "idgasto";
$tdatainf_gasto[".allSearchFields"][] = "idmovimiento";
$tdatainf_gasto[".allSearchFields"][] = "tipo";
$tdatainf_gasto[".allSearchFields"][] = "fecha";
$tdatainf_gasto[".allSearchFields"][] = "descripcion";
$tdatainf_gasto[".allSearchFields"][] = "total";
$tdatainf_gasto[".allSearchFields"][] = "anulado";
$tdatainf_gasto[".allSearchFields"][] = "idcuenta";
$tdatainf_gasto[".allSearchFields"][] = "importe";
$tdatainf_gasto[".allSearchFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".googleLikeFields"][] = "idgasto";
$tdatainf_gasto[".googleLikeFields"][] = "idmovimiento";
$tdatainf_gasto[".googleLikeFields"][] = "tipo";
$tdatainf_gasto[".googleLikeFields"][] = "fecha";
$tdatainf_gasto[".googleLikeFields"][] = "descripcion";
$tdatainf_gasto[".googleLikeFields"][] = "total";
$tdatainf_gasto[".googleLikeFields"][] = "anulado";
$tdatainf_gasto[".googleLikeFields"][] = "idcuenta";
$tdatainf_gasto[".googleLikeFields"][] = "importe";
$tdatainf_gasto[".googleLikeFields"][] = "idtipo_cuenta";


$tdatainf_gasto[".advSearchFields"][] = "idgasto";
$tdatainf_gasto[".advSearchFields"][] = "idmovimiento";
$tdatainf_gasto[".advSearchFields"][] = "tipo";
$tdatainf_gasto[".advSearchFields"][] = "fecha";
$tdatainf_gasto[".advSearchFields"][] = "descripcion";
$tdatainf_gasto[".advSearchFields"][] = "total";
$tdatainf_gasto[".advSearchFields"][] = "anulado";
$tdatainf_gasto[".advSearchFields"][] = "idcuenta";
$tdatainf_gasto[".advSearchFields"][] = "importe";
$tdatainf_gasto[".advSearchFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".isTableType"] = "report";

$tdatainf_gasto[".reportGroupFields"] = true;
	



// Access doesn't support subqueries from the same table as main




$tstrOrderBy = "ORDER BY gasto.idgasto DESC";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatainf_gasto[".strOrderBy"] = $tstrOrderBy;

$tdatainf_gasto[".orderindexes"] = array();
$tdatainf_gasto[".orderindexes"][] = array(1, (0 ? "ASC" : "DESC"), "gasto.idgasto");

$tdatainf_gasto[".sqlHead"] = "SELECT gasto.idgasto,  gasto.idmovimiento,  gasto.tipo,  gasto.fecha,  gasto.descripcion,  gasto.total,  gasto.anulado,  det_gasto.idcuenta,  det_gasto.importe,  det_gasto.idtipo_cuenta";
$tdatainf_gasto[".sqlFrom"] = "FROM gasto  INNER JOIN det_gasto ON gasto.idgasto = det_gasto.idgasto";
$tdatainf_gasto[".sqlWhereExpr"] = "(gasto.anulado =\"NO\")";
$tdatainf_gasto[".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;
$tdatainf_gasto[".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;
$tdatainf_gasto[".arrGroupsPerPage"] = $arrGPP;

$tableKeysinf_gasto = array();
$tableKeysinf_gasto[] = "idgasto";
$tdatainf_gasto[".Keys"] = $tableKeysinf_gasto;

$tdatainf_gasto[".listFields"] = array();
$tdatainf_gasto[".listFields"][] = "idgasto";
$tdatainf_gasto[".listFields"][] = "idmovimiento";
$tdatainf_gasto[".listFields"][] = "tipo";
$tdatainf_gasto[".listFields"][] = "fecha";
$tdatainf_gasto[".listFields"][] = "descripcion";
$tdatainf_gasto[".listFields"][] = "total";
$tdatainf_gasto[".listFields"][] = "anulado";
$tdatainf_gasto[".listFields"][] = "idcuenta";
$tdatainf_gasto[".listFields"][] = "importe";
$tdatainf_gasto[".listFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".viewFields"] = array();
$tdatainf_gasto[".viewFields"][] = "idgasto";
$tdatainf_gasto[".viewFields"][] = "idmovimiento";
$tdatainf_gasto[".viewFields"][] = "tipo";
$tdatainf_gasto[".viewFields"][] = "fecha";
$tdatainf_gasto[".viewFields"][] = "descripcion";
$tdatainf_gasto[".viewFields"][] = "total";
$tdatainf_gasto[".viewFields"][] = "anulado";
$tdatainf_gasto[".viewFields"][] = "idcuenta";
$tdatainf_gasto[".viewFields"][] = "importe";
$tdatainf_gasto[".viewFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".addFields"] = array();
$tdatainf_gasto[".addFields"][] = "idmovimiento";
$tdatainf_gasto[".addFields"][] = "tipo";
$tdatainf_gasto[".addFields"][] = "fecha";
$tdatainf_gasto[".addFields"][] = "descripcion";
$tdatainf_gasto[".addFields"][] = "total";
$tdatainf_gasto[".addFields"][] = "anulado";

$tdatainf_gasto[".inlineAddFields"] = array();
$tdatainf_gasto[".inlineAddFields"][] = "idmovimiento";
$tdatainf_gasto[".inlineAddFields"][] = "tipo";
$tdatainf_gasto[".inlineAddFields"][] = "fecha";
$tdatainf_gasto[".inlineAddFields"][] = "descripcion";
$tdatainf_gasto[".inlineAddFields"][] = "total";
$tdatainf_gasto[".inlineAddFields"][] = "anulado";
$tdatainf_gasto[".inlineAddFields"][] = "idcuenta";
$tdatainf_gasto[".inlineAddFields"][] = "importe";
$tdatainf_gasto[".inlineAddFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".editFields"] = array();
$tdatainf_gasto[".editFields"][] = "idmovimiento";
$tdatainf_gasto[".editFields"][] = "tipo";
$tdatainf_gasto[".editFields"][] = "fecha";
$tdatainf_gasto[".editFields"][] = "descripcion";
$tdatainf_gasto[".editFields"][] = "total";
$tdatainf_gasto[".editFields"][] = "anulado";

$tdatainf_gasto[".inlineEditFields"] = array();
$tdatainf_gasto[".inlineEditFields"][] = "idmovimiento";
$tdatainf_gasto[".inlineEditFields"][] = "tipo";
$tdatainf_gasto[".inlineEditFields"][] = "fecha";
$tdatainf_gasto[".inlineEditFields"][] = "descripcion";
$tdatainf_gasto[".inlineEditFields"][] = "total";
$tdatainf_gasto[".inlineEditFields"][] = "anulado";
$tdatainf_gasto[".inlineEditFields"][] = "idcuenta";
$tdatainf_gasto[".inlineEditFields"][] = "importe";
$tdatainf_gasto[".inlineEditFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".exportFields"] = array();
$tdatainf_gasto[".exportFields"][] = "idgasto";
$tdatainf_gasto[".exportFields"][] = "idmovimiento";
$tdatainf_gasto[".exportFields"][] = "tipo";
$tdatainf_gasto[".exportFields"][] = "fecha";
$tdatainf_gasto[".exportFields"][] = "descripcion";
$tdatainf_gasto[".exportFields"][] = "total";
$tdatainf_gasto[".exportFields"][] = "anulado";
$tdatainf_gasto[".exportFields"][] = "idcuenta";
$tdatainf_gasto[".exportFields"][] = "importe";
$tdatainf_gasto[".exportFields"][] = "idtipo_cuenta";

$tdatainf_gasto[".printFields"] = array();
$tdatainf_gasto[".printFields"][] = "idgasto";
$tdatainf_gasto[".printFields"][] = "idmovimiento";
$tdatainf_gasto[".printFields"][] = "tipo";
$tdatainf_gasto[".printFields"][] = "fecha";
$tdatainf_gasto[".printFields"][] = "descripcion";
$tdatainf_gasto[".printFields"][] = "total";
$tdatainf_gasto[".printFields"][] = "anulado";
$tdatainf_gasto[".printFields"][] = "idcuenta";
$tdatainf_gasto[".printFields"][] = "importe";
$tdatainf_gasto[".printFields"][] = "idtipo_cuenta";

//	idgasto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idgasto";
	$fdata["GoodName"] = "idgasto";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "ID Gasto"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idgasto"; 
		$fdata["FullName"] = "gasto.idgasto";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["idgasto"] = $fdata;
//	idmovimiento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "idmovimiento";
	$fdata["GoodName"] = "idmovimiento";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "ID Movimiento"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idmovimiento"; 
		$fdata["FullName"] = "gasto.idmovimiento";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["idmovimiento"] = $fdata;
//	tipo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "tipo";
	$fdata["GoodName"] = "tipo";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "Tipo"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "tipo"; 
		$fdata["FullName"] = "gasto.tipo";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=10";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["tipo"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "fecha";
	$fdata["GoodName"] = "fecha";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "Fecha"; 
	$fdata["FieldType"] = 7;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "fecha"; 
		$fdata["FullName"] = "gasto.fecha";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Short Date");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Date");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 13; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["fecha"] = $fdata;
//	descripcion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "descripcion";
	$fdata["GoodName"] = "descripcion";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "Descripción"; 
	$fdata["FieldType"] = 201;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "descripcion"; 
		$fdata["FullName"] = "gasto.descripcion";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text area");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
				$edata["nRows"] = 100;
			$edata["nCols"] = 200;
	
		
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["descripcion"] = $fdata;
//	total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "total";
	$fdata["GoodName"] = "total";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "Total"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "total"; 
		$fdata["FullName"] = "gasto.total";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["total"] = $fdata;
//	anulado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "anulado";
	$fdata["GoodName"] = "anulado";
	$fdata["ownerTable"] = "gasto";
	$fdata["Label"] = "Anulado"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "anulado"; 
		$fdata["FullName"] = "gasto.anulado";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=2";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["anulado"] = $fdata;
//	idcuenta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "idcuenta";
	$fdata["GoodName"] = "idcuenta";
	$fdata["ownerTable"] = "det_gasto";
	$fdata["Label"] = "Cuenta"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idcuenta"; 
		$fdata["FullName"] = "det_gasto.idcuenta";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "idcuenta";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "denominacion";
	
		
	$edata["LookupTable"] = "cuenta";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["idcuenta"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "importe";
	$fdata["GoodName"] = "importe";
	$fdata["ownerTable"] = "det_gasto";
	$fdata["Label"] = "Importe"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "importe"; 
		$fdata["FullName"] = "det_gasto.importe";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["importe"] = $fdata;
//	idtipo_cuenta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "idtipo_cuenta";
	$fdata["GoodName"] = "idtipo_cuenta";
	$fdata["ownerTable"] = "det_gasto";
	$fdata["Label"] = "Idtipo Cuenta"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idtipo_cuenta"; 
		$fdata["FullName"] = "det_gasto.idtipo_cuenta";
	
		
		
				
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Text field");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_gasto["idtipo_cuenta"] = $fdata;

	
$tables_data["inf_gasto"]=&$tdatainf_gasto;
$field_labels["inf_gasto"] = &$fieldLabelsinf_gasto;
$fieldToolTips["inf_gasto"] = &$fieldToolTipsinf_gasto;

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

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

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










function createSqlQuery_inf_gasto()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "gasto.idgasto,  gasto.idmovimiento,  gasto.tipo,  gasto.fecha,  gasto.descripcion,  gasto.total,  gasto.anulado,  det_gasto.idcuenta,  det_gasto.importe,  det_gasto.idtipo_cuenta";
$proto0["m_strFrom"] = "FROM gasto  INNER JOIN det_gasto ON gasto.idgasto = det_gasto.idgasto";
$proto0["m_strWhere"] = "(gasto.anulado =\"NO\")";
$proto0["m_strOrderBy"] = "ORDER BY gasto.idgasto DESC";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "gasto.anulado =\"NO\"";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "anulado",
	"m_strTable" => "gasto"
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "=\"NO\"";
$proto1["m_havingmode"] = "0";
$proto1["m_inBrackets"] = "0";
$proto1["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto1);

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "idgasto",
	"m_strTable" => "gasto"
));

$proto5["m_expr"]=$obj;
$proto5["m_alias"] = "";
$obj = new SQLFieldListItem($proto5);

$proto0["m_fieldlist"][]=$obj;
						$proto7=array();
			$obj = new SQLField(array(
	"m_strName" => "idmovimiento",
	"m_strTable" => "gasto"
));

$proto7["m_expr"]=$obj;
$proto7["m_alias"] = "";
$obj = new SQLFieldListItem($proto7);

$proto0["m_fieldlist"][]=$obj;
						$proto9=array();
			$obj = new SQLField(array(
	"m_strName" => "tipo",
	"m_strTable" => "gasto"
));

$proto9["m_expr"]=$obj;
$proto9["m_alias"] = "";
$obj = new SQLFieldListItem($proto9);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$obj = new SQLField(array(
	"m_strName" => "fecha",
	"m_strTable" => "gasto"
));

$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "descripcion",
	"m_strTable" => "gasto"
));

$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "total",
	"m_strTable" => "gasto"
));

$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "anulado",
	"m_strTable" => "gasto"
));

$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "idcuenta",
	"m_strTable" => "det_gasto"
));

$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
						$proto21=array();
			$obj = new SQLField(array(
	"m_strName" => "importe",
	"m_strTable" => "det_gasto"
));

$proto21["m_expr"]=$obj;
$proto21["m_alias"] = "";
$obj = new SQLFieldListItem($proto21);

$proto0["m_fieldlist"][]=$obj;
						$proto23=array();
			$obj = new SQLField(array(
	"m_strName" => "idtipo_cuenta",
	"m_strTable" => "det_gasto"
));

$proto23["m_expr"]=$obj;
$proto23["m_alias"] = "";
$obj = new SQLFieldListItem($proto23);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto25=array();
$proto25["m_link"] = "SQLL_MAIN";
			$proto26=array();
$proto26["m_strName"] = "gasto";
$proto26["m_columns"] = array();
$proto26["m_columns"][] = "idgasto";
$proto26["m_columns"][] = "idmovimiento";
$proto26["m_columns"][] = "tipo";
$proto26["m_columns"][] = "idconcepto";
$proto26["m_columns"][] = "fecha";
$proto26["m_columns"][] = "descripcion";
$proto26["m_columns"][] = "total";
$proto26["m_columns"][] = "anulado";
$obj = new SQLTable($proto26);

$proto25["m_table"] = $obj;
$proto25["m_alias"] = "";
$proto27=array();
$proto27["m_sql"] = "";
$proto27["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto29=array();
$proto29["m_link"] = "SQLL_INNERJOIN";
			$proto30=array();
$proto30["m_strName"] = "det_gasto";
$proto30["m_columns"] = array();
$proto30["m_columns"][] = "iddet_gasto";
$proto30["m_columns"][] = "idgasto";
$proto30["m_columns"][] = "idcuenta";
$proto30["m_columns"][] = "idtipo_cuenta";
$proto30["m_columns"][] = "importe";
$proto30["m_columns"][] = "anulado";
$obj = new SQLTable($proto30);

$proto29["m_table"] = $obj;
$proto29["m_alias"] = "";
$proto31=array();
$proto31["m_sql"] = "gasto.idgasto = det_gasto.idgasto";
$proto31["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "idgasto",
	"m_strTable" => "gasto"
));

$proto31["m_column"]=$obj;
$proto31["m_contained"] = array();
$proto31["m_strCase"] = "= det_gasto.idgasto";
$proto31["m_havingmode"] = "0";
$proto31["m_inBrackets"] = "0";
$proto31["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto31);

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
												$proto33=array();
						$obj = new SQLField(array(
	"m_strName" => "idgasto",
	"m_strTable" => "gasto"
));

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

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

	return $obj;
}
$queryData_inf_gasto = createSqlQuery_inf_gasto();
										$tdatainf_gasto[".sqlquery"] = $queryData_inf_gasto;
	
if(isset($tdatainf_gasto["field2"])){
	$tdatainf_gasto["field2"]["LookupTable"] = "carscars_view";
	$tdatainf_gasto["field2"]["LookupOrderBy"] = "name";
	$tdatainf_gasto["field2"]["LookupType"] = 4;
	$tdatainf_gasto["field2"]["LinkField"] = "email";
	$tdatainf_gasto["field2"]["DisplayField"] = "name";
	$tdatainf_gasto[".hasCustomViewField"] = true;
}

$tableEvents["inf_gasto"] = new eventsBase;
$tdatainf_gasto[".hasEvents"] = false;

$cipherer = new RunnerCipherer("inf_gasto");

?>