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

//	field labels
$fieldLabelsinf_ventas_productos = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsinf_ventas_productos["Spanish"] = array();
	$fieldToolTipsinf_ventas_productos["Spanish"] = array();
	$fieldLabelsinf_ventas_productos["Spanish"]["iddet_venta"] = "Iddet Venta";
	$fieldToolTipsinf_ventas_productos["Spanish"]["iddet_venta"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["idventa"] = "Nº Venta";
	$fieldToolTipsinf_ventas_productos["Spanish"]["idventa"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["idarticulo"] = "Código";
	$fieldToolTipsinf_ventas_productos["Spanish"]["idarticulo"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["precio"] = "Precio x unid.";
	$fieldToolTipsinf_ventas_productos["Spanish"]["precio"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["cantidad"] = "Cantidad";
	$fieldToolTipsinf_ventas_productos["Spanish"]["cantidad"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["subtotal"] = "Sub total";
	$fieldToolTipsinf_ventas_productos["Spanish"]["subtotal"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["importe"] = "Importe x unid.";
	$fieldToolTipsinf_ventas_productos["Spanish"]["importe"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["descuento"] = "Descuento";
	$fieldToolTipsinf_ventas_productos["Spanish"]["descuento"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["ganancia"] = "Ganancia";
	$fieldToolTipsinf_ventas_productos["Spanish"]["ganancia"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["anulada"] = "Anulada";
	$fieldToolTipsinf_ventas_productos["Spanish"]["anulada"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipsinf_ventas_productos["Spanish"]["fecha"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["nombre"] = "Artículo";
	$fieldToolTipsinf_ventas_productos["Spanish"]["nombre"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["costo_unidad"] = "Costo x unid.";
	$fieldToolTipsinf_ventas_productos["Spanish"]["costo_unidad"] = "";
	$fieldLabelsinf_ventas_productos["Spanish"]["costo_total"] = "Costo Total";
	$fieldToolTipsinf_ventas_productos["Spanish"]["costo_total"] = "";
	if (count($fieldToolTipsinf_ventas_productos["Spanish"]))
		$tdatainf_ventas_productos[".isUseToolTips"] = true;
}
	
	
	$tdatainf_ventas_productos[".NCSearch"] = true;



$tdatainf_ventas_productos[".shortTableName"] = "inf_ventas_productos";
$tdatainf_ventas_productos[".nSecOptions"] = 0;
$tdatainf_ventas_productos[".recsPerRowList"] = 1;
$tdatainf_ventas_productos[".mainTableOwnerID"] = "";
$tdatainf_ventas_productos[".moveNext"] = 1;
$tdatainf_ventas_productos[".nType"] = 1;

$tdatainf_ventas_productos[".strOriginalTableName"] = "det_venta";




$tdatainf_ventas_productos[".showAddInPopup"] = false;

$tdatainf_ventas_productos[".showEditInPopup"] = false;

$tdatainf_ventas_productos[".showViewInPopup"] = false;

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

	$tdatainf_ventas_productos[".audit"] = false;

	$tdatainf_ventas_productos[".locking"] = false;


$tdatainf_ventas_productos[".exportTo"] = true;

$tdatainf_ventas_productos[".printFriendly"] = true;


$tdatainf_ventas_productos[".showSimpleSearchOptions"] = false;

$tdatainf_ventas_productos[".showSearchPanel"] = true;

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

$tdatainf_ventas_productos[".rowHighlite"] = true;

// button handlers file names
$tdatainf_ventas_productos[".isUsebuttonHandlers"] = true;

$tdatainf_ventas_productos[".addPageEvents"] = false;

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




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

$tdatainf_ventas_productos[".allSearchFields"][] = "fecha";
$tdatainf_ventas_productos[".allSearchFields"][] = "idventa";
$tdatainf_ventas_productos[".allSearchFields"][] = "idarticulo";
$tdatainf_ventas_productos[".allSearchFields"][] = "nombre";

$tdatainf_ventas_productos[".googleLikeFields"][] = "idventa";
$tdatainf_ventas_productos[".googleLikeFields"][] = "idarticulo";
$tdatainf_ventas_productos[".googleLikeFields"][] = "fecha";
$tdatainf_ventas_productos[".googleLikeFields"][] = "nombre";

$tdatainf_ventas_productos[".panelSearchFields"][] = "fecha";
$tdatainf_ventas_productos[".panelSearchFields"][] = "idventa";
$tdatainf_ventas_productos[".panelSearchFields"][] = "idarticulo";
$tdatainf_ventas_productos[".panelSearchFields"][] = "nombre";

$tdatainf_ventas_productos[".advSearchFields"][] = "fecha";
$tdatainf_ventas_productos[".advSearchFields"][] = "idventa";
$tdatainf_ventas_productos[".advSearchFields"][] = "idarticulo";
$tdatainf_ventas_productos[".advSearchFields"][] = "nombre";

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

	



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


$tdatainf_ventas_productos[".totalsFields"][] = array(
	"fName" => "costo_unidad", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatainf_ventas_productos[".totalsFields"][] = array(
	"fName" => "costo_total", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatainf_ventas_productos[".totalsFields"][] = array(
	"fName" => "importe", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatainf_ventas_productos[".totalsFields"][] = array(
	"fName" => "subtotal", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatainf_ventas_productos[".totalsFields"][] = array(
	"fName" => "descuento", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');
$tdatainf_ventas_productos[".totalsFields"][] = array(
	"fName" => "ganancia", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');

$tdatainf_ventas_productos[".pageSize"] = 20;

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

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

$tdatainf_ventas_productos[".sqlHead"] = "SELECT det_venta.iddet_venta,  det_venta.idventa,  det_venta.idarticulo,  det_venta.costo AS costo_unidad,  det_venta.costo*det_venta.cantidad AS costo_total,  det_venta.precio,  det_venta.cantidad,  det_venta.importe,  det_venta.subtotal,  det_venta.descuento,  det_venta.ganancia,  det_venta.anulada,  venta.fecha,  articulo.nombre";
$tdatainf_ventas_productos[".sqlFrom"] = "FROM det_venta  INNER JOIN venta ON det_venta.idventa = venta.idventa  INNER JOIN articulo ON det_venta.idarticulo = articulo.idarticulo";
$tdatainf_ventas_productos[".sqlWhereExpr"] = "(det_venta.anulada =\"NO\")";
$tdatainf_ventas_productos[".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;
$tdatainf_ventas_productos[".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;
$tdatainf_ventas_productos[".arrGroupsPerPage"] = $arrGPP;

$tableKeysinf_ventas_productos = array();
$tableKeysinf_ventas_productos[] = "iddet_venta";
$tdatainf_ventas_productos[".Keys"] = $tableKeysinf_ventas_productos;

$tdatainf_ventas_productos[".listFields"] = array();
$tdatainf_ventas_productos[".listFields"][] = "fecha";
$tdatainf_ventas_productos[".listFields"][] = "idventa";
$tdatainf_ventas_productos[".listFields"][] = "idarticulo";
$tdatainf_ventas_productos[".listFields"][] = "nombre";
$tdatainf_ventas_productos[".listFields"][] = "costo_unidad";
$tdatainf_ventas_productos[".listFields"][] = "cantidad";
$tdatainf_ventas_productos[".listFields"][] = "costo_total";
$tdatainf_ventas_productos[".listFields"][] = "precio";
$tdatainf_ventas_productos[".listFields"][] = "importe";
$tdatainf_ventas_productos[".listFields"][] = "subtotal";
$tdatainf_ventas_productos[".listFields"][] = "descuento";
$tdatainf_ventas_productos[".listFields"][] = "ganancia";

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

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

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

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

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

$tdatainf_ventas_productos[".exportFields"] = array();
$tdatainf_ventas_productos[".exportFields"][] = "fecha";
$tdatainf_ventas_productos[".exportFields"][] = "idventa";
$tdatainf_ventas_productos[".exportFields"][] = "idarticulo";
$tdatainf_ventas_productos[".exportFields"][] = "nombre";
$tdatainf_ventas_productos[".exportFields"][] = "costo_unidad";
$tdatainf_ventas_productos[".exportFields"][] = "cantidad";
$tdatainf_ventas_productos[".exportFields"][] = "costo_total";
$tdatainf_ventas_productos[".exportFields"][] = "precio";
$tdatainf_ventas_productos[".exportFields"][] = "importe";
$tdatainf_ventas_productos[".exportFields"][] = "subtotal";
$tdatainf_ventas_productos[".exportFields"][] = "descuento";
$tdatainf_ventas_productos[".exportFields"][] = "ganancia";

$tdatainf_ventas_productos[".printFields"] = array();
$tdatainf_ventas_productos[".printFields"][] = "fecha";
$tdatainf_ventas_productos[".printFields"][] = "idventa";
$tdatainf_ventas_productos[".printFields"][] = "idarticulo";
$tdatainf_ventas_productos[".printFields"][] = "nombre";
$tdatainf_ventas_productos[".printFields"][] = "costo_unidad";
$tdatainf_ventas_productos[".printFields"][] = "cantidad";
$tdatainf_ventas_productos[".printFields"][] = "costo_total";
$tdatainf_ventas_productos[".printFields"][] = "precio";
$tdatainf_ventas_productos[".printFields"][] = "importe";
$tdatainf_ventas_productos[".printFields"][] = "subtotal";
$tdatainf_ventas_productos[".printFields"][] = "descuento";
$tdatainf_ventas_productos[".printFields"][] = "ganancia";

//	iddet_venta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "iddet_venta";
	$fdata["GoodName"] = "iddet_venta";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Iddet Venta"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "iddet_venta"; 
		$fdata["FullName"] = "det_venta.iddet_venta";
	
		
		
				
				$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;
	
		
		
	$tdatainf_ventas_productos["iddet_venta"] = $fdata;
//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "idventa";
	$fdata["GoodName"] = "idventa";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Nº Venta"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idventa"; 
		$fdata["FullName"] = "det_venta.idventa";
	
		
		
				$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;
	
		
		
	$tdatainf_ventas_productos["idventa"] = $fdata;
//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Código"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idarticulo"; 
		$fdata["FullName"] = "det_venta.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();
				
		
			
	$edata["LinkField"] = "idarticulo";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "codigo";
	
		
	$edata["LookupTable"] = "articulo";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
			//	dependent dropdowns	
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "precio";
	
	
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:80px;";
	$edata["controlWidth"] = 80;
	
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas_productos["idarticulo"] = $fdata;
//	costo_unidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "costo_unidad";
	$fdata["GoodName"] = "costo_unidad";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Costo x unid."; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "costo"; 
		$fdata["FullName"] = "det_venta.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["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;
	
		
		
	$tdatainf_ventas_productos["costo_unidad"] = $fdata;
//	costo_total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "costo_total";
	$fdata["GoodName"] = "costo_total";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Costo Total"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "costo_total"; 
		$fdata["FullName"] = "det_venta.costo*det_venta.cantidad";
	
		
		
				$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;
	
		
		
	$tdatainf_ventas_productos["costo_total"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "precio";
	$fdata["GoodName"] = "precio";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Precio x unid."; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "precio"; 
		$fdata["FullName"] = "det_venta.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" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "precio";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "precio";
	
		
	$edata["LookupTable"] = "articulo";
	$edata["LookupOrderBy"] = "";
	
		
		
		$edata["UseCategory"] = true; 
	$edata["CategoryControl"] = "idarticulo"; 
	$edata["CategoryFilter"] = "idarticulo"; 
	
		
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas_productos["precio"] = $fdata;
//	cantidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "cantidad";
	$fdata["GoodName"] = "cantidad";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Cantidad"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "cantidad"; 
		$fdata["FullName"] = "det_venta.cantidad";
	
		
		
				$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:40px;";
	$edata["controlWidth"] = 40;
	
//	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;
	
		
		
	$tdatainf_ventas_productos["cantidad"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "importe";
	$fdata["GoodName"] = "importe";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Importe x unid."; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "importe"; 
		$fdata["FullName"] = "det_venta.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["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		$edata["inputStyle"] = " width:80px;";
	$edata["controlWidth"] = 80;
	
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas_productos["importe"] = $fdata;
//	subtotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "subtotal";
	$fdata["GoodName"] = "subtotal";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Sub total"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "subtotal"; 
		$fdata["FullName"] = "det_venta.subtotal";
	
		
		
				$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;
	
		
		
	$tdatainf_ventas_productos["subtotal"] = $fdata;
//	descuento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "descuento";
	$fdata["GoodName"] = "descuento";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Descuento"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "descuento"; 
		$fdata["FullName"] = "det_venta.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["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;
	
		
		
	$tdatainf_ventas_productos["descuento"] = $fdata;
//	ganancia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "ganancia";
	$fdata["GoodName"] = "ganancia";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Ganancia"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "ganancia"; 
		$fdata["FullName"] = "det_venta.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;
	
		
		
	$tdatainf_ventas_productos["ganancia"] = $fdata;
//	anulada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "anulada";
	$fdata["GoodName"] = "anulada";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Anulada"; 
	$fdata["FieldType"] = 200;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "anulada"; 
		$fdata["FullName"] = "det_venta.anulada";
	
		
		
				
				$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;
	
		
		
	$tdatainf_ventas_productos["anulada"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "fecha";
	$fdata["GoodName"] = "fecha";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Fecha"; 
	$fdata["FieldType"] = 7;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "fecha"; 
		$fdata["FullName"] = "venta.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["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 11; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas_productos["fecha"] = $fdata;
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "inf_ventas_productos";
	$fdata["Label"] = "Artículo"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "nombre"; 
		$fdata["FullName"] = "articulo.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;
	
		
		
	$tdatainf_ventas_productos["nombre"] = $fdata;

	
$tables_data["inf_ventas_productos"]=&$tdatainf_ventas_productos;
$field_labels["inf_ventas_productos"] = &$fieldLabelsinf_ventas_productos;
$fieldToolTips["inf_ventas_productos"] = &$fieldToolTipsinf_ventas_productos;

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

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

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










function createSqlQuery_inf_ventas_productos()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "det_venta.iddet_venta,  det_venta.idventa,  det_venta.idarticulo,  det_venta.costo AS costo_unidad,  det_venta.costo*det_venta.cantidad AS costo_total,  det_venta.precio,  det_venta.cantidad,  det_venta.importe,  det_venta.subtotal,  det_venta.descuento,  det_venta.ganancia,  det_venta.anulada,  venta.fecha,  articulo.nombre";
$proto0["m_strFrom"] = "FROM det_venta  INNER JOIN venta ON det_venta.idventa = venta.idventa  INNER JOIN articulo ON det_venta.idarticulo = articulo.idarticulo";
$proto0["m_strWhere"] = "(det_venta.anulada =\"NO\")";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "det_venta.anulada =\"NO\"";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "anulada",
	"m_strTable" => "det_venta"
));

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "det_venta.costo*det_venta.cantidad"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto33=array();
$proto33["m_link"] = "SQLL_MAIN";
			$proto34=array();
$proto34["m_strName"] = "det_venta";
$proto34["m_columns"] = array();
$proto34["m_columns"][] = "iddet_venta";
$proto34["m_columns"][] = "idventa";
$proto34["m_columns"][] = "idarticulo";
$proto34["m_columns"][] = "costo";
$proto34["m_columns"][] = "precio";
$proto34["m_columns"][] = "cantidad";
$proto34["m_columns"][] = "importe";
$proto34["m_columns"][] = "subtotal";
$proto34["m_columns"][] = "descuento";
$proto34["m_columns"][] = "ganancia";
$proto34["m_columns"][] = "anulada";
$obj = new SQLTable($proto34);

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

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

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

$proto0["m_fromlist"][]=$obj;
												$proto37=array();
$proto37["m_link"] = "SQLL_INNERJOIN";
			$proto38=array();
$proto38["m_strName"] = "venta";
$proto38["m_columns"] = array();
$proto38["m_columns"][] = "idventa";
$proto38["m_columns"][] = "fecha";
$proto38["m_columns"][] = "cliente";
$proto38["m_columns"][] = "total_venta";
$proto38["m_columns"][] = "total_cobro";
$proto38["m_columns"][] = "observacion";
$proto38["m_columns"][] = "cobrada";
$proto38["m_columns"][] = "anulada";
$obj = new SQLTable($proto38);

$proto37["m_table"] = $obj;
$proto37["m_alias"] = "";
$proto39=array();
$proto39["m_sql"] = "det_venta.idventa = venta.idventa";
$proto39["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "idventa",
	"m_strTable" => "det_venta"
));

$proto39["m_column"]=$obj;
$proto39["m_contained"] = array();
$proto39["m_strCase"] = "= venta.idventa";
$proto39["m_havingmode"] = "0";
$proto39["m_inBrackets"] = "0";
$proto39["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto39);

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

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

$proto41["m_table"] = $obj;
$proto41["m_alias"] = "";
$proto43=array();
$proto43["m_sql"] = "det_venta.idarticulo = articulo.idarticulo";
$proto43["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "idarticulo",
	"m_strTable" => "det_venta"
));

$proto43["m_column"]=$obj;
$proto43["m_contained"] = array();
$proto43["m_strCase"] = "= articulo.idarticulo";
$proto43["m_havingmode"] = "0";
$proto43["m_inBrackets"] = "0";
$proto43["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto43);

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

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

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

include_once(getabspath("include/inf_ventas_productos_events.php"));
$tableEvents["inf_ventas_productos"] = new eventclass_inf_ventas_productos;
$tdatainf_ventas_productos[".hasEvents"] = true;

$cipherer = new RunnerCipherer("inf_ventas_productos");

?>