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

//	field labels
$fieldLabelsarticulo_orig = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsarticulo_orig["Spanish"] = array();
	$fieldToolTipsarticulo_orig["Spanish"] = array();
	$fieldLabelsarticulo_orig["Spanish"]["idarticulo"] = "Idarticulo";
	$fieldToolTipsarticulo_orig["Spanish"]["idarticulo"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["codigo"] = "Codigo";
	$fieldToolTipsarticulo_orig["Spanish"]["codigo"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["idgrupo"] = "Idgrupo";
	$fieldToolTipsarticulo_orig["Spanish"]["idgrupo"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["idcategoria"] = "Idcategoria";
	$fieldToolTipsarticulo_orig["Spanish"]["idcategoria"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["idsubcategoria"] = "Idsubcategoria";
	$fieldToolTipsarticulo_orig["Spanish"]["idsubcategoria"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["nombre"] = "Nombre";
	$fieldToolTipsarticulo_orig["Spanish"]["nombre"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["stock"] = "Stock";
	$fieldToolTipsarticulo_orig["Spanish"]["stock"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["proveedor"] = "Proveedor";
	$fieldToolTipsarticulo_orig["Spanish"]["proveedor"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["fecha_alta"] = "Fecha Alta";
	$fieldToolTipsarticulo_orig["Spanish"]["fecha_alta"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["costo"] = "Costo";
	$fieldToolTipsarticulo_orig["Spanish"]["costo"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["precio"] = "Precio";
	$fieldToolTipsarticulo_orig["Spanish"]["precio"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["observacion"] = "Observacion";
	$fieldToolTipsarticulo_orig["Spanish"]["observacion"] = "";
	$fieldLabelsarticulo_orig["Spanish"]["estado"] = "Estado";
	$fieldToolTipsarticulo_orig["Spanish"]["estado"] = "";
	if (count($fieldToolTipsarticulo_orig["Spanish"]))
		$tdataarticulo_orig[".isUseToolTips"] = true;
}
	
	
	$tdataarticulo_orig[".NCSearch"] = true;



$tdataarticulo_orig[".shortTableName"] = "articulo_orig";
$tdataarticulo_orig[".nSecOptions"] = 0;
$tdataarticulo_orig[".recsPerRowList"] = 1;
$tdataarticulo_orig[".mainTableOwnerID"] = "";
$tdataarticulo_orig[".moveNext"] = 1;
$tdataarticulo_orig[".nType"] = 0;

$tdataarticulo_orig[".strOriginalTableName"] = "articulo_orig";




$tdataarticulo_orig[".showAddInPopup"] = false;

$tdataarticulo_orig[".showEditInPopup"] = false;

$tdataarticulo_orig[".showViewInPopup"] = false;

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

	$tdataarticulo_orig[".audit"] = false;

	$tdataarticulo_orig[".locking"] = false;

$tdataarticulo_orig[".listIcons"] = true;




$tdataarticulo_orig[".showSimpleSearchOptions"] = false;

$tdataarticulo_orig[".showSearchPanel"] = true;

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

$tdataarticulo_orig[".rowHighlite"] = true;

// button handlers file names

$tdataarticulo_orig[".addPageEvents"] = false;

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




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

$tdataarticulo_orig[".allSearchFields"][] = "idarticulo";
$tdataarticulo_orig[".allSearchFields"][] = "codigo";
$tdataarticulo_orig[".allSearchFields"][] = "idgrupo";
$tdataarticulo_orig[".allSearchFields"][] = "idcategoria";
$tdataarticulo_orig[".allSearchFields"][] = "idsubcategoria";
$tdataarticulo_orig[".allSearchFields"][] = "nombre";
$tdataarticulo_orig[".allSearchFields"][] = "stock";
$tdataarticulo_orig[".allSearchFields"][] = "proveedor";
$tdataarticulo_orig[".allSearchFields"][] = "fecha_alta";
$tdataarticulo_orig[".allSearchFields"][] = "costo";
$tdataarticulo_orig[".allSearchFields"][] = "precio";
$tdataarticulo_orig[".allSearchFields"][] = "observacion";
$tdataarticulo_orig[".allSearchFields"][] = "estado";

$tdataarticulo_orig[".googleLikeFields"][] = "idarticulo";
$tdataarticulo_orig[".googleLikeFields"][] = "codigo";
$tdataarticulo_orig[".googleLikeFields"][] = "idgrupo";
$tdataarticulo_orig[".googleLikeFields"][] = "idcategoria";
$tdataarticulo_orig[".googleLikeFields"][] = "idsubcategoria";
$tdataarticulo_orig[".googleLikeFields"][] = "nombre";
$tdataarticulo_orig[".googleLikeFields"][] = "stock";
$tdataarticulo_orig[".googleLikeFields"][] = "proveedor";
$tdataarticulo_orig[".googleLikeFields"][] = "fecha_alta";
$tdataarticulo_orig[".googleLikeFields"][] = "costo";
$tdataarticulo_orig[".googleLikeFields"][] = "precio";
$tdataarticulo_orig[".googleLikeFields"][] = "observacion";
$tdataarticulo_orig[".googleLikeFields"][] = "estado";


$tdataarticulo_orig[".advSearchFields"][] = "idarticulo";
$tdataarticulo_orig[".advSearchFields"][] = "codigo";
$tdataarticulo_orig[".advSearchFields"][] = "idgrupo";
$tdataarticulo_orig[".advSearchFields"][] = "idcategoria";
$tdataarticulo_orig[".advSearchFields"][] = "idsubcategoria";
$tdataarticulo_orig[".advSearchFields"][] = "nombre";
$tdataarticulo_orig[".advSearchFields"][] = "stock";
$tdataarticulo_orig[".advSearchFields"][] = "proveedor";
$tdataarticulo_orig[".advSearchFields"][] = "fecha_alta";
$tdataarticulo_orig[".advSearchFields"][] = "costo";
$tdataarticulo_orig[".advSearchFields"][] = "precio";
$tdataarticulo_orig[".advSearchFields"][] = "observacion";
$tdataarticulo_orig[".advSearchFields"][] = "estado";

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

	



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



$tdataarticulo_orig[".pageSize"] = 20;

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

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

$tdataarticulo_orig[".sqlHead"] = "SELECT idarticulo,   codigo,   idgrupo,   idcategoria,   idsubcategoria,   nombre,   stock,   proveedor,   fecha_alta,   costo,   precio,   observacion,   estado";
$tdataarticulo_orig[".sqlFrom"] = "FROM articulo_orig";
$tdataarticulo_orig[".sqlWhereExpr"] = "";
$tdataarticulo_orig[".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;
$tdataarticulo_orig[".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;
$tdataarticulo_orig[".arrGroupsPerPage"] = $arrGPP;

$tableKeysarticulo_orig = array();
$tableKeysarticulo_orig[] = "idarticulo";
$tdataarticulo_orig[".Keys"] = $tableKeysarticulo_orig;

$tdataarticulo_orig[".listFields"] = array();
$tdataarticulo_orig[".listFields"][] = "idarticulo";
$tdataarticulo_orig[".listFields"][] = "codigo";
$tdataarticulo_orig[".listFields"][] = "idgrupo";
$tdataarticulo_orig[".listFields"][] = "idcategoria";
$tdataarticulo_orig[".listFields"][] = "idsubcategoria";
$tdataarticulo_orig[".listFields"][] = "nombre";
$tdataarticulo_orig[".listFields"][] = "stock";
$tdataarticulo_orig[".listFields"][] = "proveedor";
$tdataarticulo_orig[".listFields"][] = "fecha_alta";
$tdataarticulo_orig[".listFields"][] = "costo";
$tdataarticulo_orig[".listFields"][] = "precio";
$tdataarticulo_orig[".listFields"][] = "observacion";
$tdataarticulo_orig[".listFields"][] = "estado";

$tdataarticulo_orig[".viewFields"] = array();
$tdataarticulo_orig[".viewFields"][] = "idarticulo";
$tdataarticulo_orig[".viewFields"][] = "codigo";
$tdataarticulo_orig[".viewFields"][] = "idgrupo";
$tdataarticulo_orig[".viewFields"][] = "idcategoria";
$tdataarticulo_orig[".viewFields"][] = "idsubcategoria";
$tdataarticulo_orig[".viewFields"][] = "nombre";
$tdataarticulo_orig[".viewFields"][] = "stock";
$tdataarticulo_orig[".viewFields"][] = "proveedor";
$tdataarticulo_orig[".viewFields"][] = "fecha_alta";
$tdataarticulo_orig[".viewFields"][] = "costo";
$tdataarticulo_orig[".viewFields"][] = "precio";
$tdataarticulo_orig[".viewFields"][] = "observacion";
$tdataarticulo_orig[".viewFields"][] = "estado";

$tdataarticulo_orig[".addFields"] = array();
$tdataarticulo_orig[".addFields"][] = "codigo";
$tdataarticulo_orig[".addFields"][] = "idgrupo";
$tdataarticulo_orig[".addFields"][] = "idcategoria";
$tdataarticulo_orig[".addFields"][] = "idsubcategoria";
$tdataarticulo_orig[".addFields"][] = "nombre";
$tdataarticulo_orig[".addFields"][] = "stock";
$tdataarticulo_orig[".addFields"][] = "proveedor";
$tdataarticulo_orig[".addFields"][] = "fecha_alta";
$tdataarticulo_orig[".addFields"][] = "costo";
$tdataarticulo_orig[".addFields"][] = "precio";
$tdataarticulo_orig[".addFields"][] = "observacion";
$tdataarticulo_orig[".addFields"][] = "estado";

$tdataarticulo_orig[".inlineAddFields"] = array();
$tdataarticulo_orig[".inlineAddFields"][] = "codigo";
$tdataarticulo_orig[".inlineAddFields"][] = "idgrupo";
$tdataarticulo_orig[".inlineAddFields"][] = "idcategoria";
$tdataarticulo_orig[".inlineAddFields"][] = "idsubcategoria";
$tdataarticulo_orig[".inlineAddFields"][] = "nombre";
$tdataarticulo_orig[".inlineAddFields"][] = "stock";
$tdataarticulo_orig[".inlineAddFields"][] = "proveedor";
$tdataarticulo_orig[".inlineAddFields"][] = "fecha_alta";
$tdataarticulo_orig[".inlineAddFields"][] = "costo";
$tdataarticulo_orig[".inlineAddFields"][] = "precio";
$tdataarticulo_orig[".inlineAddFields"][] = "observacion";
$tdataarticulo_orig[".inlineAddFields"][] = "estado";

$tdataarticulo_orig[".editFields"] = array();
$tdataarticulo_orig[".editFields"][] = "codigo";
$tdataarticulo_orig[".editFields"][] = "idgrupo";
$tdataarticulo_orig[".editFields"][] = "idcategoria";
$tdataarticulo_orig[".editFields"][] = "idsubcategoria";
$tdataarticulo_orig[".editFields"][] = "nombre";
$tdataarticulo_orig[".editFields"][] = "stock";
$tdataarticulo_orig[".editFields"][] = "proveedor";
$tdataarticulo_orig[".editFields"][] = "fecha_alta";
$tdataarticulo_orig[".editFields"][] = "costo";
$tdataarticulo_orig[".editFields"][] = "precio";
$tdataarticulo_orig[".editFields"][] = "observacion";
$tdataarticulo_orig[".editFields"][] = "estado";

$tdataarticulo_orig[".inlineEditFields"] = array();
$tdataarticulo_orig[".inlineEditFields"][] = "codigo";
$tdataarticulo_orig[".inlineEditFields"][] = "idgrupo";
$tdataarticulo_orig[".inlineEditFields"][] = "idcategoria";
$tdataarticulo_orig[".inlineEditFields"][] = "idsubcategoria";
$tdataarticulo_orig[".inlineEditFields"][] = "nombre";
$tdataarticulo_orig[".inlineEditFields"][] = "stock";
$tdataarticulo_orig[".inlineEditFields"][] = "proveedor";
$tdataarticulo_orig[".inlineEditFields"][] = "fecha_alta";
$tdataarticulo_orig[".inlineEditFields"][] = "costo";
$tdataarticulo_orig[".inlineEditFields"][] = "precio";
$tdataarticulo_orig[".inlineEditFields"][] = "observacion";
$tdataarticulo_orig[".inlineEditFields"][] = "estado";

$tdataarticulo_orig[".exportFields"] = array();
$tdataarticulo_orig[".exportFields"][] = "idarticulo";
$tdataarticulo_orig[".exportFields"][] = "codigo";
$tdataarticulo_orig[".exportFields"][] = "idgrupo";
$tdataarticulo_orig[".exportFields"][] = "idcategoria";
$tdataarticulo_orig[".exportFields"][] = "idsubcategoria";
$tdataarticulo_orig[".exportFields"][] = "nombre";
$tdataarticulo_orig[".exportFields"][] = "stock";
$tdataarticulo_orig[".exportFields"][] = "proveedor";
$tdataarticulo_orig[".exportFields"][] = "fecha_alta";
$tdataarticulo_orig[".exportFields"][] = "costo";
$tdataarticulo_orig[".exportFields"][] = "precio";
$tdataarticulo_orig[".exportFields"][] = "observacion";
$tdataarticulo_orig[".exportFields"][] = "estado";

$tdataarticulo_orig[".printFields"] = array();
$tdataarticulo_orig[".printFields"][] = "idarticulo";
$tdataarticulo_orig[".printFields"][] = "codigo";
$tdataarticulo_orig[".printFields"][] = "idgrupo";
$tdataarticulo_orig[".printFields"][] = "idcategoria";
$tdataarticulo_orig[".printFields"][] = "idsubcategoria";
$tdataarticulo_orig[".printFields"][] = "nombre";
$tdataarticulo_orig[".printFields"][] = "stock";
$tdataarticulo_orig[".printFields"][] = "proveedor";
$tdataarticulo_orig[".printFields"][] = "fecha_alta";
$tdataarticulo_orig[".printFields"][] = "costo";
$tdataarticulo_orig[".printFields"][] = "precio";
$tdataarticulo_orig[".printFields"][] = "observacion";
$tdataarticulo_orig[".printFields"][] = "estado";

//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Idarticulo"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = 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;
	
		
		
	$tdataarticulo_orig["idarticulo"] = $fdata;
//	codigo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "codigo";
	$fdata["GoodName"] = "codigo";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Codigo"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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;
	
		
		
	$tdataarticulo_orig["codigo"] = $fdata;
//	idgrupo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "idgrupo";
	$fdata["GoodName"] = "idgrupo";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Idgrupo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idgrupo"; 
		$fdata["FullName"] = "idgrupo";
	
		
		
				$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;
	
		
		
	$tdataarticulo_orig["idgrupo"] = $fdata;
//	idcategoria
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "idcategoria";
	$fdata["GoodName"] = "idcategoria";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Idcategoria"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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"] = "idcategoria";
	
		
	$edata["LookupTable"] = "categoria";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	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;
	
		
		
	$tdataarticulo_orig["idcategoria"] = $fdata;
//	idsubcategoria
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "idsubcategoria";
	$fdata["GoodName"] = "idsubcategoria";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Idsubcategoria"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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"] = "idsubcategoria";
	
		
	$edata["LookupTable"] = "subcategoria";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	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;
	
		
		
	$tdataarticulo_orig["idsubcategoria"] = $fdata;
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Nombre"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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["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;
	
		
		
	$tdataarticulo_orig["nombre"] = $fdata;
//	stock
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "stock";
	$fdata["GoodName"] = "stock";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Stock"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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"] = "";
			
		
//	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;
	
		
		
	$tdataarticulo_orig["stock"] = $fdata;
//	proveedor
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "proveedor";
	$fdata["GoodName"] = "proveedor";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Proveedor"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "proveedor"; 
		$fdata["FullName"] = "proveedor";
	
		
		
				$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"] = "idcliente";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "idcliente";
	
		
	$edata["LookupTable"] = "cliente";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	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;
	
		
		
	$tdataarticulo_orig["proveedor"] = $fdata;
//	fecha_alta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "fecha_alta";
	$fdata["GoodName"] = "fecha_alta";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Fecha Alta"; 
	$fdata["FieldType"] = 7;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "fecha_alta"; 
		$fdata["FullName"] = "fecha_alta";
	
		
		
				$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["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 13; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdataarticulo_orig["fecha_alta"] = $fdata;
//	costo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "costo";
	$fdata["GoodName"] = "costo";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Costo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "costo"; 
		$fdata["FullName"] = "costo";
	
		
		
				$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;
	
		
		
	$tdataarticulo_orig["costo"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "precio";
	$fdata["GoodName"] = "precio";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Precio"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "precio"; 
		$fdata["FullName"] = "precio";
	
		
		
				$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;
	
		
		
	$tdataarticulo_orig["precio"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Observacion"; 
	$fdata["FieldType"] = 201;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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;
	
		
		
	$tdataarticulo_orig["observacion"] = $fdata;
//	estado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "estado";
	$fdata["GoodName"] = "estado";
	$fdata["ownerTable"] = "articulo_orig";
	$fdata["Label"] = "Estado"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "estado"; 
		$fdata["FullName"] = "estado";
	
		
		
				$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=10";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdataarticulo_orig["estado"] = $fdata;

	
$tables_data["articulo_orig"]=&$tdataarticulo_orig;
$field_labels["articulo_orig"] = &$fieldLabelsarticulo_orig;
$fieldToolTips["articulo_orig"] = &$fieldToolTipsarticulo_orig;

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

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

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










function createSqlQuery_articulo_orig()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idarticulo,   codigo,   idgrupo,   idcategoria,   idsubcategoria,   nombre,   stock,   proveedor,   fecha_alta,   costo,   precio,   observacion,   estado";
$proto0["m_strFrom"] = "FROM articulo_orig";
$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_orig"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLField(array(
	"m_strName" => "estado",
	"m_strTable" => "articulo_orig"
));

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto31=array();
$proto31["m_link"] = "SQLL_MAIN";
			$proto32=array();
$proto32["m_strName"] = "articulo_orig";
$proto32["m_columns"] = array();
$proto32["m_columns"][] = "idarticulo";
$proto32["m_columns"][] = "codigo";
$proto32["m_columns"][] = "idgrupo";
$proto32["m_columns"][] = "idcategoria";
$proto32["m_columns"][] = "idsubcategoria";
$proto32["m_columns"][] = "nombre";
$proto32["m_columns"][] = "stock";
$proto32["m_columns"][] = "proveedor";
$proto32["m_columns"][] = "fecha_alta";
$proto32["m_columns"][] = "costo";
$proto32["m_columns"][] = "precio";
$proto32["m_columns"][] = "observacion";
$proto32["m_columns"][] = "estado";
$obj = new SQLTable($proto32);

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

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

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

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

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

$tableEvents["articulo_orig"] = new eventsBase;
$tdataarticulo_orig[".hasEvents"] = false;

$cipherer = new RunnerCipherer("articulo_orig");

?>