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

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



$tdatacobro[".shortTableName"] = "cobro";
$tdatacobro[".nSecOptions"] = 0;
$tdatacobro[".recsPerRowList"] = 1;
$tdatacobro[".mainTableOwnerID"] = "";
$tdatacobro[".moveNext"] = 1;
$tdatacobro[".nType"] = 0;

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




$tdatacobro[".showAddInPopup"] = false;

$tdatacobro[".showEditInPopup"] = false;

$tdatacobro[".showViewInPopup"] = false;

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

	$tdatacobro[".audit"] = false;

	$tdatacobro[".locking"] = false;

$tdatacobro[".inlineEdit"] = true;
$tdatacobro[".inlineAdd"] = true;



$tdatacobro[".delete"] = true;

$tdatacobro[".showSimpleSearchOptions"] = false;

$tdatacobro[".showSearchPanel"] = true;

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

$tdatacobro[".rowHighlite"] = true;

// button handlers file names

$tdatacobro[".addPageEvents"] = true;

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




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

$tdatacobro[".allSearchFields"][] = "idcobro";
$tdatacobro[".allSearchFields"][] = "idventa";
$tdatacobro[".allSearchFields"][] = "idmovimiento";
$tdatacobro[".allSearchFields"][] = "fecha";
$tdatacobro[".allSearchFields"][] = "idcuenta";
$tdatacobro[".allSearchFields"][] = "idtipo_cuenta";
$tdatacobro[".allSearchFields"][] = "importe_cobro";
$tdatacobro[".allSearchFields"][] = "nro_comprobante";

$tdatacobro[".googleLikeFields"][] = "idcobro";
$tdatacobro[".googleLikeFields"][] = "fecha";
$tdatacobro[".googleLikeFields"][] = "idmovimiento";
$tdatacobro[".googleLikeFields"][] = "idventa";
$tdatacobro[".googleLikeFields"][] = "idcuenta";
$tdatacobro[".googleLikeFields"][] = "idtipo_cuenta";
$tdatacobro[".googleLikeFields"][] = "importe_cobro";
$tdatacobro[".googleLikeFields"][] = "nro_comprobante";
$tdatacobro[".googleLikeFields"][] = "anulado";


$tdatacobro[".advSearchFields"][] = "idcobro";
$tdatacobro[".advSearchFields"][] = "idventa";
$tdatacobro[".advSearchFields"][] = "idmovimiento";
$tdatacobro[".advSearchFields"][] = "fecha";
$tdatacobro[".advSearchFields"][] = "idcuenta";
$tdatacobro[".advSearchFields"][] = "idtipo_cuenta";
$tdatacobro[".advSearchFields"][] = "importe_cobro";
$tdatacobro[".advSearchFields"][] = "nro_comprobante";

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

	



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


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

$tdatacobro[".pageSize"] = 20;

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

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

$tdatacobro[".sqlHead"] = "SELECT idcobro,   fecha,   idmovimiento,   idventa,   idcuenta,   idtipo_cuenta,   importe_cobro,   nro_comprobante,   anulado";
$tdatacobro[".sqlFrom"] = "FROM cobro";
$tdatacobro[".sqlWhereExpr"] = "";
$tdatacobro[".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;
$tdatacobro[".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;
$tdatacobro[".arrGroupsPerPage"] = $arrGPP;

$tableKeyscobro = array();
$tableKeyscobro[] = "idcobro";
$tdatacobro[".Keys"] = $tableKeyscobro;

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

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

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

$tdatacobro[".inlineAddFields"] = array();
$tdatacobro[".inlineAddFields"][] = "idventa";
$tdatacobro[".inlineAddFields"][] = "idmovimiento";
$tdatacobro[".inlineAddFields"][] = "fecha";
$tdatacobro[".inlineAddFields"][] = "idcuenta";
$tdatacobro[".inlineAddFields"][] = "idtipo_cuenta";
$tdatacobro[".inlineAddFields"][] = "importe_cobro";
$tdatacobro[".inlineAddFields"][] = "nro_comprobante";

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

$tdatacobro[".inlineEditFields"] = array();
$tdatacobro[".inlineEditFields"][] = "idventa";
$tdatacobro[".inlineEditFields"][] = "idmovimiento";
$tdatacobro[".inlineEditFields"][] = "fecha";
$tdatacobro[".inlineEditFields"][] = "idcuenta";
$tdatacobro[".inlineEditFields"][] = "idtipo_cuenta";
$tdatacobro[".inlineEditFields"][] = "importe_cobro";
$tdatacobro[".inlineEditFields"][] = "nro_comprobante";

$tdatacobro[".exportFields"] = array();

$tdatacobro[".printFields"] = array();

//	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["strField"] = "idcobro"; 
		$fdata["FullName"] = "idcobro";
	
		
		
				$fdata["FieldPermissions"] = true;
	
				$fdata["UploadFolder"] = "files";
		
//  Begin View Formats
	$fdata["ViewFormats"] = array();
	
	$vdata = array("ViewFormat" => "Number");
	
		
		
		
			
		
		$vdata["DecimalDigits"] = 0;
	
		
		
		
		
		$vdata["NeedEncode"] = true;
	
	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

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

		$edata["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		
//	Begin validation
	$edata["validateAs"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatacobro["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "fecha"; 
		$fdata["FullName"] = "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;
	
		
		
	$tdatacobro["fecha"] = $fdata;
//	idmovimiento
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "idmovimiento";
	$fdata["GoodName"] = "idmovimiento";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Movimiento"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idmovimiento"; 
		$fdata["FullName"] = "idmovimiento";
	
		
		
				$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" => "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;
	
		
		
	$tdatacobro["idmovimiento"] = $fdata;
//	idventa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "idventa";
	$fdata["GoodName"] = "idventa";
	$fdata["ownerTable"] = "cobro";
	$fdata["Label"] = "Venta"; 
	$fdata["FieldType"] = 3;
	
		
		
		$fdata["bListPage"] = true; 
	
		
		$fdata["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idventa"; 
		$fdata["FullName"] = "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" => "Lookup wizard");
	
		
		
	
//	Begin Lookup settings
								$edata["LookupType"] = 2;
	$edata["freeInput"] = 0;
	$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
				
		
			
	$edata["LinkField"] = "idventa";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "idventa";
	
		
	$edata["LookupTable"] = "venta";
	$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;
	
		
		
	$tdatacobro["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idcuenta"; 
		$fdata["FullName"] = "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"] = "cuentas_abiertas";
	$edata["LookupOrderBy"] = "";
	
		
		$edata["LookupWhere"] = "nick = '" . $_SESSION["UserName"]."'";
	
		
		
		
				
	
	
	//	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;
	
		
		
	$tdatacobro["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "idtipo_cuenta"; 
		$fdata["FullName"] = "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["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;
	
		
		
	$tdatacobro["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "importe_cobro"; 
		$fdata["FullName"] = "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["IsRequired"] = true; 
	
		
		
		
			$edata["acceptFileTypes"] = ".+$";
	
		$edata["maxNumberOfFiles"] = 1;
	
		
		
		
		
		$edata["EditParams"] = "";
			
		$edata["inputStyle"] = " width:120px;";
	$edata["controlWidth"] = 120;
	
//	Begin validation
	$edata["validateAs"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
	
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatacobro["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["bInlineAdd"] = true; 
	
		
		$fdata["bInlineEdit"] = true; 
	
		
		$fdata["bAdvancedSearch"] = true; 
	
		
		
		$fdata["strField"] = "nro_comprobante"; 
		$fdata["FullName"] = "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["EditParams"].= " maxlength=45";
	
		$edata["inputStyle"] = " width:100px;";
	$edata["controlWidth"] = 100;
	
//	Begin validation
	$edata["validateAs"] = array();
		
			//	End validation
	
		
				
		$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats
	
		$fdata["isSeparate"] = false;
	
		
		
	$tdatacobro["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"] = "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;
	
		
		
	$tdatacobro["anulado"] = $fdata;

	
$tables_data["cobro"]=&$tdatacobro;
$field_labels["cobro"] = &$fieldLabelscobro;
$fieldToolTips["cobro"] = &$fieldToolTipscobro;

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

$mIndex = 1-1;
			$strOriginalDetailsTable="venta";
	$masterParams["mDataSourceTable"]="venta";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "venta";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();
	$masterParams["dispChildCount"]= "1";
	$masterParams["hideChild"]= "0";
	$masterParams["dispInfo"]= "1";
	$masterParams["previewOnList"]= 2;
	$masterParams["previewOnAdd"]= 1;
	$masterParams["previewOnEdit"]= 0;
	$masterParams["previewOnView"]= 0;
	$masterTablesData["cobro"][$mIndex] = $masterParams;	
		$masterTablesData["cobro"][$mIndex]["masterKeys"][]="idventa";
		$masterTablesData["cobro"][$mIndex]["detailKeys"][]="idventa";

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

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










function createSqlQuery_cobro()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "idcobro,   fecha,   idmovimiento,   idventa,   idcuenta,   idtipo_cuenta,   importe_cobro,   nro_comprobante,   anulado";
$proto0["m_strFrom"] = "FROM cobro";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
$proto0["m_strTail"] = "";
$proto0["cipherer"] = null;
$proto1=array();
$proto1["m_sql"] = "";
$proto1["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto0["m_where"] = $obj;
$proto3=array();
$proto3["m_sql"] = "";
$proto3["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$obj = new SQLField(array(
	"m_strName" => "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;
$proto0["m_fromlist"] = array();
												$proto23=array();
$proto23["m_link"] = "SQLL_MAIN";
			$proto24=array();
$proto24["m_strName"] = "cobro";
$proto24["m_columns"] = array();
$proto24["m_columns"][] = "idcobro";
$proto24["m_columns"][] = "fecha";
$proto24["m_columns"][] = "idmovimiento";
$proto24["m_columns"][] = "idventa";
$proto24["m_columns"][] = "idcuenta";
$proto24["m_columns"][] = "idtipo_cuenta";
$proto24["m_columns"][] = "importe_cobro";
$proto24["m_columns"][] = "nro_comprobante";
$proto24["m_columns"][] = "anulado";
$obj = new SQLTable($proto24);

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

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

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

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

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

include_once(getabspath("include/cobro_events.php"));
$tableEvents["cobro"] = new eventclass_cobro;
$tdatacobro[".hasEvents"] = true;

$cipherer = new RunnerCipherer("cobro");

?>