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

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



$tdatacliente[".shortTableName"] = "cliente";
$tdatacliente[".nSecOptions"] = 0;
$tdatacliente[".recsPerRowList"] = 1;
$tdatacliente[".mainTableOwnerID"] = "";
$tdatacliente[".moveNext"] = 1;
$tdatacliente[".nType"] = 0;

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




$tdatacliente[".showAddInPopup"] = true;

$tdatacliente[".showEditInPopup"] = true;

$tdatacliente[".showViewInPopup"] = false;

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

	$tdatacliente[".audit"] = false;

	$tdatacliente[".locking"] = false;

$tdatacliente[".edit"] = true;

$tdatacliente[".exportTo"] = true;


$tdatacliente[".delete"] = true;

$tdatacliente[".showSimpleSearchOptions"] = false;

$tdatacliente[".showSearchPanel"] = true;

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

$tdatacliente[".rowHighlite"] = true;

// button handlers file names

$tdatacliente[".addPageEvents"] = false;

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




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

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

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


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

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

	



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



$tdatacliente[".pageSize"] = 20;

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

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

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

$tableKeyscliente = array();
$tableKeyscliente[] = "idcliente";
$tdatacliente[".Keys"] = $tableKeyscliente;

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

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

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

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

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

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

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

$tdatacliente[".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["bExportPage"] = 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;
	
		
		
	$tdatacliente["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["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=60";
	
		$edata["inputStyle"] = " width:250px;";
	$edata["controlWidth"] = 250;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatacliente["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["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["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;
	
		
		
	$tdatacliente["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["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=60";
	
		$edata["inputStyle"] = " width:350px;";
	$edata["controlWidth"] = 350;
	
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatacliente["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["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;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:150px;";
	$edata["controlWidth"] = 150;
	
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatacliente["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["bAddPage"] = true; 
	
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = 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;
	
		
		
	$tdatacliente["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["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;
	
		
		
	$tdatacliente["observacion"] = $fdata;

	
$tables_data["cliente"]=&$tdatacliente;
$field_labels["cliente"] = &$fieldLabelscliente;
$fieldToolTips["cliente"] = &$fieldToolTipscliente;

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

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

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










function createSqlQuery_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_cliente = createSqlQuery_cliente();
							$tdatacliente[".sqlquery"] = $queryData_cliente;
	
if(isset($tdatacliente["field2"])){
	$tdatacliente["field2"]["LookupTable"] = "carscars_view";
	$tdatacliente["field2"]["LookupOrderBy"] = "name";
	$tdatacliente["field2"]["LookupType"] = 4;
	$tdatacliente["field2"]["LinkField"] = "email";
	$tdatacliente["field2"]["DisplayField"] = "name";
	$tdatacliente[".hasCustomViewField"] = true;
}

$tableEvents["cliente"] = new eventsBase;
$tdatacliente[".hasEvents"] = false;

$cipherer = new RunnerCipherer("cliente");

?>