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

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



$tdatainf_utilidades[".shortTableName"] = "inf_utilidades";
$tdatainf_utilidades[".nSecOptions"] = 0;
$tdatainf_utilidades[".recsPerRowList"] = 1;
$tdatainf_utilidades[".mainTableOwnerID"] = "";
$tdatainf_utilidades[".moveNext"] = 1;
$tdatainf_utilidades[".nType"] = 1;

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




$tdatainf_utilidades[".showAddInPopup"] = false;

$tdatainf_utilidades[".showEditInPopup"] = false;

$tdatainf_utilidades[".showViewInPopup"] = false;

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

	$tdatainf_utilidades[".audit"] = false;

	$tdatainf_utilidades[".locking"] = false;


$tdatainf_utilidades[".exportTo"] = true;

$tdatainf_utilidades[".printFriendly"] = true;


$tdatainf_utilidades[".showSimpleSearchOptions"] = false;

$tdatainf_utilidades[".showSearchPanel"] = true;

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

$tdatainf_utilidades[".rowHighlite"] = true;

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

$tdatainf_utilidades[".addPageEvents"] = false;

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




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

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

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

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

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

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

	



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


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

$tdatainf_utilidades[".pageSize"] = 20;

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

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

$tdatainf_utilidades[".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_utilidades[".sqlFrom"] = "FROM det_venta  INNER JOIN venta ON det_venta.idventa = venta.idventa  INNER JOIN articulo ON det_venta.idarticulo = articulo.idarticulo";
$tdatainf_utilidades[".sqlWhereExpr"] = "(det_venta.anulada =\"NO\")";
$tdatainf_utilidades[".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_utilidades[".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_utilidades[".arrGroupsPerPage"] = $arrGPP;

$tableKeysinf_utilidades = array();
$tableKeysinf_utilidades[] = "iddet_venta";
$tdatainf_utilidades[".Keys"] = $tableKeysinf_utilidades;

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

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

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

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

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

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

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

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

//	iddet_venta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "iddet_venta";
	$fdata["GoodName"] = "iddet_venta";
	$fdata["ownerTable"] = "det_venta";
	$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_utilidades["iddet_venta"] = $fdata;
//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$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" => "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_utilidades["idventa"] = $fdata;
//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "det_venta";
	$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_utilidades["idarticulo"] = $fdata;
//	costo_unidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "costo_unidad";
	$fdata["GoodName"] = "costo_unidad";
	$fdata["ownerTable"] = "det_venta";
	$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_utilidades["costo_unidad"] = $fdata;
//	costo_total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "costo_total";
	$fdata["GoodName"] = "costo_total";
	$fdata["ownerTable"] = "";
	$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_utilidades["costo_total"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "precio";
	$fdata["GoodName"] = "precio";
	$fdata["ownerTable"] = "det_venta";
	$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_utilidades["precio"] = $fdata;
//	cantidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$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["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_utilidades["cantidad"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "importe";
	$fdata["GoodName"] = "importe";
	$fdata["ownerTable"] = "det_venta";
	$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_utilidades["importe"] = $fdata;
//	subtotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$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["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_utilidades["subtotal"] = $fdata;
//	descuento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$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_utilidades["descuento"] = $fdata;
//	ganancia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$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_utilidades["ganancia"] = $fdata;
//	anulada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "anulada";
	$fdata["GoodName"] = "anulada";
	$fdata["ownerTable"] = "det_venta";
	$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_utilidades["anulada"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$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_utilidades["fecha"] = $fdata;
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "articulo";
	$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_utilidades["nombre"] = $fdata;

	
$tables_data["inf_utilidades"]=&$tdatainf_utilidades;
$field_labels["inf_utilidades"] = &$fieldLabelsinf_utilidades;
$fieldToolTips["inf_utilidades"] = &$fieldToolTipsinf_utilidades;

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

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

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










function createSqlQuery_inf_utilidades()
{
$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_utilidades = createSqlQuery_inf_utilidades();
														$tdatainf_utilidades[".sqlquery"] = $queryData_inf_utilidades;
	
if(isset($tdatainf_utilidades["field2"])){
	$tdatainf_utilidades["field2"]["LookupTable"] = "carscars_view";
	$tdatainf_utilidades["field2"]["LookupOrderBy"] = "name";
	$tdatainf_utilidades["field2"]["LookupType"] = 4;
	$tdatainf_utilidades["field2"]["LinkField"] = "email";
	$tdatainf_utilidades["field2"]["DisplayField"] = "name";
	$tdatainf_utilidades[".hasCustomViewField"] = true;
}

include_once(getabspath("include/inf_utilidades_events.php"));
$tableEvents["inf_utilidades"] = new eventclass_inf_utilidades;
$tdatainf_utilidades[".hasEvents"] = true;

$cipherer = new RunnerCipherer("inf_utilidades");

?>