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

//	field labels
$fieldLabelsinf_ventas = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsinf_ventas["Spanish"] = array();
	$fieldToolTipsinf_ventas["Spanish"] = array();
	$fieldLabelsinf_ventas["Spanish"]["idventa"] = "Nº Venta";
	$fieldToolTipsinf_ventas["Spanish"]["idventa"] = "";
	$fieldLabelsinf_ventas["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipsinf_ventas["Spanish"]["fecha"] = "";
	$fieldLabelsinf_ventas["Spanish"]["cliente"] = "Cliente";
	$fieldToolTipsinf_ventas["Spanish"]["cliente"] = "";
	$fieldLabelsinf_ventas["Spanish"]["observacion"] = "Observación";
	$fieldToolTipsinf_ventas["Spanish"]["observacion"] = "";
	$fieldLabelsinf_ventas["Spanish"]["idarticulo"] = "Artículo";
	$fieldToolTipsinf_ventas["Spanish"]["idarticulo"] = "";
	$fieldLabelsinf_ventas["Spanish"]["costo"] = "Costo";
	$fieldToolTipsinf_ventas["Spanish"]["costo"] = "";
	$fieldLabelsinf_ventas["Spanish"]["precio"] = "Precio";
	$fieldToolTipsinf_ventas["Spanish"]["precio"] = "";
	$fieldLabelsinf_ventas["Spanish"]["cantidad"] = "Cantidad";
	$fieldToolTipsinf_ventas["Spanish"]["cantidad"] = "";
	$fieldLabelsinf_ventas["Spanish"]["importe"] = "Importe";
	$fieldToolTipsinf_ventas["Spanish"]["importe"] = "";
	$fieldLabelsinf_ventas["Spanish"]["subtotal"] = "Sub Total";
	$fieldToolTipsinf_ventas["Spanish"]["subtotal"] = "";
	$fieldLabelsinf_ventas["Spanish"]["descuento"] = "Descuento";
	$fieldToolTipsinf_ventas["Spanish"]["descuento"] = "";
	$fieldLabelsinf_ventas["Spanish"]["ganancia"] = "Ganancia";
	$fieldToolTipsinf_ventas["Spanish"]["ganancia"] = "";
	$fieldLabelsinf_ventas["Spanish"]["cobrada"] = "Cobrada";
	$fieldToolTipsinf_ventas["Spanish"]["cobrada"] = "";
	$fieldLabelsinf_ventas["Spanish"]["total_venta"] = "Total Venta";
	$fieldToolTipsinf_ventas["Spanish"]["total_venta"] = "";
	$fieldLabelsinf_ventas["Spanish"]["total_cobro"] = "Total Cobro";
	$fieldToolTipsinf_ventas["Spanish"]["total_cobro"] = "";
	$fieldLabelsinf_ventas["Spanish"]["anulada"] = "Anulada";
	$fieldToolTipsinf_ventas["Spanish"]["anulada"] = "";
	if (count($fieldToolTipsinf_ventas["Spanish"]))
		$tdatainf_ventas[".isUseToolTips"] = true;
}
	
	
	$tdatainf_ventas[".NCSearch"] = true;



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

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




$tdatainf_ventas[".showAddInPopup"] = false;

$tdatainf_ventas[".showEditInPopup"] = false;

$tdatainf_ventas[".showViewInPopup"] = false;

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

	$tdatainf_ventas[".audit"] = false;

	$tdatainf_ventas[".locking"] = false;

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

$tdatainf_ventas[".exportTo"] = true;

$tdatainf_ventas[".printFriendly"] = true;

$tdatainf_ventas[".delete"] = true;

$tdatainf_ventas[".showSimpleSearchOptions"] = false;

$tdatainf_ventas[".showSearchPanel"] = true;

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


// button handlers file names

$tdatainf_ventas[".addPageEvents"] = false;

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




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

$tdatainf_ventas[".allSearchFields"][] = "idventa";
$tdatainf_ventas[".allSearchFields"][] = "fecha";
$tdatainf_ventas[".allSearchFields"][] = "cliente";
$tdatainf_ventas[".allSearchFields"][] = "total_venta";
$tdatainf_ventas[".allSearchFields"][] = "total_cobro";
$tdatainf_ventas[".allSearchFields"][] = "observacion";
$tdatainf_ventas[".allSearchFields"][] = "cobrada";
$tdatainf_ventas[".allSearchFields"][] = "idarticulo";
$tdatainf_ventas[".allSearchFields"][] = "costo";
$tdatainf_ventas[".allSearchFields"][] = "precio";
$tdatainf_ventas[".allSearchFields"][] = "cantidad";
$tdatainf_ventas[".allSearchFields"][] = "importe";
$tdatainf_ventas[".allSearchFields"][] = "subtotal";
$tdatainf_ventas[".allSearchFields"][] = "descuento";
$tdatainf_ventas[".allSearchFields"][] = "ganancia";
$tdatainf_ventas[".allSearchFields"][] = "anulada";

$tdatainf_ventas[".googleLikeFields"][] = "idventa";
$tdatainf_ventas[".googleLikeFields"][] = "fecha";
$tdatainf_ventas[".googleLikeFields"][] = "cliente";
$tdatainf_ventas[".googleLikeFields"][] = "total_venta";
$tdatainf_ventas[".googleLikeFields"][] = "total_cobro";
$tdatainf_ventas[".googleLikeFields"][] = "observacion";
$tdatainf_ventas[".googleLikeFields"][] = "cobrada";
$tdatainf_ventas[".googleLikeFields"][] = "idarticulo";
$tdatainf_ventas[".googleLikeFields"][] = "costo";
$tdatainf_ventas[".googleLikeFields"][] = "precio";
$tdatainf_ventas[".googleLikeFields"][] = "cantidad";
$tdatainf_ventas[".googleLikeFields"][] = "importe";
$tdatainf_ventas[".googleLikeFields"][] = "subtotal";
$tdatainf_ventas[".googleLikeFields"][] = "descuento";
$tdatainf_ventas[".googleLikeFields"][] = "ganancia";
$tdatainf_ventas[".googleLikeFields"][] = "anulada";

$tdatainf_ventas[".panelSearchFields"][] = "idventa";
$tdatainf_ventas[".panelSearchFields"][] = "fecha";
$tdatainf_ventas[".panelSearchFields"][] = "cliente";
$tdatainf_ventas[".panelSearchFields"][] = "observacion";
$tdatainf_ventas[".panelSearchFields"][] = "cobrada";

$tdatainf_ventas[".advSearchFields"][] = "idventa";
$tdatainf_ventas[".advSearchFields"][] = "fecha";
$tdatainf_ventas[".advSearchFields"][] = "cliente";
$tdatainf_ventas[".advSearchFields"][] = "total_venta";
$tdatainf_ventas[".advSearchFields"][] = "total_cobro";
$tdatainf_ventas[".advSearchFields"][] = "observacion";
$tdatainf_ventas[".advSearchFields"][] = "cobrada";
$tdatainf_ventas[".advSearchFields"][] = "idarticulo";
$tdatainf_ventas[".advSearchFields"][] = "costo";
$tdatainf_ventas[".advSearchFields"][] = "precio";
$tdatainf_ventas[".advSearchFields"][] = "cantidad";
$tdatainf_ventas[".advSearchFields"][] = "importe";
$tdatainf_ventas[".advSearchFields"][] = "subtotal";
$tdatainf_ventas[".advSearchFields"][] = "descuento";
$tdatainf_ventas[".advSearchFields"][] = "ganancia";
$tdatainf_ventas[".advSearchFields"][] = "anulada";

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

$tdatainf_ventas[".reportGroupFields"] = true;
	



// 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;
$tdatainf_ventas[".strOrderBy"] = $tstrOrderBy;

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

$tdatainf_ventas[".sqlHead"] = "SELECT venta.idventa,  venta.fecha,  venta.cliente,  venta.total_venta,  venta.total_cobro,  venta.observacion,  venta.cobrada,  det_venta.idarticulo,  det_venta.costo,  det_venta.precio,  det_venta.cantidad,  det_venta.importe,  det_venta.subtotal,  det_venta.descuento,  det_venta.ganancia,  venta.anulada";
$tdatainf_ventas[".sqlFrom"] = "FROM venta  INNER JOIN det_venta ON venta.idventa = det_venta.idventa";
$tdatainf_ventas[".sqlWhereExpr"] = "(venta.anulada =\"NO\")";
$tdatainf_ventas[".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[".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[".arrGroupsPerPage"] = $arrGPP;

$tableKeysinf_ventas = array();
$tableKeysinf_ventas[] = "idventa";
$tdatainf_ventas[".Keys"] = $tableKeysinf_ventas;

$tdatainf_ventas[".listFields"] = array();
$tdatainf_ventas[".listFields"][] = "idventa";
$tdatainf_ventas[".listFields"][] = "fecha";
$tdatainf_ventas[".listFields"][] = "cliente";
$tdatainf_ventas[".listFields"][] = "total_venta";
$tdatainf_ventas[".listFields"][] = "total_cobro";
$tdatainf_ventas[".listFields"][] = "observacion";
$tdatainf_ventas[".listFields"][] = "cobrada";
$tdatainf_ventas[".listFields"][] = "idarticulo";
$tdatainf_ventas[".listFields"][] = "costo";
$tdatainf_ventas[".listFields"][] = "precio";
$tdatainf_ventas[".listFields"][] = "cantidad";
$tdatainf_ventas[".listFields"][] = "importe";
$tdatainf_ventas[".listFields"][] = "subtotal";
$tdatainf_ventas[".listFields"][] = "descuento";
$tdatainf_ventas[".listFields"][] = "ganancia";
$tdatainf_ventas[".listFields"][] = "anulada";

$tdatainf_ventas[".viewFields"] = array();
$tdatainf_ventas[".viewFields"][] = "idventa";
$tdatainf_ventas[".viewFields"][] = "fecha";
$tdatainf_ventas[".viewFields"][] = "cliente";
$tdatainf_ventas[".viewFields"][] = "total_venta";
$tdatainf_ventas[".viewFields"][] = "total_cobro";
$tdatainf_ventas[".viewFields"][] = "observacion";
$tdatainf_ventas[".viewFields"][] = "cobrada";
$tdatainf_ventas[".viewFields"][] = "idarticulo";
$tdatainf_ventas[".viewFields"][] = "costo";
$tdatainf_ventas[".viewFields"][] = "precio";
$tdatainf_ventas[".viewFields"][] = "cantidad";
$tdatainf_ventas[".viewFields"][] = "importe";
$tdatainf_ventas[".viewFields"][] = "subtotal";
$tdatainf_ventas[".viewFields"][] = "descuento";
$tdatainf_ventas[".viewFields"][] = "ganancia";
$tdatainf_ventas[".viewFields"][] = "anulada";

$tdatainf_ventas[".addFields"] = array();
$tdatainf_ventas[".addFields"][] = "fecha";
$tdatainf_ventas[".addFields"][] = "cliente";
$tdatainf_ventas[".addFields"][] = "total_venta";
$tdatainf_ventas[".addFields"][] = "total_cobro";
$tdatainf_ventas[".addFields"][] = "observacion";
$tdatainf_ventas[".addFields"][] = "cobrada";
$tdatainf_ventas[".addFields"][] = "anulada";

$tdatainf_ventas[".inlineAddFields"] = array();
$tdatainf_ventas[".inlineAddFields"][] = "fecha";
$tdatainf_ventas[".inlineAddFields"][] = "cliente";
$tdatainf_ventas[".inlineAddFields"][] = "total_venta";
$tdatainf_ventas[".inlineAddFields"][] = "total_cobro";
$tdatainf_ventas[".inlineAddFields"][] = "observacion";
$tdatainf_ventas[".inlineAddFields"][] = "cobrada";
$tdatainf_ventas[".inlineAddFields"][] = "idarticulo";
$tdatainf_ventas[".inlineAddFields"][] = "costo";
$tdatainf_ventas[".inlineAddFields"][] = "precio";
$tdatainf_ventas[".inlineAddFields"][] = "cantidad";
$tdatainf_ventas[".inlineAddFields"][] = "importe";
$tdatainf_ventas[".inlineAddFields"][] = "subtotal";
$tdatainf_ventas[".inlineAddFields"][] = "descuento";
$tdatainf_ventas[".inlineAddFields"][] = "ganancia";
$tdatainf_ventas[".inlineAddFields"][] = "anulada";

$tdatainf_ventas[".editFields"] = array();
$tdatainf_ventas[".editFields"][] = "fecha";
$tdatainf_ventas[".editFields"][] = "cliente";
$tdatainf_ventas[".editFields"][] = "total_venta";
$tdatainf_ventas[".editFields"][] = "total_cobro";
$tdatainf_ventas[".editFields"][] = "observacion";
$tdatainf_ventas[".editFields"][] = "cobrada";
$tdatainf_ventas[".editFields"][] = "anulada";

$tdatainf_ventas[".inlineEditFields"] = array();
$tdatainf_ventas[".inlineEditFields"][] = "fecha";
$tdatainf_ventas[".inlineEditFields"][] = "cliente";
$tdatainf_ventas[".inlineEditFields"][] = "total_venta";
$tdatainf_ventas[".inlineEditFields"][] = "total_cobro";
$tdatainf_ventas[".inlineEditFields"][] = "observacion";
$tdatainf_ventas[".inlineEditFields"][] = "cobrada";
$tdatainf_ventas[".inlineEditFields"][] = "idarticulo";
$tdatainf_ventas[".inlineEditFields"][] = "costo";
$tdatainf_ventas[".inlineEditFields"][] = "precio";
$tdatainf_ventas[".inlineEditFields"][] = "cantidad";
$tdatainf_ventas[".inlineEditFields"][] = "importe";
$tdatainf_ventas[".inlineEditFields"][] = "subtotal";
$tdatainf_ventas[".inlineEditFields"][] = "descuento";
$tdatainf_ventas[".inlineEditFields"][] = "ganancia";
$tdatainf_ventas[".inlineEditFields"][] = "anulada";

$tdatainf_ventas[".exportFields"] = array();
$tdatainf_ventas[".exportFields"][] = "idventa";
$tdatainf_ventas[".exportFields"][] = "fecha";
$tdatainf_ventas[".exportFields"][] = "cliente";
$tdatainf_ventas[".exportFields"][] = "total_venta";
$tdatainf_ventas[".exportFields"][] = "total_cobro";
$tdatainf_ventas[".exportFields"][] = "observacion";
$tdatainf_ventas[".exportFields"][] = "cobrada";
$tdatainf_ventas[".exportFields"][] = "idarticulo";
$tdatainf_ventas[".exportFields"][] = "costo";
$tdatainf_ventas[".exportFields"][] = "precio";
$tdatainf_ventas[".exportFields"][] = "cantidad";
$tdatainf_ventas[".exportFields"][] = "importe";
$tdatainf_ventas[".exportFields"][] = "subtotal";
$tdatainf_ventas[".exportFields"][] = "descuento";
$tdatainf_ventas[".exportFields"][] = "ganancia";
$tdatainf_ventas[".exportFields"][] = "anulada";

$tdatainf_ventas[".printFields"] = array();
$tdatainf_ventas[".printFields"][] = "idventa";
$tdatainf_ventas[".printFields"][] = "fecha";
$tdatainf_ventas[".printFields"][] = "cliente";
$tdatainf_ventas[".printFields"][] = "total_venta";
$tdatainf_ventas[".printFields"][] = "total_cobro";
$tdatainf_ventas[".printFields"][] = "observacion";
$tdatainf_ventas[".printFields"][] = "cobrada";
$tdatainf_ventas[".printFields"][] = "idarticulo";
$tdatainf_ventas[".printFields"][] = "costo";
$tdatainf_ventas[".printFields"][] = "precio";
$tdatainf_ventas[".printFields"][] = "cantidad";
$tdatainf_ventas[".printFields"][] = "importe";
$tdatainf_ventas[".printFields"][] = "subtotal";
$tdatainf_ventas[".printFields"][] = "descuento";
$tdatainf_ventas[".printFields"][] = "ganancia";
$tdatainf_ventas[".printFields"][] = "anulada";

//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idventa";
	$fdata["GoodName"] = "idventa";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Nº Venta"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		$fdata["bViewPage"] = true; 
	
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idventa"; 
		$fdata["FullName"] = "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["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;
	
		
		
	$tdatainf_ventas["idventa"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$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"] = 11; 
	$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;
	
		
		
	$tdatainf_ventas["fecha"] = $fdata;
//	cliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "cliente";
	$fdata["GoodName"] = "cliente";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Cliente"; 
	$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"] = "cliente"; 
		$fdata["FullName"] = "venta.cliente";
	
		
		
				$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" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				if(strpos(GetUserPermissions("inf_ventas"), 'S') !== false)
		$edata["LCType"] = 2;
	else 
		$edata["LCType"] = 0;
			
		
			
	$edata["LinkField"] = "idcliente";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "denominacion";
	
		
	$edata["LookupTable"] = "cliente";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas["cliente"] = $fdata;
//	total_venta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "total_venta";
	$fdata["GoodName"] = "total_venta";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Total Venta"; 
	$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"] = "total_venta"; 
		$fdata["FullName"] = "venta.total_venta";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["total_venta"] = $fdata;
//	total_cobro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "total_cobro";
	$fdata["GoodName"] = "total_cobro";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Total Cobro"; 
	$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"] = "total_cobro"; 
		$fdata["FullName"] = "venta.total_cobro";
	
		
		
				$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;
	
		
		
	$tdatainf_ventas["total_cobro"] = $fdata;
//	observacion
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "observacion";
	$fdata["GoodName"] = "observacion";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Observación"; 
	$fdata["FieldType"] = 201;
	
		
		
		$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"] = "observacion"; 
		$fdata["FullName"] = "venta.observacion";
	
		
		
				$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 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"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas["observacion"] = $fdata;
//	cobrada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "cobrada";
	$fdata["GoodName"] = "cobrada";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Cobrada"; 
	$fdata["FieldType"] = 200;
	
		
		
		$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"] = "cobrada"; 
		$fdata["FullName"] = "venta.cobrada";
	
		
		
				$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" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
					$edata["LookupType"] = 0;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
		
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "SI";
	$edata["LookupValues"][] = "NO";

	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas["cobrada"] = $fdata;
//	idarticulo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "idarticulo";
	$fdata["GoodName"] = "idarticulo";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Artículo"; 
	$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"] = "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" => "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;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
		
		$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_ventas["idarticulo"] = $fdata;
//	costo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "costo";
	$fdata["GoodName"] = "costo";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Costo"; 
	$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" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["costo"] = $fdata;
//	precio
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$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" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["precio"] = $fdata;
//	cantidad
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$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" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["cantidad"] = $fdata;
//	importe
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$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" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["importe"] = $fdata;
//	subtotal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "subtotal";
	$fdata["GoodName"] = "subtotal";
	$fdata["ownerTable"] = "det_venta";
	$fdata["Label"] = "Sub 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"] = "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"]["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;
	
		
		
	$tdatainf_ventas["subtotal"] = $fdata;
//	descuento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$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" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["descuento"] = $fdata;
//	ganancia
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$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" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$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;
	
		
		
	$tdatainf_ventas["ganancia"] = $fdata;
//	anulada
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 16;
	$fdata["strName"] = "anulada";
	$fdata["GoodName"] = "anulada";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Anulada"; 
	$fdata["FieldType"] = 200;
	
		
		
		$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"] = "anulada"; 
		$fdata["FullName"] = "venta.anulada";
	
		
		
				
				$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;
	
		
		
	$tdatainf_ventas["anulada"] = $fdata;

	
$tables_data["inf_ventas"]=&$tdatainf_ventas;
$field_labels["inf_ventas"] = &$fieldLabelsinf_ventas;
$fieldToolTips["inf_ventas"] = &$fieldToolTipsinf_ventas;

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

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

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










function createSqlQuery_inf_ventas()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "venta.idventa,  venta.fecha,  venta.cliente,  venta.total_venta,  venta.total_cobro,  venta.observacion,  venta.cobrada,  det_venta.idarticulo,  det_venta.costo,  det_venta.precio,  det_venta.cantidad,  det_venta.importe,  det_venta.subtotal,  det_venta.descuento,  det_venta.ganancia,  venta.anulada";
$proto0["m_strFrom"] = "FROM venta  INNER JOIN det_venta ON venta.idventa = det_venta.idventa";
$proto0["m_strWhere"] = "(venta.anulada =\"NO\")";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "venta.anulada =\"NO\"";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "anulada",
	"m_strTable" => "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" => "idventa",
	"m_strTable" => "venta"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "idarticulo",
	"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" => "costo",
	"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" => "precio",
	"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" => "cantidad",
	"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" => "importe",
	"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" => "subtotal",
	"m_strTable" => "det_venta"
));

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

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

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

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

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

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

$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"] = "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"] = "";
$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"] = "det_venta";
$proto42["m_columns"] = array();
$proto42["m_columns"][] = "iddet_venta";
$proto42["m_columns"][] = "idventa";
$proto42["m_columns"][] = "idarticulo";
$proto42["m_columns"][] = "costo";
$proto42["m_columns"][] = "precio";
$proto42["m_columns"][] = "cantidad";
$proto42["m_columns"][] = "importe";
$proto42["m_columns"][] = "subtotal";
$proto42["m_columns"][] = "descuento";
$proto42["m_columns"][] = "ganancia";
$proto42["m_columns"][] = "anulada";
$obj = new SQLTable($proto42);

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

$proto43["m_column"]=$obj;
$proto43["m_contained"] = array();
$proto43["m_strCase"] = "= det_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;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
$obj = new SQLQuery($proto0);

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

include_once(getabspath("include/inf_ventas_events.php"));
$tableEvents["inf_ventas"] = new eventclass_inf_ventas;
$tdatainf_ventas[".hasEvents"] = true;

$cipherer = new RunnerCipherer("inf_ventas");

?>