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

//	field labels
$fieldLabelsinforme = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsinforme["Spanish"] = array();
	$fieldToolTipsinforme["Spanish"] = array();
	$fieldLabelsinforme["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipsinforme["Spanish"]["fecha"] = "";
	$fieldLabelsinforme["Spanish"]["idarticulo"] = "Artículo";
	$fieldToolTipsinforme["Spanish"]["idarticulo"] = "";
	$fieldLabelsinforme["Spanish"]["iddet_venta"] = "Iddet Venta";
	$fieldToolTipsinforme["Spanish"]["iddet_venta"] = "";
	$fieldLabelsinforme["Spanish"]["idventa"] = "Idventa";
	$fieldToolTipsinforme["Spanish"]["idventa"] = "";
	$fieldLabelsinforme["Spanish"]["costo_unidad"] = "Costo Unidad";
	$fieldToolTipsinforme["Spanish"]["costo_unidad"] = "";
	$fieldLabelsinforme["Spanish"]["costo_total"] = "Costo Total";
	$fieldToolTipsinforme["Spanish"]["costo_total"] = "";
	$fieldLabelsinforme["Spanish"]["precio"] = "Precio";
	$fieldToolTipsinforme["Spanish"]["precio"] = "";
	$fieldLabelsinforme["Spanish"]["cantidad"] = "Cantidad";
	$fieldToolTipsinforme["Spanish"]["cantidad"] = "";
	$fieldLabelsinforme["Spanish"]["importe"] = "Importe";
	$fieldToolTipsinforme["Spanish"]["importe"] = "";
	$fieldLabelsinforme["Spanish"]["subtotal"] = "Subtotal";
	$fieldToolTipsinforme["Spanish"]["subtotal"] = "";
	$fieldLabelsinforme["Spanish"]["descuento"] = "Descuento";
	$fieldToolTipsinforme["Spanish"]["descuento"] = "";
	$fieldLabelsinforme["Spanish"]["ganancia"] = "Ganancia";
	$fieldToolTipsinforme["Spanish"]["ganancia"] = "";
	$fieldLabelsinforme["Spanish"]["anulada"] = "Anulada";
	$fieldToolTipsinforme["Spanish"]["anulada"] = "";
	$fieldLabelsinforme["Spanish"]["nombre"] = "Nombre";
	$fieldToolTipsinforme["Spanish"]["nombre"] = "";
	if (count($fieldToolTipsinforme["Spanish"]))
		$tdatainforme[".isUseToolTips"] = true;
}
	
	
	$tdatainforme[".NCSearch"] = true;



$tdatainforme[".shortTableName"] = "informe";
$tdatainforme[".nSecOptions"] = 0;
$tdatainforme[".recsPerRowList"] = 1;
$tdatainforme[".mainTableOwnerID"] = "";
$tdatainforme[".moveNext"] = 1;
$tdatainforme[".nType"] = 2;

$tdatainforme[".strOriginalTableName"] = "ajuste";




$tdatainforme[".showAddInPopup"] = false;

$tdatainforme[".showEditInPopup"] = false;

$tdatainforme[".showViewInPopup"] = false;

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

	$tdatainforme[".audit"] = false;

	$tdatainforme[".locking"] = false;

$tdatainforme[".listIcons"] = true;
$tdatainforme[".edit"] = true;
$tdatainforme[".inlineEdit"] = true;
$tdatainforme[".inlineAdd"] = true;
$tdatainforme[".view"] = true;

$tdatainforme[".exportTo"] = true;

$tdatainforme[".printFriendly"] = true;

$tdatainforme[".delete"] = true;

$tdatainforme[".showSimpleSearchOptions"] = false;

$tdatainforme[".showSearchPanel"] = true;

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


// button handlers file names

$tdatainforme[".addPageEvents"] = false;

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




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

$tdatainforme[".allSearchFields"][] = "iddet_venta";
$tdatainforme[".allSearchFields"][] = "idventa";
$tdatainforme[".allSearchFields"][] = "idarticulo";
$tdatainforme[".allSearchFields"][] = "costo_unidad";
$tdatainforme[".allSearchFields"][] = "costo_total";
$tdatainforme[".allSearchFields"][] = "precio";
$tdatainforme[".allSearchFields"][] = "cantidad";
$tdatainforme[".allSearchFields"][] = "importe";
$tdatainforme[".allSearchFields"][] = "subtotal";
$tdatainforme[".allSearchFields"][] = "descuento";
$tdatainforme[".allSearchFields"][] = "ganancia";
$tdatainforme[".allSearchFields"][] = "anulada";
$tdatainforme[".allSearchFields"][] = "fecha";
$tdatainforme[".allSearchFields"][] = "nombre";

$tdatainforme[".googleLikeFields"][] = "iddet_venta";
$tdatainforme[".googleLikeFields"][] = "idventa";
$tdatainforme[".googleLikeFields"][] = "idarticulo";
$tdatainforme[".googleLikeFields"][] = "costo_unidad";
$tdatainforme[".googleLikeFields"][] = "costo_total";
$tdatainforme[".googleLikeFields"][] = "precio";
$tdatainforme[".googleLikeFields"][] = "cantidad";
$tdatainforme[".googleLikeFields"][] = "importe";
$tdatainforme[".googleLikeFields"][] = "subtotal";
$tdatainforme[".googleLikeFields"][] = "descuento";
$tdatainforme[".googleLikeFields"][] = "ganancia";
$tdatainforme[".googleLikeFields"][] = "anulada";
$tdatainforme[".googleLikeFields"][] = "fecha";
$tdatainforme[".googleLikeFields"][] = "nombre";


$tdatainforme[".advSearchFields"][] = "iddet_venta";
$tdatainforme[".advSearchFields"][] = "idventa";
$tdatainforme[".advSearchFields"][] = "idarticulo";
$tdatainforme[".advSearchFields"][] = "costo_unidad";
$tdatainforme[".advSearchFields"][] = "costo_total";
$tdatainforme[".advSearchFields"][] = "precio";
$tdatainforme[".advSearchFields"][] = "cantidad";
$tdatainforme[".advSearchFields"][] = "importe";
$tdatainforme[".advSearchFields"][] = "subtotal";
$tdatainforme[".advSearchFields"][] = "descuento";
$tdatainforme[".advSearchFields"][] = "ganancia";
$tdatainforme[".advSearchFields"][] = "anulada";
$tdatainforme[".advSearchFields"][] = "fecha";
$tdatainforme[".advSearchFields"][] = "nombre";

$tdatainforme[".isTableType"] = "report";

	



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




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

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

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

$tableKeysinforme = array();
$tdatainforme[".Keys"] = $tableKeysinforme;

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

$tdatainforme[".viewFields"] = array();
$tdatainforme[".viewFields"][] = "iddet_venta";
$tdatainforme[".viewFields"][] = "idventa";
$tdatainforme[".viewFields"][] = "idarticulo";
$tdatainforme[".viewFields"][] = "costo_unidad";
$tdatainforme[".viewFields"][] = "costo_total";
$tdatainforme[".viewFields"][] = "precio";
$tdatainforme[".viewFields"][] = "cantidad";
$tdatainforme[".viewFields"][] = "importe";
$tdatainforme[".viewFields"][] = "subtotal";
$tdatainforme[".viewFields"][] = "descuento";
$tdatainforme[".viewFields"][] = "ganancia";
$tdatainforme[".viewFields"][] = "anulada";
$tdatainforme[".viewFields"][] = "fecha";
$tdatainforme[".viewFields"][] = "nombre";

$tdatainforme[".addFields"] = array();
$tdatainforme[".addFields"][] = "idarticulo";
$tdatainforme[".addFields"][] = "fecha";

$tdatainforme[".inlineAddFields"] = array();
$tdatainforme[".inlineAddFields"][] = "iddet_venta";
$tdatainforme[".inlineAddFields"][] = "idventa";
$tdatainforme[".inlineAddFields"][] = "idarticulo";
$tdatainforme[".inlineAddFields"][] = "costo_unidad";
$tdatainforme[".inlineAddFields"][] = "costo_total";
$tdatainforme[".inlineAddFields"][] = "precio";
$tdatainforme[".inlineAddFields"][] = "cantidad";
$tdatainforme[".inlineAddFields"][] = "importe";
$tdatainforme[".inlineAddFields"][] = "subtotal";
$tdatainforme[".inlineAddFields"][] = "descuento";
$tdatainforme[".inlineAddFields"][] = "ganancia";
$tdatainforme[".inlineAddFields"][] = "anulada";
$tdatainforme[".inlineAddFields"][] = "fecha";
$tdatainforme[".inlineAddFields"][] = "nombre";

$tdatainforme[".editFields"] = array();
$tdatainforme[".editFields"][] = "idarticulo";
$tdatainforme[".editFields"][] = "fecha";

$tdatainforme[".inlineEditFields"] = array();
$tdatainforme[".inlineEditFields"][] = "iddet_venta";
$tdatainforme[".inlineEditFields"][] = "idventa";
$tdatainforme[".inlineEditFields"][] = "idarticulo";
$tdatainforme[".inlineEditFields"][] = "costo_unidad";
$tdatainforme[".inlineEditFields"][] = "costo_total";
$tdatainforme[".inlineEditFields"][] = "precio";
$tdatainforme[".inlineEditFields"][] = "cantidad";
$tdatainforme[".inlineEditFields"][] = "importe";
$tdatainforme[".inlineEditFields"][] = "subtotal";
$tdatainforme[".inlineEditFields"][] = "descuento";
$tdatainforme[".inlineEditFields"][] = "ganancia";
$tdatainforme[".inlineEditFields"][] = "anulada";
$tdatainforme[".inlineEditFields"][] = "fecha";
$tdatainforme[".inlineEditFields"][] = "nombre";

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

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

//	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["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "iddet_venta"; 
		$fdata["FullName"] = "det_venta.iddet_venta";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["iddet_venta"] = $fdata;
//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "idventa";
	$fdata["GoodName"] = "idventa";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Idventa"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = 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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["idventa"] = $fdata;
//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Artículo"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		$fdata["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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 Unidad"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["cantidad"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "importe";
	$fdata["GoodName"] = "importe";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Importe"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["importe"] = $fdata;
//	subtotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "subtotal";
	$fdata["GoodName"] = "subtotal";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Subtotal"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = 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" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "anulada"; 
		$fdata["FullName"] = "det_venta.anulada";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "");
	
		
		
		
			
		
		
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["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["bAddPage"] = true; 
	
		$fdata["bInlineAdd"] = true; 
	
		$fdata["bEditPage"] = true; 
	
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "fecha"; 
		$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"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats 	
	$fdata["EditFormats"] = array();
	
	$edata = array("EditFormat" => "Date");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 13; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["fecha"] = $fdata;
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "articulo";
	$fdata["Label"] = "Nombre"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		$fdata["bViewPage"] = 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"]["report"] = $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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainforme["nombre"] = $fdata;

	
$tables_data["informe"]=&$tdatainforme;
$field_labels["informe"] = &$fieldLabelsinforme;
$fieldToolTips["informe"] = &$fieldToolTipsinforme;

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

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

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










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

$tableEvents["informe"] = new eventsBase;
$tdatainforme[".hasEvents"] = false;

$cipherer = new RunnerCipherer("informe");

?>