<?php
require_once(getabspath("classes/cipherer.php"));
$tdatainf_cobros = array();
	$tdatainf_cobros[".NumberOfChars"] = 80; 
	$tdatainf_cobros[".ShortName"] = "inf_cobros";
	$tdatainf_cobros[".OwnerID"] = "";
	$tdatainf_cobros[".OriginalTable"] = "cobro";

//	field labels
$fieldLabelsinf_cobros = array();
if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelsinf_cobros["Spanish"] = array();
	$fieldToolTipsinf_cobros["Spanish"] = array();
	$fieldLabelsinf_cobros["Spanish"]["idcobro"] = "Nº Cobro";
	$fieldToolTipsinf_cobros["Spanish"]["idcobro"] = "";
	$fieldLabelsinf_cobros["Spanish"]["fecha"] = "Fecha";
	$fieldToolTipsinf_cobros["Spanish"]["fecha"] = "";
	$fieldLabelsinf_cobros["Spanish"]["anulado"] = "Anulado";
	$fieldToolTipsinf_cobros["Spanish"]["anulado"] = "";
	$fieldLabelsinf_cobros["Spanish"]["idventa"] = "Nº Venta";
	$fieldToolTipsinf_cobros["Spanish"]["idventa"] = "";
	$fieldLabelsinf_cobros["Spanish"]["idmovimiento"] = "Nº Movimiento";
	$fieldToolTipsinf_cobros["Spanish"]["idmovimiento"] = "";
	$fieldLabelsinf_cobros["Spanish"]["idcuenta"] = "Cuenta";
	$fieldToolTipsinf_cobros["Spanish"]["idcuenta"] = "";
	$fieldLabelsinf_cobros["Spanish"]["nro_comprobante"] = "Nº Comprobante";
	$fieldToolTipsinf_cobros["Spanish"]["nro_comprobante"] = "";
	$fieldLabelsinf_cobros["Spanish"]["idtipo_cuenta"] = "Forma Cobro";
	$fieldToolTipsinf_cobros["Spanish"]["idtipo_cuenta"] = "";
	$fieldLabelsinf_cobros["Spanish"]["importe_cobro"] = "Importe Cobro";
	$fieldToolTipsinf_cobros["Spanish"]["importe_cobro"] = "";
	$fieldLabelsinf_cobros["Spanish"]["cliente"] = "Cliente";
	$fieldToolTipsinf_cobros["Spanish"]["cliente"] = "";
	if (count($fieldToolTipsinf_cobros["Spanish"]))
		$tdatainf_cobros[".isUseToolTips"] = true;
}
	
	
	$tdatainf_cobros[".NCSearch"] = true;



$tdatainf_cobros[".shortTableName"] = "inf_cobros";
$tdatainf_cobros[".nSecOptions"] = 0;
$tdatainf_cobros[".recsPerRowList"] = 1;
$tdatainf_cobros[".mainTableOwnerID"] = "";
$tdatainf_cobros[".moveNext"] = 1;
$tdatainf_cobros[".nType"] = 1;

$tdatainf_cobros[".strOriginalTableName"] = "cobro";




$tdatainf_cobros[".showAddInPopup"] = false;

$tdatainf_cobros[".showEditInPopup"] = false;

$tdatainf_cobros[".showViewInPopup"] = false;

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

	$tdatainf_cobros[".audit"] = false;

	$tdatainf_cobros[".locking"] = false;


$tdatainf_cobros[".exportTo"] = true;

$tdatainf_cobros[".printFriendly"] = true;


$tdatainf_cobros[".showSimpleSearchOptions"] = false;

$tdatainf_cobros[".showSearchPanel"] = true;

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

$tdatainf_cobros[".rowHighlite"] = true;

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

$tdatainf_cobros[".addPageEvents"] = false;

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




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

$tdatainf_cobros[".allSearchFields"][] = "fecha";
$tdatainf_cobros[".allSearchFields"][] = "idcobro";
$tdatainf_cobros[".allSearchFields"][] = "idmovimiento";
$tdatainf_cobros[".allSearchFields"][] = "idventa";
$tdatainf_cobros[".allSearchFields"][] = "cliente";
$tdatainf_cobros[".allSearchFields"][] = "idcuenta";
$tdatainf_cobros[".allSearchFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".allSearchFields"][] = "nro_comprobante";

$tdatainf_cobros[".googleLikeFields"][] = "idcobro";
$tdatainf_cobros[".googleLikeFields"][] = "fecha";
$tdatainf_cobros[".googleLikeFields"][] = "idmovimiento";
$tdatainf_cobros[".googleLikeFields"][] = "idventa";
$tdatainf_cobros[".googleLikeFields"][] = "idcuenta";
$tdatainf_cobros[".googleLikeFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".googleLikeFields"][] = "nro_comprobante";
$tdatainf_cobros[".googleLikeFields"][] = "cliente";

$tdatainf_cobros[".panelSearchFields"][] = "fecha";
$tdatainf_cobros[".panelSearchFields"][] = "idcobro";
$tdatainf_cobros[".panelSearchFields"][] = "idmovimiento";
$tdatainf_cobros[".panelSearchFields"][] = "idventa";
$tdatainf_cobros[".panelSearchFields"][] = "cliente";
$tdatainf_cobros[".panelSearchFields"][] = "idcuenta";
$tdatainf_cobros[".panelSearchFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".panelSearchFields"][] = "nro_comprobante";

$tdatainf_cobros[".advSearchFields"][] = "fecha";
$tdatainf_cobros[".advSearchFields"][] = "idcobro";
$tdatainf_cobros[".advSearchFields"][] = "idmovimiento";
$tdatainf_cobros[".advSearchFields"][] = "idventa";
$tdatainf_cobros[".advSearchFields"][] = "cliente";
$tdatainf_cobros[".advSearchFields"][] = "idcuenta";
$tdatainf_cobros[".advSearchFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".advSearchFields"][] = "nro_comprobante";

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

	



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


$tdatainf_cobros[".totalsFields"][] = array(
	"fName" => "importe_cobro", 
	"numRows" => 0,
	"totalsType" => "TOTAL",
	"viewFormat" => 'Number');

$tdatainf_cobros[".pageSize"] = 20;

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

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

$tdatainf_cobros[".sqlHead"] = "SELECT cobro.idcobro,  cobro.fecha,  cobro.idmovimiento,  cobro.idventa,  cobro.idcuenta,  cobro.idtipo_cuenta,  cobro.importe_cobro,  cobro.nro_comprobante,  cobro.anulado,  venta.cliente";
$tdatainf_cobros[".sqlFrom"] = "FROM cobro  INNER JOIN venta ON cobro.idventa = venta.idventa";
$tdatainf_cobros[".sqlWhereExpr"] = "(cobro.anulado =\"NO\")";
$tdatainf_cobros[".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_cobros[".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_cobros[".arrGroupsPerPage"] = $arrGPP;

$tableKeysinf_cobros = array();
$tableKeysinf_cobros[] = "idcobro";
$tdatainf_cobros[".Keys"] = $tableKeysinf_cobros;

$tdatainf_cobros[".listFields"] = array();
$tdatainf_cobros[".listFields"][] = "fecha";
$tdatainf_cobros[".listFields"][] = "idcobro";
$tdatainf_cobros[".listFields"][] = "idmovimiento";
$tdatainf_cobros[".listFields"][] = "idventa";
$tdatainf_cobros[".listFields"][] = "cliente";
$tdatainf_cobros[".listFields"][] = "idcuenta";
$tdatainf_cobros[".listFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".listFields"][] = "importe_cobro";
$tdatainf_cobros[".listFields"][] = "nro_comprobante";

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

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

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

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

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

$tdatainf_cobros[".exportFields"] = array();
$tdatainf_cobros[".exportFields"][] = "fecha";
$tdatainf_cobros[".exportFields"][] = "idcobro";
$tdatainf_cobros[".exportFields"][] = "idmovimiento";
$tdatainf_cobros[".exportFields"][] = "idventa";
$tdatainf_cobros[".exportFields"][] = "cliente";
$tdatainf_cobros[".exportFields"][] = "idcuenta";
$tdatainf_cobros[".exportFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".exportFields"][] = "importe_cobro";
$tdatainf_cobros[".exportFields"][] = "nro_comprobante";

$tdatainf_cobros[".printFields"] = array();
$tdatainf_cobros[".printFields"][] = "fecha";
$tdatainf_cobros[".printFields"][] = "idcobro";
$tdatainf_cobros[".printFields"][] = "idmovimiento";
$tdatainf_cobros[".printFields"][] = "idventa";
$tdatainf_cobros[".printFields"][] = "cliente";
$tdatainf_cobros[".printFields"][] = "idcuenta";
$tdatainf_cobros[".printFields"][] = "idtipo_cuenta";
$tdatainf_cobros[".printFields"][] = "importe_cobro";
$tdatainf_cobros[".printFields"][] = "nro_comprobante";

//	idcobro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "idcobro";
	$fdata["GoodName"] = "idcobro";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Nº Cobro"; 
	$fdata["FieldType"] = 3;
	
		$fdata["AutoInc"] = true;
	
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idcobro"; 
		$fdata["FullName"] = "cobro.idcobro";
	
		
		
				$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["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_cobros["idcobro"] = $fdata;
//	fecha
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "fecha";
	$fdata["GoodName"] = "fecha";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Fecha"; 
	$fdata["FieldType"] = 7;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "fecha"; 
		$fdata["FullName"] = "cobro.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["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		$edata["DateEditType"] = 11; 
	$edata["InitialYearFactor"] = 100; 
	$edata["LastYearFactor"] = 10; 
	
		
		
		$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_cobros["fecha"] = $fdata;
//	idmovimiento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "idmovimiento";
	$fdata["GoodName"] = "idmovimiento";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Nº Movimiento"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idmovimiento"; 
		$fdata["FullName"] = "cobro.idmovimiento";
	
		
		
				$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" => "Readonly");
	
		
		
	
//	Begin Lookup settings
	//	End Lookup Settings

		$edata["IsRequired"] = true; 
	
		
		
		
			$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_cobros["idmovimiento"] = $fdata;
//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "idventa";
	$fdata["GoodName"] = "idventa";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Nº Venta"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idventa"; 
		$fdata["FullName"] = "cobro.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["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		$edata["inputStyle"] = " width:100px;";
	$edata["controlWidth"] = 100;
	
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_cobros["idventa"] = $fdata;
//	idcuenta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "idcuenta";
	$fdata["GoodName"] = "idcuenta";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Cuenta"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idcuenta"; 
		$fdata["FullName"] = "cobro.idcuenta";
	
		
		
				$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"] = "idcuenta";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "denominacion";
	
		
	$edata["LookupTable"] = "cuenta";
	$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"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_cobros["idcuenta"] = $fdata;
//	idtipo_cuenta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "idtipo_cuenta";
	$fdata["GoodName"] = "idtipo_cuenta";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Forma Cobro"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "idtipo_cuenta"; 
		$fdata["FullName"] = "cobro.idtipo_cuenta";
	
		
		
				$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"] = "idtipo_cuenta";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "nombre";
	
		
	$edata["LookupTable"] = "tipo_cuenta";
	$edata["LookupOrderBy"] = "";
	
		
		
		
		
		
				
	
	
	//	End Lookup Settings

		
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_cobros["idtipo_cuenta"] = $fdata;
//	importe_cobro
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "importe_cobro";
	$fdata["GoodName"] = "importe_cobro";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Importe Cobro"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "importe_cobro"; 
		$fdata["FullName"] = "cobro.importe_cobro";
	
		
		
				$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_cobros["importe_cobro"] = $fdata;
//	nro_comprobante
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "nro_comprobante";
	$fdata["GoodName"] = "nro_comprobante";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Nº Comprobante"; 
	$fdata["FieldType"] = 200;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		
		
		
		
		$fdata["bAdvancedSearch"] = true; 
	
		$fdata["bPrinterPage"] = true; 
	
		$fdata["bExportPage"] = true; 
	
		$fdata["strField"] = "nro_comprobante"; 
		$fdata["FullName"] = "cobro.nro_comprobante";
	
		
		
				$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"] = "";
			
		$edata["inputStyle"] = " width:100px;";
	$edata["controlWidth"] = 100;
	
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_cobros["nro_comprobante"] = $fdata;
//	anulado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "anulado";
	$fdata["GoodName"] = "anulado";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Anulado"; 
	$fdata["FieldType"] = 200;
	
		
		
		
		
		
		
		
		
		
		
		
		$fdata["strField"] = "anulado"; 
		$fdata["FullName"] = "cobro.anulado";
	
		
		
				
				$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"] = "";
			$edata["EditParams"].= " maxlength=2";
	
		
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_cobros["anulado"] = $fdata;
//	cliente
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "cliente";
	$fdata["GoodName"] = "cliente";
	$fdata["ownerTable"] = "venta";
	$fdata["Label"] = "Cliente"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = 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"]["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();
				if(strpos(GetUserPermissions("inf_cobros"), '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["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		
		
//	Begin validation
	$edata["validateAs"] = array();
						
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatainf_cobros["cliente"] = $fdata;

	
$tables_data["inf_cobros"]=&$tdatainf_cobros;
$field_labels["inf_cobros"] = &$fieldLabelsinf_cobros;
$fieldToolTips["inf_cobros"] = &$fieldToolTipsinf_cobros;

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

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

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










function createSqlQuery_inf_cobros()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "cobro.idcobro,  cobro.fecha,  cobro.idmovimiento,  cobro.idventa,  cobro.idcuenta,  cobro.idtipo_cuenta,  cobro.importe_cobro,  cobro.nro_comprobante,  cobro.anulado,  venta.cliente";
$proto0["m_strFrom"] = "FROM cobro  INNER JOIN venta ON cobro.idventa = venta.idventa";
$proto0["m_strWhere"] = "(cobro.anulado =\"NO\")";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "cobro.anulado =\"NO\"";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "anulado",
	"m_strTable" => "cobro"
));

$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" => "idcobro",
	"m_strTable" => "cobro"
));

$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" => "cobro"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto25=array();
$proto25["m_link"] = "SQLL_MAIN";
			$proto26=array();
$proto26["m_strName"] = "cobro";
$proto26["m_columns"] = array();
$proto26["m_columns"][] = "idcobro";
$proto26["m_columns"][] = "fecha";
$proto26["m_columns"][] = "idmovimiento";
$proto26["m_columns"][] = "idventa";
$proto26["m_columns"][] = "idcuenta";
$proto26["m_columns"][] = "idtipo_cuenta";
$proto26["m_columns"][] = "importe_cobro";
$proto26["m_columns"][] = "nro_comprobante";
$proto26["m_columns"][] = "anulado";
$obj = new SQLTable($proto26);

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

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

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

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

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

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

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

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

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

include_once(getabspath("include/inf_cobros_events.php"));
$tableEvents["inf_cobros"] = new eventclass_inf_cobros;
$tdatainf_cobros[".hasEvents"] = true;

$cipherer = new RunnerCipherer("inf_cobros");

?>