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

//	field labels
$fieldLabelsinf_ventas_proveedores = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsinf_ventas_proveedores["Spanish"] = array();
	$fieldToolTipsinf_ventas_proveedores["Spanish"] = array();
	$fieldLabelsinf_ventas_proveedores["Spanish"]["idarticulo"] = "Artículo";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["idarticulo"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["precio"] = "Precio";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["precio"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["cantidad"] = "Cantidad";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["cantidad"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["importe"] = "Importe";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["importe"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["subtotal"] = "Sub total";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["subtotal"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["descuento"] = "Descuento";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["descuento"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["ganancia"] = "Ganancia";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["ganancia"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["idventa"] = "Nº Venta";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["idventa"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["fecha"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["total_venta"] = "Total Venta";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["total_venta"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["observacion"] = "Observacion";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["observacion"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["anulada"] = "Anulada";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["anulada"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["codigo"] = "Código";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["codigo"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["idproveedor"] = "Proveedor";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["idproveedor"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["costo_unidad"] = "Costo x unid.";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["costo_unidad"] = "";
	$fieldLabelsinf_ventas_proveedores["Spanish"]["costo_total"] = "Costo total";
	$fieldToolTipsinf_ventas_proveedores["Spanish"]["costo_total"] = "";
	if (count($fieldToolTipsinf_ventas_proveedores["Spanish"]))
		$tdatainf_ventas_proveedores[".isUseToolTips"] = true;
}
	
	
	$tdatainf_ventas_proveedores[".NCSearch"] = true;



$tdatainf_ventas_proveedores[".shortTableName"] = "inf_ventas_proveedores";
$tdatainf_ventas_proveedores[".nSecOptions"] = 0;
$tdatainf_ventas_proveedores[".recsPerRowList"] = 1;
$tdatainf_ventas_proveedores[".mainTableOwnerID"] = "";
$tdatainf_ventas_proveedores[".moveNext"] = 1;
$tdatainf_ventas_proveedores[".nType"] = 1;

$tdatainf_ventas_proveedores[".strOriginalTableName"] = "venta";




$tdatainf_ventas_proveedores[".showAddInPopup"] = false;

$tdatainf_ventas_proveedores[".showEditInPopup"] = false;

$tdatainf_ventas_proveedores[".showViewInPopup"] = false;

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

	$tdatainf_ventas_proveedores[".audit"] = false;

	$tdatainf_ventas_proveedores[".locking"] = false;

$tdatainf_ventas_proveedores[".inlineAdd"] = true;

$tdatainf_ventas_proveedores[".exportTo"] = true;

$tdatainf_ventas_proveedores[".printFriendly"] = true;


$tdatainf_ventas_proveedores[".showSimpleSearchOptions"] = false;

$tdatainf_ventas_proveedores[".showSearchPanel"] = true;

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

$tdatainf_ventas_proveedores[".rowHighlite"] = true;

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

$tdatainf_ventas_proveedores[".addPageEvents"] = true;

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




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

$tdatainf_ventas_proveedores[".allSearchFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".allSearchFields"][] = "idventa";
$tdatainf_ventas_proveedores[".allSearchFields"][] = "fecha";
$tdatainf_ventas_proveedores[".allSearchFields"][] = "codigo";
$tdatainf_ventas_proveedores[".allSearchFields"][] = "idproveedor";

$tdatainf_ventas_proveedores[".googleLikeFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".googleLikeFields"][] = "costo_unidad";
$tdatainf_ventas_proveedores[".googleLikeFields"][] = "costo_total";
$tdatainf_ventas_proveedores[".googleLikeFields"][] = "idventa";
$tdatainf_ventas_proveedores[".googleLikeFields"][] = "fecha";
$tdatainf_ventas_proveedores[".googleLikeFields"][] = "codigo";
$tdatainf_ventas_proveedores[".googleLikeFields"][] = "idproveedor";

$tdatainf_ventas_proveedores[".panelSearchFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".panelSearchFields"][] = "idventa";
$tdatainf_ventas_proveedores[".panelSearchFields"][] = "fecha";
$tdatainf_ventas_proveedores[".panelSearchFields"][] = "codigo";
$tdatainf_ventas_proveedores[".panelSearchFields"][] = "idproveedor";

$tdatainf_ventas_proveedores[".advSearchFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".advSearchFields"][] = "idventa";
$tdatainf_ventas_proveedores[".advSearchFields"][] = "fecha";
$tdatainf_ventas_proveedores[".advSearchFields"][] = "codigo";
$tdatainf_ventas_proveedores[".advSearchFields"][] = "idproveedor";

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

	



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


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

$tdatainf_ventas_proveedores[".pageSize"] = 20;

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

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

$tdatainf_ventas_proveedores[".sqlHead"] = "SELECT 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.idventa,  venta.fecha,  venta.total_venta,  venta.observacion,  venta.anulada,  articulo.codigo,  articulo.idproveedor";
$tdatainf_ventas_proveedores[".sqlFrom"] = "FROM det_venta  INNER JOIN venta ON det_venta.idventa = venta.idventa  INNER JOIN articulo ON det_venta.idarticulo = articulo.idarticulo";
$tdatainf_ventas_proveedores[".sqlWhereExpr"] = "";
$tdatainf_ventas_proveedores[".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_proveedores[".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_proveedores[".arrGroupsPerPage"] = $arrGPP;

$tableKeysinf_ventas_proveedores = array();
$tdatainf_ventas_proveedores[".Keys"] = $tableKeysinf_ventas_proveedores;

$tdatainf_ventas_proveedores[".listFields"] = array();
$tdatainf_ventas_proveedores[".listFields"][] = "fecha";
$tdatainf_ventas_proveedores[".listFields"][] = "idventa";
$tdatainf_ventas_proveedores[".listFields"][] = "codigo";
$tdatainf_ventas_proveedores[".listFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".listFields"][] = "costo_unidad";
$tdatainf_ventas_proveedores[".listFields"][] = "cantidad";
$tdatainf_ventas_proveedores[".listFields"][] = "costo_total";
$tdatainf_ventas_proveedores[".listFields"][] = "idproveedor";
$tdatainf_ventas_proveedores[".listFields"][] = "subtotal";
$tdatainf_ventas_proveedores[".listFields"][] = "descuento";
$tdatainf_ventas_proveedores[".listFields"][] = "ganancia";

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

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

$tdatainf_ventas_proveedores[".inlineAddFields"] = array();
$tdatainf_ventas_proveedores[".inlineAddFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".inlineAddFields"][] = "costo_unidad";
$tdatainf_ventas_proveedores[".inlineAddFields"][] = "costo_total";

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

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

$tdatainf_ventas_proveedores[".exportFields"] = array();
$tdatainf_ventas_proveedores[".exportFields"][] = "fecha";
$tdatainf_ventas_proveedores[".exportFields"][] = "idventa";
$tdatainf_ventas_proveedores[".exportFields"][] = "codigo";
$tdatainf_ventas_proveedores[".exportFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".exportFields"][] = "costo_unidad";
$tdatainf_ventas_proveedores[".exportFields"][] = "cantidad";
$tdatainf_ventas_proveedores[".exportFields"][] = "costo_total";
$tdatainf_ventas_proveedores[".exportFields"][] = "idproveedor";
$tdatainf_ventas_proveedores[".exportFields"][] = "subtotal";
$tdatainf_ventas_proveedores[".exportFields"][] = "descuento";
$tdatainf_ventas_proveedores[".exportFields"][] = "ganancia";

$tdatainf_ventas_proveedores[".printFields"] = array();
$tdatainf_ventas_proveedores[".printFields"][] = "fecha";
$tdatainf_ventas_proveedores[".printFields"][] = "idventa";
$tdatainf_ventas_proveedores[".printFields"][] = "codigo";
$tdatainf_ventas_proveedores[".printFields"][] = "idarticulo";
$tdatainf_ventas_proveedores[".printFields"][] = "costo_unidad";
$tdatainf_ventas_proveedores[".printFields"][] = "cantidad";
$tdatainf_ventas_proveedores[".printFields"][] = "costo_total";
$tdatainf_ventas_proveedores[".printFields"][] = "idproveedor";
$tdatainf_ventas_proveedores[".printFields"][] = "subtotal";
$tdatainf_ventas_proveedores[".printFields"][] = "descuento";
$tdatainf_ventas_proveedores[".printFields"][] = "ganancia";

//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Artículo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = 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"] = "nombre";
	
		
	$edata["LookupTable"] = "articulo";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:250px;";
	$edata["controlWidth"] = 250;
	
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas_proveedores["idarticulo"] = $fdata;
//	costo_unidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "costo_unidad";
	$fdata["GoodName"] = "costo_unidad";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Costo x unid."; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = 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_proveedores["costo_unidad"] = $fdata;
//	costo_total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "costo_total";
	$fdata["GoodName"] = "costo_total";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = "Costo total"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = 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_proveedores["costo_total"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "precio";
	$fdata["GoodName"] = "precio";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Precio"; 
	$fdata["FieldType"] = 3;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "precio"; 
		$fdata["FullName"] = "det_venta.precio";
	
		
		
				
				$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_proveedores["precio"] = $fdata;
//	cantidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "cantidad";
	$fdata["GoodName"] = "cantidad";
	$fdata["ownerTable"] = "det_venta";
	$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["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_proveedores["cantidad"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "importe";
	$fdata["GoodName"] = "importe";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Importe"; 
	$fdata["FieldType"] = 3;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "importe"; 
		$fdata["FullName"] = "det_venta.importe";
	
		
		
				
				$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_proveedores["importe"] = $fdata;
//	subtotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "subtotal";
	$fdata["GoodName"] = "subtotal";
	$fdata["ownerTable"] = "det_venta";
	$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["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_proveedores["subtotal"] = $fdata;
//	descuento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "descuento";
	$fdata["GoodName"] = "descuento";
	$fdata["ownerTable"] = "det_venta";
	$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_proveedores["descuento"] = $fdata;
//	ganancia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "ganancia";
	$fdata["GoodName"] = "ganancia";
	$fdata["ownerTable"] = "det_venta";
	$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_proveedores["ganancia"] = $fdata;
//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "idventa";
	$fdata["GoodName"] = "idventa";
	$fdata["ownerTable"] = "det_venta";
	$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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$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_proveedores["idventa"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "fecha";
	$fdata["GoodName"] = "fecha";
	$fdata["ownerTable"] = "venta";
	$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_proveedores["fecha"] = $fdata;
//	total_venta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "total_venta";
	$fdata["GoodName"] = "total_venta";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Total Venta"; 
	$fdata["FieldType"] = 3;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "total_venta"; 
		$fdata["FullName"] = "venta.total_venta";
	
		
		
				
				$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_proveedores["total_venta"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Observacion"; 
	$fdata["FieldType"] = 201;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "observacion"; 
		$fdata["FullName"] = "venta.observacion";
	
		
		
				
				$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;
	
		
		
	$tdatainf_ventas_proveedores["observacion"] = $fdata;
//	anulada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "anulada";
	$fdata["GoodName"] = "anulada";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Anulada"; 
	$fdata["FieldType"] = 200;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "anulada"; 
		$fdata["FullName"] = "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_proveedores["anulada"] = $fdata;
//	codigo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "codigo";
	$fdata["GoodName"] = "codigo";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Código"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "codigo"; 
		$fdata["FullName"] = "articulo.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"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas_proveedores["codigo"] = $fdata;
//	idproveedor
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "idproveedor";
	$fdata["GoodName"] = "idproveedor";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Proveedor"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idproveedor"; 
		$fdata["FullName"] = "articulo.idproveedor";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "idproveedor";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "denominacion";
	
		
	$edata["LookupTable"] = "proveedor";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		$edata["inputStyle"] = " width:200px;";
	$edata["controlWidth"] = 200;
	
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas_proveedores["idproveedor"] = $fdata;

	
$tables_data["inf_ventas_proveedores"]=&$tdatainf_ventas_proveedores;
$field_labels["inf_ventas_proveedores"] = &$fieldLabelsinf_ventas_proveedores;
$fieldToolTips["inf_ventas_proveedores"] = &$fieldToolTipsinf_ventas_proveedores;

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

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

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










function createSqlQuery_inf_ventas_proveedores()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "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.idventa,  venta.fecha,  venta.total_venta,  venta.observacion,  venta.anulada,  articulo.codigo,  articulo.idproveedor";
$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"] = "";
$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" => "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" => "costo",
	"m_strTable" => "det_venta"
));

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "importe",
	"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" => "subtotal",
	"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" => "descuento",
	"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" => "ganancia",
	"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" => "idventa",
	"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" => "fecha",
	"m_strTable" => "venta"
));

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLField(array(
	"m_strName" => "observacion",
	"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" => "anulada",
	"m_strTable" => "venta"
));

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

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

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

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

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

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

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

$proto39["m_column"]=$obj;
$proto39["m_contained"] = array();
$proto39["m_strCase"] = "";
$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"] = "venta";
$proto42["m_columns"] = array();
$proto42["m_columns"][] = "idventa";
$proto42["m_columns"][] = "fecha";
$proto42["m_columns"][] = "cliente";
$proto42["m_columns"][] = "total_venta";
$proto42["m_columns"][] = "total_cobro";
$proto42["m_columns"][] = "observacion";
$proto42["m_columns"][] = "cobrada";
$proto42["m_columns"][] = "anulada";
$obj = new SQLTable($proto42);

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

$proto43["m_column"]=$obj;
$proto43["m_contained"] = array();
$proto43["m_strCase"] = "= venta.idventa";
$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;
												$proto45=array();
$proto45["m_link"] = "SQLL_INNERJOIN";
			$proto46=array();
$proto46["m_strName"] = "articulo";
$proto46["m_columns"] = array();
$proto46["m_columns"][] = "idarticulo";
$proto46["m_columns"][] = "codigo";
$proto46["m_columns"][] = "nombre";
$proto46["m_columns"][] = "idcategoria";
$proto46["m_columns"][] = "idsubcategoria";
$proto46["m_columns"][] = "costo";
$proto46["m_columns"][] = "precio";
$proto46["m_columns"][] = "stock";
$proto46["m_columns"][] = "idproveedor";
$proto46["m_columns"][] = "fecha_carga";
$proto46["m_columns"][] = "prefijo_cod";
$proto46["m_columns"][] = "sufijo_cod";
$proto46["m_columns"][] = "ult_cod_generado";
$proto46["m_columns"][] = "observacion";
$obj = new SQLTable($proto46);

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

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

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

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

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

include_once(getabspath("include/inf_ventas_proveedores_events.php"));
$tableEvents["inf_ventas_proveedores"] = new eventclass_inf_ventas_proveedores;
$tdatainf_ventas_proveedores[".hasEvents"] = true;

$cipherer = new RunnerCipherer("inf_ventas_proveedores");

?>