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

//	field labels
$fieldLabelsv_articulo = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsv_articulo["Spanish"] = array();
	$fieldToolTipsv_articulo["Spanish"] = array();
	$fieldLabelsv_articulo["Spanish"]["idarticulo"] = "Idarticulo";
	$fieldToolTipsv_articulo["Spanish"]["idarticulo"] = "";
	$fieldLabelsv_articulo["Spanish"]["codigo"] = "Código";
	$fieldToolTipsv_articulo["Spanish"]["codigo"] = "";
	$fieldLabelsv_articulo["Spanish"]["idcategoria"] = "Categoria";
	$fieldToolTipsv_articulo["Spanish"]["idcategoria"] = "";
	$fieldLabelsv_articulo["Spanish"]["idsubcategoria"] = "Sub Categoria";
	$fieldToolTipsv_articulo["Spanish"]["idsubcategoria"] = "";
	$fieldLabelsv_articulo["Spanish"]["nombre"] = "Nombre";
	$fieldToolTipsv_articulo["Spanish"]["nombre"] = "";
	$fieldLabelsv_articulo["Spanish"]["stock"] = "Stock";
	$fieldToolTipsv_articulo["Spanish"]["stock"] = "";
	$fieldLabelsv_articulo["Spanish"]["observacion"] = "Observación";
	$fieldToolTipsv_articulo["Spanish"]["observacion"] = "";
	$fieldLabelsv_articulo["Spanish"]["costo"] = "Costo";
	$fieldToolTipsv_articulo["Spanish"]["costo"] = "";
	$fieldLabelsv_articulo["Spanish"]["precio"] = "Precio";
	$fieldToolTipsv_articulo["Spanish"]["precio"] = "";
	$fieldLabelsv_articulo["Spanish"]["fecha_carga"] = "Fecha Carga";
	$fieldToolTipsv_articulo["Spanish"]["fecha_carga"] = "";
	$fieldLabelsv_articulo["Spanish"]["idproveedor"] = "Proveedor";
	$fieldToolTipsv_articulo["Spanish"]["idproveedor"] = "";
	$fieldLabelsv_articulo["Spanish"]["prefijo_cod"] = "Prefijo Cod";
	$fieldToolTipsv_articulo["Spanish"]["prefijo_cod"] = "";
	$fieldLabelsv_articulo["Spanish"]["sufijo_cod"] = "Sufijo código";
	$fieldToolTipsv_articulo["Spanish"]["sufijo_cod"] = "";
	$fieldLabelsv_articulo["Spanish"]["ult_cod_generado"] = "Ult Cod Generado";
	$fieldToolTipsv_articulo["Spanish"]["ult_cod_generado"] = "";
	$fieldLabelsv_articulo["Spanish"]["cod_nombre"] = "Cod Nombre";
	$fieldToolTipsv_articulo["Spanish"]["cod_nombre"] = "";
	if (count($fieldToolTipsv_articulo["Spanish"]))
		$tdatav_articulo[".isUseToolTips"] = true;
}
	
	



$tdatav_articulo[".shortTableName"] = "v_articulo";
$tdatav_articulo[".nSecOptions"] = 0;
$tdatav_articulo[".recsPerRowList"] = 1;
$tdatav_articulo[".mainTableOwnerID"] = "";
$tdatav_articulo[".moveNext"] = 1;
$tdatav_articulo[".nType"] = 1;

$tdatav_articulo[".strOriginalTableName"] = "articulo";




$tdatav_articulo[".showAddInPopup"] = true;

$tdatav_articulo[".showEditInPopup"] = true;

$tdatav_articulo[".showViewInPopup"] = false;

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

	$tdatav_articulo[".audit"] = false;

	$tdatav_articulo[".locking"] = false;

$tdatav_articulo[".inlineAdd"] = true;




$tdatav_articulo[".showSimpleSearchOptions"] = false;

$tdatav_articulo[".showSearchPanel"] = true;

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

$tdatav_articulo[".rowHighlite"] = true;

// button handlers file names

$tdatav_articulo[".addPageEvents"] = false;

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




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

$tdatav_articulo[".allSearchFields"][] = "cod_nombre";
$tdatav_articulo[".allSearchFields"][] = "prefijo_cod";
$tdatav_articulo[".allSearchFields"][] = "sufijo_cod";
$tdatav_articulo[".allSearchFields"][] = "ult_cod_generado";
$tdatav_articulo[".allSearchFields"][] = "idarticulo";
$tdatav_articulo[".allSearchFields"][] = "codigo";
$tdatav_articulo[".allSearchFields"][] = "costo";
$tdatav_articulo[".allSearchFields"][] = "idcategoria";
$tdatav_articulo[".allSearchFields"][] = "precio";
$tdatav_articulo[".allSearchFields"][] = "idsubcategoria";
$tdatav_articulo[".allSearchFields"][] = "nombre";
$tdatav_articulo[".allSearchFields"][] = "stock";
$tdatav_articulo[".allSearchFields"][] = "idproveedor";
$tdatav_articulo[".allSearchFields"][] = "fecha_carga";
$tdatav_articulo[".allSearchFields"][] = "observacion";

$tdatav_articulo[".googleLikeFields"][] = "codigo";
$tdatav_articulo[".googleLikeFields"][] = "nombre";
$tdatav_articulo[".googleLikeFields"][] = "idcategoria";
$tdatav_articulo[".googleLikeFields"][] = "idsubcategoria";
$tdatav_articulo[".googleLikeFields"][] = "stock";
$tdatav_articulo[".googleLikeFields"][] = "idproveedor";
$tdatav_articulo[".googleLikeFields"][] = "fecha_carga";
$tdatav_articulo[".googleLikeFields"][] = "prefijo_cod";
$tdatav_articulo[".googleLikeFields"][] = "sufijo_cod";
$tdatav_articulo[".googleLikeFields"][] = "ult_cod_generado";
$tdatav_articulo[".googleLikeFields"][] = "observacion";

$tdatav_articulo[".panelSearchFields"][] = "codigo";
$tdatav_articulo[".panelSearchFields"][] = "idcategoria";
$tdatav_articulo[".panelSearchFields"][] = "idsubcategoria";
$tdatav_articulo[".panelSearchFields"][] = "nombre";
$tdatav_articulo[".panelSearchFields"][] = "stock";
$tdatav_articulo[".panelSearchFields"][] = "idproveedor";
$tdatav_articulo[".panelSearchFields"][] = "fecha_carga";
$tdatav_articulo[".panelSearchFields"][] = "observacion";

$tdatav_articulo[".advSearchFields"][] = "prefijo_cod";
$tdatav_articulo[".advSearchFields"][] = "sufijo_cod";
$tdatav_articulo[".advSearchFields"][] = "ult_cod_generado";
$tdatav_articulo[".advSearchFields"][] = "idarticulo";
$tdatav_articulo[".advSearchFields"][] = "codigo";
$tdatav_articulo[".advSearchFields"][] = "costo";
$tdatav_articulo[".advSearchFields"][] = "idcategoria";
$tdatav_articulo[".advSearchFields"][] = "precio";
$tdatav_articulo[".advSearchFields"][] = "idsubcategoria";
$tdatav_articulo[".advSearchFields"][] = "nombre";
$tdatav_articulo[".advSearchFields"][] = "stock";
$tdatav_articulo[".advSearchFields"][] = "idproveedor";
$tdatav_articulo[".advSearchFields"][] = "fecha_carga";
$tdatav_articulo[".advSearchFields"][] = "observacion";

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

	

$tdatav_articulo[".isDisplayLoading"] = true;


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


$tdatav_articulo[".totalsFields"][] = array(
	"fName" => "stock", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => '');

$tdatav_articulo[".pageSize"] = 20;

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

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

$tdatav_articulo[".sqlHead"] = "SELECT idarticulo,  codigo,  nombre,  concat(codigo, ' ', nombre) AS cod_nombre,  idcategoria,  idsubcategoria,  costo,  precio,  stock,  idproveedor,  fecha_carga,  prefijo_cod,  sufijo_cod,  ult_cod_generado,  observacion";
$tdatav_articulo[".sqlFrom"] = "FROM articulo";
$tdatav_articulo[".sqlWhereExpr"] = "";
$tdatav_articulo[".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_articulo[".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_articulo[".arrGroupsPerPage"] = $arrGPP;

$tableKeysv_articulo = array();
$tableKeysv_articulo[] = "idarticulo";
$tdatav_articulo[".Keys"] = $tableKeysv_articulo;

$tdatav_articulo[".listFields"] = array();
$tdatav_articulo[".listFields"][] = "nombre";
$tdatav_articulo[".listFields"][] = "prefijo_cod";
$tdatav_articulo[".listFields"][] = "sufijo_cod";
$tdatav_articulo[".listFields"][] = "codigo";
$tdatav_articulo[".listFields"][] = "idcategoria";
$tdatav_articulo[".listFields"][] = "idsubcategoria";
$tdatav_articulo[".listFields"][] = "stock";
$tdatav_articulo[".listFields"][] = "costo";
$tdatav_articulo[".listFields"][] = "precio";
$tdatav_articulo[".listFields"][] = "idproveedor";
$tdatav_articulo[".listFields"][] = "fecha_carga";
$tdatav_articulo[".listFields"][] = "observacion";

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

$tdatav_articulo[".addFields"] = array();
$tdatav_articulo[".addFields"][] = "nombre";
$tdatav_articulo[".addFields"][] = "idcategoria";
$tdatav_articulo[".addFields"][] = "idsubcategoria";
$tdatav_articulo[".addFields"][] = "stock";
$tdatav_articulo[".addFields"][] = "costo";
$tdatav_articulo[".addFields"][] = "precio";
$tdatav_articulo[".addFields"][] = "idproveedor";
$tdatav_articulo[".addFields"][] = "fecha_carga";
$tdatav_articulo[".addFields"][] = "prefijo_cod";
$tdatav_articulo[".addFields"][] = "sufijo_cod";
$tdatav_articulo[".addFields"][] = "observacion";

$tdatav_articulo[".inlineAddFields"] = array();
$tdatav_articulo[".inlineAddFields"][] = "nombre";
$tdatav_articulo[".inlineAddFields"][] = "prefijo_cod";
$tdatav_articulo[".inlineAddFields"][] = "sufijo_cod";
$tdatav_articulo[".inlineAddFields"][] = "idcategoria";
$tdatav_articulo[".inlineAddFields"][] = "idsubcategoria";
$tdatav_articulo[".inlineAddFields"][] = "stock";
$tdatav_articulo[".inlineAddFields"][] = "costo";
$tdatav_articulo[".inlineAddFields"][] = "precio";
$tdatav_articulo[".inlineAddFields"][] = "idproveedor";
$tdatav_articulo[".inlineAddFields"][] = "fecha_carga";
$tdatav_articulo[".inlineAddFields"][] = "observacion";

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

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

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

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

//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Idarticulo"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idarticulo"; 
		$fdata["FullName"] = "idarticulo";
	
		
		
				$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_articulo["idarticulo"] = $fdata;
//	codigo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "codigo";
	$fdata["GoodName"] = "codigo";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Código"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "codigo"; 
		$fdata["FullName"] = "codigo";
	
		
		
				$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=200";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["codigo"] = $fdata;
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Nombre"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "nombre"; 
		$fdata["FullName"] = "nombre";
	
		
		
				$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:350px;";
	$edata["controlWidth"] = 350;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["nombre"] = $fdata;
//	cod_nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "cod_nombre";
	$fdata["GoodName"] = "cod_nombre";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = "Cod Nombre"; 
	$fdata["FieldType"] = 200;
	
		
		
		
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "cod_nombre"; 
		$fdata["FullName"] = "concat(codigo, ' ', nombre)";
	
		
		
				$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"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["cod_nombre"] = $fdata;
//	idcategoria
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "idcategoria";
	$fdata["GoodName"] = "idcategoria";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Categoria"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idcategoria"; 
		$fdata["FullName"] = "idcategoria";
	
		
		
				$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"] = "idcategoria";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nombre";
	
		
	$edata["LookupTable"] = "categoria";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		$edata["AllowToAdd"] = true; 
	
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["idcategoria"] = $fdata;
//	idsubcategoria
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "idsubcategoria";
	$fdata["GoodName"] = "idsubcategoria";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Sub Categoria"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idsubcategoria"; 
		$fdata["FullName"] = "idsubcategoria";
	
		
		
				$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"] = "idsubcategoria";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nombre";
	
		
	$edata["LookupTable"] = "subcategoria";
	$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_articulo["idsubcategoria"] = $fdata;
//	costo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "costo";
	$fdata["GoodName"] = "costo";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Costo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "costo"; 
		$fdata["FullName"] = "costo";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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["inputStyle"] = " width:80px;";
	$edata["controlWidth"] = 80;
	
//	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_articulo["costo"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "precio";
	$fdata["GoodName"] = "precio";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Precio"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "precio"; 
		$fdata["FullName"] = "precio";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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["inputStyle"] = " width:80px;";
	$edata["controlWidth"] = 80;
	
//	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_articulo["precio"] = $fdata;
//	stock
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "stock";
	$fdata["GoodName"] = "stock";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Stock"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "stock"; 
		$fdata["FullName"] = "stock";
	
		
		
				$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["inputStyle"] = " width:70px;";
	$edata["controlWidth"] = 70;
	
//	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_articulo["stock"] = $fdata;
//	idproveedor
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "idproveedor";
	$fdata["GoodName"] = "idproveedor";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Proveedor"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idproveedor"; 
		$fdata["FullName"] = "idproveedor";
	
		
		
				$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();
				if(strpos(GetUserPermissions("v_articulo"), 'S') !== false)
		$edata["LCType"] = 2;
	else 
		$edata["LCType"] = 0;
			
		
			
	$edata["LinkField"] = "idproveedor";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "denominacion";
	
		
	$edata["LookupTable"] = "proveedor";
	$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_articulo["idproveedor"] = $fdata;
//	fecha_carga
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "fecha_carga";
	$fdata["GoodName"] = "fecha_carga";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Fecha Carga"; 
	$fdata["FieldType"] = 7;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "fecha_carga"; 
		$fdata["FullName"] = "fecha_carga";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Short Date");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

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

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 11; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		$edata["inputStyle"] = " width:80px;";
	$edata["controlWidth"] = 80;
	
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["fecha_carga"] = $fdata;
//	prefijo_cod
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "prefijo_cod";
	$fdata["GoodName"] = "prefijo_cod";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Prefijo Cod"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "prefijo_cod"; 
		$fdata["FullName"] = "prefijo_cod";
	
		
		
				$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"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["prefijo_cod"] = $fdata;
//	sufijo_cod
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "sufijo_cod";
	$fdata["GoodName"] = "sufijo_cod";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Sufijo código"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "sufijo_cod"; 
		$fdata["FullName"] = "sufijo_cod";
	
		
		
				$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"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["sufijo_cod"] = $fdata;
//	ult_cod_generado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "ult_cod_generado";
	$fdata["GoodName"] = "ult_cod_generado";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Ult Cod Generado"; 
	$fdata["FieldType"] = 3;
	
		
		
		
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "ult_cod_generado"; 
		$fdata["FullName"] = "ult_cod_generado";
	
		
		
				$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"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatav_articulo["ult_cod_generado"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Observación"; 
	$fdata["FieldType"] = 201;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = 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_articulo["observacion"] = $fdata;

	
$tables_data["v_articulo"]=&$tdatav_articulo;
$field_labels["v_articulo"] = &$fieldLabelsv_articulo;
$fieldToolTips["v_articulo"] = &$fieldToolTipsv_articulo;

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

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

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










function createSqlQuery_v_articulo()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idarticulo,  codigo,  nombre,  concat(codigo, ' ', nombre) AS cod_nombre,  idcategoria,  idsubcategoria,  costo,  precio,  stock,  idproveedor,  fecha_carga,  prefijo_cod,  sufijo_cod,  ult_cod_generado,  observacion";
$proto0["m_strFrom"] = "FROM articulo";
$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" => "idarticulo",
	"m_strTable" => "articulo"
));

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$proto12=array();
$proto12["m_functiontype"] = "SQLF_CUSTOM";
$proto12["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "codigo"
));

$proto12["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "' '"
));

$proto12["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "nombre"
));

$proto12["m_arguments"][]=$obj;
$proto12["m_strFunctionName"] = "concat";
$obj = new SQLFunctionCall($proto12);

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

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "idcategoria",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "idsubcategoria",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "costo",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "precio",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "stock",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto26=array();
			$obj = new SQLField(array(
	"m_strName" => "idproveedor",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto28=array();
			$obj = new SQLField(array(
	"m_strName" => "fecha_carga",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto30=array();
			$obj = new SQLField(array(
	"m_strName" => "prefijo_cod",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto32=array();
			$obj = new SQLField(array(
	"m_strName" => "sufijo_cod",
	"m_strTable" => "articulo"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto34=array();
			$obj = new SQLField(array(
	"m_strName" => "ult_cod_generado",
	"m_strTable" => "articulo"
));

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto38=array();
$proto38["m_link"] = "SQLL_MAIN";
			$proto39=array();
$proto39["m_strName"] = "articulo";
$proto39["m_columns"] = array();
$proto39["m_columns"][] = "idarticulo";
$proto39["m_columns"][] = "codigo";
$proto39["m_columns"][] = "nombre";
$proto39["m_columns"][] = "idcategoria";
$proto39["m_columns"][] = "idsubcategoria";
$proto39["m_columns"][] = "costo";
$proto39["m_columns"][] = "precio";
$proto39["m_columns"][] = "stock";
$proto39["m_columns"][] = "idproveedor";
$proto39["m_columns"][] = "fecha_carga";
$proto39["m_columns"][] = "prefijo_cod";
$proto39["m_columns"][] = "sufijo_cod";
$proto39["m_columns"][] = "ult_cod_generado";
$proto39["m_columns"][] = "observacion";
$obj = new SQLTable($proto39);

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

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

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

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

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

include_once(getabspath("include/v_articulo_events.php"));
$tableEvents["v_articulo"] = new eventclass_v_articulo;
$tdatav_articulo[".hasEvents"] = true;

$cipherer = new RunnerCipherer("v_articulo");

?>