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

//	field labels
$fieldLabelstransaccion = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelstransaccion["Spanish"] = array();
	$fieldToolTipstransaccion["Spanish"] = array();
	$fieldLabelstransaccion["Spanish"]["idtransaccion"] = "ID";
	$fieldToolTipstransaccion["Spanish"]["idtransaccion"] = "";
	$fieldLabelstransaccion["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipstransaccion["Spanish"]["fecha"] = "";
	$fieldLabelstransaccion["Spanish"]["cliente"] = "Cliente";
	$fieldToolTipstransaccion["Spanish"]["cliente"] = "";
	$fieldLabelstransaccion["Spanish"]["idarticulo"] = "Artículo";
	$fieldToolTipstransaccion["Spanish"]["idarticulo"] = "";
	$fieldLabelstransaccion["Spanish"]["costo"] = "Costo";
	$fieldToolTipstransaccion["Spanish"]["costo"] = "";
	$fieldLabelstransaccion["Spanish"]["precio"] = "Precio";
	$fieldToolTipstransaccion["Spanish"]["precio"] = "";
	$fieldLabelstransaccion["Spanish"]["cant"] = "Cant";
	$fieldToolTipstransaccion["Spanish"]["cant"] = "";
	$fieldLabelstransaccion["Spanish"]["total"] = "Total";
	$fieldToolTipstransaccion["Spanish"]["total"] = "";
	$fieldLabelstransaccion["Spanish"]["descuento"] = "Descuento";
	$fieldToolTipstransaccion["Spanish"]["descuento"] = "";
	$fieldLabelstransaccion["Spanish"]["cobrado"] = "Cobrado";
	$fieldToolTipstransaccion["Spanish"]["cobrado"] = "";
	$fieldLabelstransaccion["Spanish"]["anulado"] = "Anulado";
	$fieldToolTipstransaccion["Spanish"]["anulado"] = "";
	$fieldLabelstransaccion["Spanish"]["tipo"] = "Tipo";
	$fieldToolTipstransaccion["Spanish"]["tipo"] = "";
	$fieldLabelstransaccion["Spanish"]["observacion"] = "Observación";
	$fieldToolTipstransaccion["Spanish"]["observacion"] = "";
	$fieldLabelstransaccion["Spanish"]["importe"] = "Importe";
	$fieldToolTipstransaccion["Spanish"]["importe"] = "";
	$fieldLabelstransaccion["Spanish"]["ganancia"] = "Ganancia";
	$fieldToolTipstransaccion["Spanish"]["ganancia"] = "";
	if (count($fieldToolTipstransaccion["Spanish"]))
		$tdatatransaccion[".isUseToolTips"] = true;
}
	
	
	$tdatatransaccion[".NCSearch"] = true;



$tdatatransaccion[".shortTableName"] = "transaccion";
$tdatatransaccion[".nSecOptions"] = 0;
$tdatatransaccion[".recsPerRowList"] = 1;
$tdatatransaccion[".mainTableOwnerID"] = "";
$tdatatransaccion[".moveNext"] = 1;
$tdatatransaccion[".nType"] = 0;

$tdatatransaccion[".strOriginalTableName"] = "transaccion";




$tdatatransaccion[".showAddInPopup"] = false;

$tdatatransaccion[".showEditInPopup"] = true;

$tdatatransaccion[".showViewInPopup"] = false;

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

	$tdatatransaccion[".audit"] = false;

	$tdatatransaccion[".locking"] = false;

$tdatatransaccion[".edit"] = true;

$tdatatransaccion[".exportTo"] = true;



$tdatatransaccion[".showSimpleSearchOptions"] = false;

$tdatatransaccion[".showSearchPanel"] = true;

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

$tdatatransaccion[".rowHighlite"] = true;

// button handlers file names

$tdatatransaccion[".addPageEvents"] = false;

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




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

$tdatatransaccion[".allSearchFields"][] = "tipo";
$tdatatransaccion[".allSearchFields"][] = "idtransaccion";
$tdatatransaccion[".allSearchFields"][] = "fecha";
$tdatatransaccion[".allSearchFields"][] = "cliente";
$tdatatransaccion[".allSearchFields"][] = "idarticulo";
$tdatatransaccion[".allSearchFields"][] = "costo";
$tdatatransaccion[".allSearchFields"][] = "precio";
$tdatatransaccion[".allSearchFields"][] = "cant";
$tdatatransaccion[".allSearchFields"][] = "total";
$tdatatransaccion[".allSearchFields"][] = "importe";
$tdatatransaccion[".allSearchFields"][] = "descuento";
$tdatatransaccion[".allSearchFields"][] = "observacion";
$tdatatransaccion[".allSearchFields"][] = "cobrado";
$tdatatransaccion[".allSearchFields"][] = "anulado";

$tdatatransaccion[".googleLikeFields"][] = "idtransaccion";
$tdatatransaccion[".googleLikeFields"][] = "tipo";
$tdatatransaccion[".googleLikeFields"][] = "fecha";
$tdatatransaccion[".googleLikeFields"][] = "cliente";
$tdatatransaccion[".googleLikeFields"][] = "idarticulo";
$tdatatransaccion[".googleLikeFields"][] = "costo";
$tdatatransaccion[".googleLikeFields"][] = "precio";
$tdatatransaccion[".googleLikeFields"][] = "cant";
$tdatatransaccion[".googleLikeFields"][] = "total";
$tdatatransaccion[".googleLikeFields"][] = "importe";
$tdatatransaccion[".googleLikeFields"][] = "descuento";
$tdatatransaccion[".googleLikeFields"][] = "observacion";
$tdatatransaccion[".googleLikeFields"][] = "cobrado";
$tdatatransaccion[".googleLikeFields"][] = "anulado";
$tdatatransaccion[".googleLikeFields"][] = "ganancia";


$tdatatransaccion[".advSearchFields"][] = "tipo";
$tdatatransaccion[".advSearchFields"][] = "idtransaccion";
$tdatatransaccion[".advSearchFields"][] = "fecha";
$tdatatransaccion[".advSearchFields"][] = "cliente";
$tdatatransaccion[".advSearchFields"][] = "idarticulo";
$tdatatransaccion[".advSearchFields"][] = "costo";
$tdatatransaccion[".advSearchFields"][] = "precio";
$tdatatransaccion[".advSearchFields"][] = "cant";
$tdatatransaccion[".advSearchFields"][] = "total";
$tdatatransaccion[".advSearchFields"][] = "importe";
$tdatatransaccion[".advSearchFields"][] = "descuento";
$tdatatransaccion[".advSearchFields"][] = "observacion";
$tdatatransaccion[".advSearchFields"][] = "cobrado";
$tdatatransaccion[".advSearchFields"][] = "anulado";

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

	



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

$tdatatransaccion[".totalsFields"][] = array(
	"fName" => "costo", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatatransaccion[".totalsFields"][] = array(
	"fName" => "cant", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatatransaccion[".totalsFields"][] = array(
	"fName" => "total", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatatransaccion[".totalsFields"][] = array(
	"fName" => "importe", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatatransaccion[".totalsFields"][] = array(
	"fName" => "descuento", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');

$tdatatransaccion[".pageSize"] = 20;

$tstrOrderBy = "ORDER BY idtransaccion DESC";
if(strlen($tstrOrderBy) && strtolower(substr($tstrOrderBy,0,8))!="order by")
	$tstrOrderBy = "order by ".$tstrOrderBy;
$tdatatransaccion[".strOrderBy"] = $tstrOrderBy;

$tdatatransaccion[".orderindexes"] = array();
$tdatatransaccion[".orderindexes"][] = array(1, (0 ? "ASC" : "DESC"), "idtransaccion");

$tdatatransaccion[".sqlHead"] = "SELECT idtransaccion,  tipo,  fecha,  cliente,  idarticulo,  costo,  precio,  cant,  total,  importe,  descuento,  observacion,  cobrado,  anulado,  ganancia";
$tdatatransaccion[".sqlFrom"] = "FROM transaccion";
$tdatatransaccion[".sqlWhereExpr"] = "(tipo =\"VENTA\")";
$tdatatransaccion[".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;
$tdatatransaccion[".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;
$tdatatransaccion[".arrGroupsPerPage"] = $arrGPP;

$tableKeystransaccion = array();
$tableKeystransaccion[] = "idtransaccion";
$tdatatransaccion[".Keys"] = $tableKeystransaccion;

$tdatatransaccion[".listFields"] = array();
$tdatatransaccion[".listFields"][] = "idtransaccion";
$tdatatransaccion[".listFields"][] = "fecha";
$tdatatransaccion[".listFields"][] = "cliente";
$tdatatransaccion[".listFields"][] = "idarticulo";
$tdatatransaccion[".listFields"][] = "costo";
$tdatatransaccion[".listFields"][] = "precio";
$tdatatransaccion[".listFields"][] = "cant";
$tdatatransaccion[".listFields"][] = "total";
$tdatatransaccion[".listFields"][] = "importe";
$tdatatransaccion[".listFields"][] = "descuento";
$tdatatransaccion[".listFields"][] = "ganancia";
$tdatatransaccion[".listFields"][] = "observacion";
$tdatatransaccion[".listFields"][] = "cobrado";
$tdatatransaccion[".listFields"][] = "anulado";

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

$tdatatransaccion[".addFields"] = array();
$tdatatransaccion[".addFields"][] = "tipo";
$tdatatransaccion[".addFields"][] = "fecha";
$tdatatransaccion[".addFields"][] = "cliente";
$tdatatransaccion[".addFields"][] = "idarticulo";
$tdatatransaccion[".addFields"][] = "cant";
$tdatatransaccion[".addFields"][] = "importe";
$tdatatransaccion[".addFields"][] = "observacion";

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

$tdatatransaccion[".editFields"] = array();
$tdatatransaccion[".editFields"][] = "anulado";

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

$tdatatransaccion[".exportFields"] = array();
$tdatatransaccion[".exportFields"][] = "ganancia";
$tdatatransaccion[".exportFields"][] = "idtransaccion";
$tdatatransaccion[".exportFields"][] = "tipo";
$tdatatransaccion[".exportFields"][] = "fecha";
$tdatatransaccion[".exportFields"][] = "cliente";
$tdatatransaccion[".exportFields"][] = "idarticulo";
$tdatatransaccion[".exportFields"][] = "costo";
$tdatatransaccion[".exportFields"][] = "precio";
$tdatatransaccion[".exportFields"][] = "cant";
$tdatatransaccion[".exportFields"][] = "total";
$tdatatransaccion[".exportFields"][] = "importe";
$tdatatransaccion[".exportFields"][] = "descuento";
$tdatatransaccion[".exportFields"][] = "observacion";
$tdatatransaccion[".exportFields"][] = "cobrado";
$tdatatransaccion[".exportFields"][] = "anulado";

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

//	idtransaccion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idtransaccion";
	$fdata["GoodName"] = "idtransaccion";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "ID"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idtransaccion"; 
		$fdata["FullName"] = "idtransaccion";
	
		
		
				$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;
	
		
		
	$tdatatransaccion["idtransaccion"] = $fdata;
//	tipo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "tipo";
	$fdata["GoodName"] = "tipo";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Tipo"; 
	$fdata["FieldType"] = 200;
	
		
		
		
		$fdata["bAddPage"] = true; 
	
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "tipo"; 
		$fdata["FullName"] = "tipo";
	
		
		
				$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" => "Readonly");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatatransaccion["tipo"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "fecha";
	$fdata["GoodName"] = "fecha";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Fecha"; 
	$fdata["FieldType"] = 7;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "fecha"; 
		$fdata["FullName"] = "fecha";
	
		
		
				$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"] = 11; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		$edata["inputStyle"] = " width:100px;";
	$edata["controlWidth"] = 100;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatatransaccion["fecha"] = $fdata;
//	cliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "cliente";
	$fdata["GoodName"] = "cliente";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Cliente"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "cliente"; 
		$fdata["FullName"] = "cliente";
	
		
		
				$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["LCType"] = 1;
			
		
			
	$edata["LinkField"] = "idbeneficiario";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "denominacion";
	
		
	$edata["LookupTable"] = "cliente";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		$edata["FastType"] = true; 
	
		$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;
	
		
		
	$tdatatransaccion["cliente"] = $fdata;
//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Artículo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		
		
		
		$fdata["bAdvancedSearch"] = 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" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				if(strpos(GetUserPermissions("transaccion"), 'S') !== false)
		$edata["LCType"] = 2;
	else 
		$edata["LCType"] = 0;
			
		
			
	$edata["LinkField"] = "idarticulo";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nombre";
	
		
	$edata["LookupTable"] = "articulo";
	$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;
	
		
		
	$tdatatransaccion["idarticulo"] = $fdata;
//	costo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "costo";
	$fdata["GoodName"] = "costo";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Costo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = 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" => "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"] = "";
			
		
//	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;
	
		
		
	$tdatatransaccion["costo"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "precio";
	$fdata["GoodName"] = "precio";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Precio"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = 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" => "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"] = "";
			
		
//	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;
	
		
		
	$tdatatransaccion["precio"] = $fdata;
//	cant
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "cant";
	$fdata["GoodName"] = "cant";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Cant"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "cant"; 
		$fdata["FullName"] = "cant";
	
		
		
				$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: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;
	
		
		
	$tdatatransaccion["cant"] = $fdata;
//	total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "total";
	$fdata["GoodName"] = "total";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Total"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "total"; 
		$fdata["FullName"] = "total";
	
		
		
				$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"] = "";
			
		
//	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;
	
		
		
	$tdatatransaccion["total"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "importe";
	$fdata["GoodName"] = "importe";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Importe"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "importe"; 
		$fdata["FullName"] = "importe";
	
		
		
				$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:100px;";
	$edata["controlWidth"] = 100;
	
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Password");	
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatatransaccion["importe"] = $fdata;
//	descuento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "descuento";
	$fdata["GoodName"] = "descuento";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Descuento"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "descuento"; 
		$fdata["FullName"] = "descuento";
	
		
		
				$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"] = "";
			
		
//	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;
	
		
		
	$tdatatransaccion["descuento"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Observación"; 
	$fdata["FieldType"] = 201;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = 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;
	
		
		
	$tdatatransaccion["observacion"] = $fdata;
//	cobrado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "cobrado";
	$fdata["GoodName"] = "cobrado";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Cobrado"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "cobrado"; 
		$fdata["FullName"] = "cobrado";
	
		
		
				$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"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatatransaccion["cobrado"] = $fdata;
//	anulado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "anulado";
	$fdata["GoodName"] = "anulado";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Anulado"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		$fdata["bEditPage"] = true; 
	
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "anulado"; 
		$fdata["FullName"] = "anulado";
	
		
		
				$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" => "Readonly");
	
		
		$edata["AutoUpdate"] = true; 
	
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:40px;";
	$edata["controlWidth"] = 40;
	
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatatransaccion["anulado"] = $fdata;
//	ganancia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "ganancia";
	$fdata["GoodName"] = "ganancia";
	$fdata["ownerTable"] = "transaccion";
	$fdata["Label"] = "Ganancia"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "ganancia"; 
		$fdata["FullName"] = "ganancia";
	
		
		
				$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["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;
	
		
		
	$tdatatransaccion["ganancia"] = $fdata;

	
$tables_data["transaccion"]=&$tdatatransaccion;
$field_labels["transaccion"] = &$fieldLabelstransaccion;
$fieldToolTips["transaccion"] = &$fieldToolTipstransaccion;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["transaccion"] = array();
$dIndex = 1-1;
			$strOriginalDetailsTable="cobro";
	$detailsParam["dDataSourceTable"]="cobro";
	$detailsParam["dOriginalTable"]=$strOriginalDetailsTable;
	$detailsParam["dShortTable"]="cobro";
	$detailsParam["masterKeys"]=array();
	$detailsParam["detailKeys"]=array();
	$detailsParam["dispChildCount"]= "1";
	$detailsParam["hideChild"]="0";
	$detailsParam["previewOnList"]= 2;
	$detailsParam["previewOnAdd"]= 1;
	$detailsParam["previewOnEdit"]= 0;
	$detailsParam["previewOnView"]= 0;
		
	$detailsTablesData["transaccion"][$dIndex] = $detailsParam;
	
			$detailsTablesData["transaccion"][$dIndex]["previewOnAdd"] = false;
	
		$detailsTablesData["transaccion"][$dIndex]["masterKeys"][]="idtransaccion";
		$detailsTablesData["transaccion"][$dIndex]["detailKeys"][]="idtransaccion";

	
// tables which are master tables for current table (detail)
$masterTablesData["transaccion"] = array();

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

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










function createSqlQuery_transaccion()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idtransaccion,  tipo,  fecha,  cliente,  idarticulo,  costo,  precio,  cant,  total,  importe,  descuento,  observacion,  cobrado,  anulado,  ganancia";
$proto0["m_strFrom"] = "FROM transaccion";
$proto0["m_strWhere"] = "(tipo =\"VENTA\")";
$proto0["m_strOrderBy"] = "ORDER BY idtransaccion DESC";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "tipo =\"VENTA\"";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "tipo",
	"m_strTable" => "transaccion"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto31=array();
			$obj = new SQLField(array(
	"m_strName" => "anulado",
	"m_strTable" => "transaccion"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto33=array();
			$obj = new SQLField(array(
	"m_strName" => "ganancia",
	"m_strTable" => "transaccion"
));

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto35=array();
$proto35["m_link"] = "SQLL_MAIN";
			$proto36=array();
$proto36["m_strName"] = "transaccion";
$proto36["m_columns"] = array();
$proto36["m_columns"][] = "idtransaccion";
$proto36["m_columns"][] = "tipo";
$proto36["m_columns"][] = "fecha";
$proto36["m_columns"][] = "cliente";
$proto36["m_columns"][] = "idarticulo";
$proto36["m_columns"][] = "costo";
$proto36["m_columns"][] = "precio";
$proto36["m_columns"][] = "cant";
$proto36["m_columns"][] = "total";
$proto36["m_columns"][] = "importe";
$proto36["m_columns"][] = "descuento";
$proto36["m_columns"][] = "ganancia";
$proto36["m_columns"][] = "observacion";
$proto36["m_columns"][] = "cobrado";
$proto36["m_columns"][] = "anulado";
$obj = new SQLTable($proto36);

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

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
												$proto39=array();
						$obj = new SQLField(array(
	"m_strName" => "idtransaccion",
	"m_strTable" => "transaccion"
));

$proto39["m_column"]=$obj;
$proto39["m_bAsc"] = 0;
$proto39["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto39);

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

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

include_once(getabspath("include/transaccion_events.php"));
$tableEvents["transaccion"] = new eventclass_transaccion;
$tdatatransaccion[".hasEvents"] = true;

$cipherer = new RunnerCipherer("transaccion");

?>