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

//	field labels
$fieldLabelsbeneficiario = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsbeneficiario["Spanish"] = array();
	$fieldToolTipsbeneficiario["Spanish"] = array();
	$fieldLabelsbeneficiario["Spanish"]["idbeneficiario"] = "Idbeneficiario";
	$fieldToolTipsbeneficiario["Spanish"]["idbeneficiario"] = "";
	$fieldLabelsbeneficiario["Spanish"]["denominacion"] = "Denominación";
	$fieldToolTipsbeneficiario["Spanish"]["denominacion"] = "";
	$fieldLabelsbeneficiario["Spanish"]["ruc_ci"] = "RUC ó C.I.Nº";
	$fieldToolTipsbeneficiario["Spanish"]["ruc_ci"] = "";
	$fieldLabelsbeneficiario["Spanish"]["direccion"] = "Dirección";
	$fieldToolTipsbeneficiario["Spanish"]["direccion"] = "";
	$fieldLabelsbeneficiario["Spanish"]["idciudad"] = "Ciudad";
	$fieldToolTipsbeneficiario["Spanish"]["idciudad"] = "";
	$fieldLabelsbeneficiario["Spanish"]["observacion"] = "Observación";
	$fieldToolTipsbeneficiario["Spanish"]["observacion"] = "";
	if (count($fieldToolTipsbeneficiario["Spanish"]))
		$tdatabeneficiario[".isUseToolTips"] = true;
}
	
	
	$tdatabeneficiario[".NCSearch"] = true;



$tdatabeneficiario[".shortTableName"] = "beneficiario";
$tdatabeneficiario[".nSecOptions"] = 0;
$tdatabeneficiario[".recsPerRowList"] = 1;
$tdatabeneficiario[".mainTableOwnerID"] = "";
$tdatabeneficiario[".moveNext"] = 1;
$tdatabeneficiario[".nType"] = 0;

$tdatabeneficiario[".strOriginalTableName"] = "beneficiario";




$tdatabeneficiario[".showAddInPopup"] = true;

$tdatabeneficiario[".showEditInPopup"] = true;

$tdatabeneficiario[".showViewInPopup"] = false;

$tdatabeneficiario[".fieldsForRegister"] = array();
	
if (!isMobile())
	$tdatabeneficiario[".listAjax"] = true;
else 
	$tdatabeneficiario[".listAjax"] = false;

	$tdatabeneficiario[".audit"] = false;

	$tdatabeneficiario[".locking"] = false;

$tdatabeneficiario[".edit"] = true;
$tdatabeneficiario[".inlineAdd"] = true;

$tdatabeneficiario[".exportTo"] = true;


$tdatabeneficiario[".delete"] = true;

$tdatabeneficiario[".showSimpleSearchOptions"] = false;

$tdatabeneficiario[".showSearchPanel"] = true;

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

$tdatabeneficiario[".rowHighlite"] = true;

// button handlers file names

$tdatabeneficiario[".addPageEvents"] = false;

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




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

$tdatabeneficiario[".allSearchFields"][] = "idbeneficiario";
$tdatabeneficiario[".allSearchFields"][] = "denominacion";
$tdatabeneficiario[".allSearchFields"][] = "ruc_ci";
$tdatabeneficiario[".allSearchFields"][] = "direccion";
$tdatabeneficiario[".allSearchFields"][] = "idciudad";
$tdatabeneficiario[".allSearchFields"][] = "observacion";

$tdatabeneficiario[".googleLikeFields"][] = "idbeneficiario";
$tdatabeneficiario[".googleLikeFields"][] = "denominacion";
$tdatabeneficiario[".googleLikeFields"][] = "ruc_ci";
$tdatabeneficiario[".googleLikeFields"][] = "direccion";
$tdatabeneficiario[".googleLikeFields"][] = "idciudad";
$tdatabeneficiario[".googleLikeFields"][] = "observacion";


$tdatabeneficiario[".advSearchFields"][] = "denominacion";
$tdatabeneficiario[".advSearchFields"][] = "ruc_ci";
$tdatabeneficiario[".advSearchFields"][] = "direccion";
$tdatabeneficiario[".advSearchFields"][] = "idciudad";
$tdatabeneficiario[".advSearchFields"][] = "observacion";

$tdatabeneficiario[".isTableType"] = "list";

	



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



$tdatabeneficiario[".pageSize"] = 20;

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

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

$tdatabeneficiario[".sqlHead"] = "SELECT idbeneficiario,   denominacion,   ruc_ci,   direccion,   idciudad,   observacion";
$tdatabeneficiario[".sqlFrom"] = "FROM beneficiario";
$tdatabeneficiario[".sqlWhereExpr"] = "";
$tdatabeneficiario[".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;
$tdatabeneficiario[".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;
$tdatabeneficiario[".arrGroupsPerPage"] = $arrGPP;

$tableKeysbeneficiario = array();
$tableKeysbeneficiario[] = "idbeneficiario";
$tdatabeneficiario[".Keys"] = $tableKeysbeneficiario;

$tdatabeneficiario[".listFields"] = array();
$tdatabeneficiario[".listFields"][] = "denominacion";
$tdatabeneficiario[".listFields"][] = "ruc_ci";
$tdatabeneficiario[".listFields"][] = "direccion";
$tdatabeneficiario[".listFields"][] = "idciudad";
$tdatabeneficiario[".listFields"][] = "observacion";

$tdatabeneficiario[".viewFields"] = array();

$tdatabeneficiario[".addFields"] = array();
$tdatabeneficiario[".addFields"][] = "denominacion";
$tdatabeneficiario[".addFields"][] = "ruc_ci";
$tdatabeneficiario[".addFields"][] = "direccion";
$tdatabeneficiario[".addFields"][] = "idciudad";
$tdatabeneficiario[".addFields"][] = "observacion";

$tdatabeneficiario[".inlineAddFields"] = array();

$tdatabeneficiario[".editFields"] = array();
$tdatabeneficiario[".editFields"][] = "denominacion";
$tdatabeneficiario[".editFields"][] = "ruc_ci";
$tdatabeneficiario[".editFields"][] = "direccion";
$tdatabeneficiario[".editFields"][] = "idciudad";
$tdatabeneficiario[".editFields"][] = "observacion";

$tdatabeneficiario[".inlineEditFields"] = array();

$tdatabeneficiario[".exportFields"] = array();
$tdatabeneficiario[".exportFields"][] = "denominacion";
$tdatabeneficiario[".exportFields"][] = "ruc_ci";
$tdatabeneficiario[".exportFields"][] = "direccion";
$tdatabeneficiario[".exportFields"][] = "idciudad";
$tdatabeneficiario[".exportFields"][] = "observacion";

$tdatabeneficiario[".printFields"] = array();

//	idbeneficiario
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idbeneficiario";
	$fdata["GoodName"] = "idbeneficiario";
	$fdata["ownerTable"] = "beneficiario";
	$fdata["Label"] = "Idbeneficiario"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idbeneficiario"; 
		$fdata["FullName"] = "idbeneficiario";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $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"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatabeneficiario["idbeneficiario"] = $fdata;
//	denominacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "denominacion";
	$fdata["GoodName"] = "denominacion";
	$fdata["ownerTable"] = "beneficiario";
	$fdata["Label"] = "Denominación"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "denominacion"; 
		$fdata["FullName"] = "denominacion";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $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"] = "";
			$edata["EditParams"].= " maxlength=180";
	
		$edata["inputStyle"] = " width:180px;";
	$edata["controlWidth"] = 180;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatabeneficiario["denominacion"] = $fdata;
//	ruc_ci
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "ruc_ci";
	$fdata["GoodName"] = "ruc_ci";
	$fdata["ownerTable"] = "beneficiario";
	$fdata["Label"] = "RUC ó C.I.Nº"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "ruc_ci"; 
		$fdata["FullName"] = "ruc_ci";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $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"] = "";
			$edata["EditParams"].= " maxlength=15";
	
		$edata["inputStyle"] = " width:90px;";
	$edata["controlWidth"] = 90;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatabeneficiario["ruc_ci"] = $fdata;
//	direccion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "direccion";
	$fdata["GoodName"] = "direccion";
	$fdata["ownerTable"] = "beneficiario";
	$fdata["Label"] = "Dirección"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "direccion"; 
		$fdata["FullName"] = "direccion";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $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=210";
	
		$edata["inputStyle"] = " width:210px;";
	$edata["controlWidth"] = 210;
	
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatabeneficiario["direccion"] = $fdata;
//	idciudad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "idciudad";
	$fdata["GoodName"] = "idciudad";
	$fdata["ownerTable"] = "beneficiario";
	$fdata["Label"] = "Ciudad"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idciudad"; 
		$fdata["FullName"] = "idciudad";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $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"] = "idciudad";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nombre";
	
		
	$edata["LookupTable"] = "ciudad";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		$edata["AllowToAdd"] = true; 
	
				
	
	
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatabeneficiario["idciudad"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "beneficiario";
	$fdata["Label"] = "Observación"; 
	$fdata["FieldType"] = 201;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "observacion"; 
		$fdata["FullName"] = "observacion";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $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"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatabeneficiario["observacion"] = $fdata;

	
$tables_data["beneficiario"]=&$tdatabeneficiario;
$field_labels["beneficiario"] = &$fieldLabelsbeneficiario;
$fieldToolTips["beneficiario"] = &$fieldToolTipsbeneficiario;

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

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

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










function createSqlQuery_beneficiario()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idbeneficiario,   denominacion,   ruc_ci,   direccion,   idciudad,   observacion";
$proto0["m_strFrom"] = "FROM beneficiario";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto1["m_column"]=$obj;
$proto1["m_contained"] = array();
$proto1["m_strCase"] = "";
$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" => "idbeneficiario",
	"m_strTable" => "beneficiario"
));

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto17=array();
$proto17["m_link"] = "SQLL_MAIN";
			$proto18=array();
$proto18["m_strName"] = "beneficiario";
$proto18["m_columns"] = array();
$proto18["m_columns"][] = "idbeneficiario";
$proto18["m_columns"][] = "denominacion";
$proto18["m_columns"][] = "ruc_ci";
$proto18["m_columns"][] = "direccion";
$proto18["m_columns"][] = "idciudad";
$proto18["m_columns"][] = "observacion";
$obj = new SQLTable($proto18);

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

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

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

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

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

$tableEvents["beneficiario"] = new eventsBase;
$tdatabeneficiario[".hasEvents"] = false;

$cipherer = new RunnerCipherer("beneficiario");

?>