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

//	field labels
$fieldLabelsv_cliente = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsv_cliente["Spanish"] = array();
	$fieldToolTipsv_cliente["Spanish"] = array();
	$fieldLabelsv_cliente["Spanish"]["idcliente"] = "Idcliente";
	$fieldToolTipsv_cliente["Spanish"]["idcliente"] = "";
	$fieldLabelsv_cliente["Spanish"]["denominacion"] = "Denominación";
	$fieldToolTipsv_cliente["Spanish"]["denominacion"] = "";
	$fieldLabelsv_cliente["Spanish"]["ruc_ci"] = "RUC ó C.I.Nº";
	$fieldToolTipsv_cliente["Spanish"]["ruc_ci"] = "";
	$fieldLabelsv_cliente["Spanish"]["direccion"] = "Dirección";
	$fieldToolTipsv_cliente["Spanish"]["direccion"] = "";
	$fieldLabelsv_cliente["Spanish"]["idciudad"] = "Ciudad";
	$fieldToolTipsv_cliente["Spanish"]["idciudad"] = "";
	$fieldLabelsv_cliente["Spanish"]["telefono"] = "Teléfono";
	$fieldToolTipsv_cliente["Spanish"]["telefono"] = "";
	$fieldLabelsv_cliente["Spanish"]["observacion"] = "Observación";
	$fieldToolTipsv_cliente["Spanish"]["observacion"] = "";
	if (count($fieldToolTipsv_cliente["Spanish"]))
		$tdatav_cliente[".isUseToolTips"] = true;
}
	
	
	$tdatav_cliente[".NCSearch"] = true;



$tdatav_cliente[".shortTableName"] = "v_cliente";
$tdatav_cliente[".nSecOptions"] = 0;
$tdatav_cliente[".recsPerRowList"] = 1;
$tdatav_cliente[".mainTableOwnerID"] = "";
$tdatav_cliente[".moveNext"] = 1;
$tdatav_cliente[".nType"] = 1;

$tdatav_cliente[".strOriginalTableName"] = "cliente";




$tdatav_cliente[".showAddInPopup"] = false;

$tdatav_cliente[".showEditInPopup"] = false;

$tdatav_cliente[".showViewInPopup"] = false;

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

	$tdatav_cliente[".audit"] = false;

	$tdatav_cliente[".locking"] = false;

$tdatav_cliente[".inlineAdd"] = true;




$tdatav_cliente[".showSimpleSearchOptions"] = false;

$tdatav_cliente[".showSearchPanel"] = true;

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

$tdatav_cliente[".rowHighlite"] = true;

// button handlers file names

$tdatav_cliente[".addPageEvents"] = false;

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




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

$tdatav_cliente[".allSearchFields"][] = "idcliente";
$tdatav_cliente[".allSearchFields"][] = "denominacion";
$tdatav_cliente[".allSearchFields"][] = "ruc_ci";
$tdatav_cliente[".allSearchFields"][] = "direccion";
$tdatav_cliente[".allSearchFields"][] = "idciudad";
$tdatav_cliente[".allSearchFields"][] = "telefono";
$tdatav_cliente[".allSearchFields"][] = "observacion";

$tdatav_cliente[".googleLikeFields"][] = "idcliente";
$tdatav_cliente[".googleLikeFields"][] = "denominacion";
$tdatav_cliente[".googleLikeFields"][] = "ruc_ci";
$tdatav_cliente[".googleLikeFields"][] = "direccion";
$tdatav_cliente[".googleLikeFields"][] = "idciudad";
$tdatav_cliente[".googleLikeFields"][] = "telefono";
$tdatav_cliente[".googleLikeFields"][] = "observacion";


$tdatav_cliente[".advSearchFields"][] = "idcliente";
$tdatav_cliente[".advSearchFields"][] = "denominacion";
$tdatav_cliente[".advSearchFields"][] = "ruc_ci";
$tdatav_cliente[".advSearchFields"][] = "direccion";
$tdatav_cliente[".advSearchFields"][] = "idciudad";
$tdatav_cliente[".advSearchFields"][] = "telefono";
$tdatav_cliente[".advSearchFields"][] = "observacion";

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

	



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



$tdatav_cliente[".pageSize"] = 20;

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

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

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

$tableKeysv_cliente = array();
$tableKeysv_cliente[] = "idcliente";
$tdatav_cliente[".Keys"] = $tableKeysv_cliente;

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

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

$tdatav_cliente[".addFields"] = array();

$tdatav_cliente[".inlineAddFields"] = array();
$tdatav_cliente[".inlineAddFields"][] = "denominacion";
$tdatav_cliente[".inlineAddFields"][] = "ruc_ci";
$tdatav_cliente[".inlineAddFields"][] = "direccion";
$tdatav_cliente[".inlineAddFields"][] = "idciudad";
$tdatav_cliente[".inlineAddFields"][] = "telefono";
$tdatav_cliente[".inlineAddFields"][] = "observacion";

$tdatav_cliente[".editFields"] = array();

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

$tdatav_cliente[".exportFields"] = array();

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

//	idcliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idcliente";
	$fdata["GoodName"] = "idcliente";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "Idcliente"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idcliente"; 
		$fdata["FullName"] = "idcliente";
	
		
		
				$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;
	
		
		
	$tdatav_cliente["idcliente"] = $fdata;
//	denominacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "denominacion";
	$fdata["GoodName"] = "denominacion";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "Denominación"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = 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=60";
	
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_cliente["denominacion"] = $fdata;
//	ruc_ci
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "ruc_ci";
	$fdata["GoodName"] = "ruc_ci";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "RUC ó C.I.Nº"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = 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["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=15";
	
		$edata["inputStyle"] = " width:100px;";
	$edata["controlWidth"] = 100;
	
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_cliente["ruc_ci"] = $fdata;
//	direccion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "direccion";
	$fdata["GoodName"] = "direccion";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "Dirección"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = 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=60";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_cliente["direccion"] = $fdata;
//	idciudad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "idciudad";
	$fdata["GoodName"] = "idciudad";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "Ciudad"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = 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;
	
		
		
	$tdatav_cliente["idciudad"] = $fdata;
//	telefono
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "telefono";
	$fdata["GoodName"] = "telefono";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "Teléfono"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "telefono"; 
		$fdata["FullName"] = "telefono";
	
		
		
				$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=45";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_cliente["telefono"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "cliente";
	$fdata["Label"] = "Observación"; 
	$fdata["FieldType"] = 201;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = 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;
	
		
		
	$tdatav_cliente["observacion"] = $fdata;

	
$tables_data["v_cliente"]=&$tdatav_cliente;
$field_labels["v_cliente"] = &$fieldLabelsv_cliente;
$fieldToolTips["v_cliente"] = &$fieldToolTipsv_cliente;

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

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

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










function createSqlQuery_v_cliente()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idcliente,   denominacion,   ruc_ci,   direccion,   idciudad,   telefono,   observacion";
$proto0["m_strFrom"] = "FROM cliente";
$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" => "idcliente",
	"m_strTable" => "cliente"
));

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto19=array();
$proto19["m_link"] = "SQLL_MAIN";
			$proto20=array();
$proto20["m_strName"] = "cliente";
$proto20["m_columns"] = array();
$proto20["m_columns"][] = "idcliente";
$proto20["m_columns"][] = "denominacion";
$proto20["m_columns"][] = "ruc_ci";
$proto20["m_columns"][] = "direccion";
$proto20["m_columns"][] = "idciudad";
$proto20["m_columns"][] = "telefono";
$proto20["m_columns"][] = "observacion";
$obj = new SQLTable($proto20);

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

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

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

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

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

$tableEvents["v_cliente"] = new eventsBase;
$tdatav_cliente[".hasEvents"] = false;

$cipherer = new RunnerCipherer("v_cliente");

?>