<?php
$tdatapre_ventas = array();
$tdatapre_ventas[".searchableFields"] = array();
$tdatapre_ventas[".ShortName"] = "pre_ventas";
$tdatapre_ventas[".OwnerID"] = "";
$tdatapre_ventas[".OriginalTable"] = "derecho_propietario_2";


$tdatapre_ventas[".pagesByType"] = my_json_decode( "{\"report\":[\"report\"],\"rprint\":[\"rprint\"],\"search\":[\"search\"]}" );
$tdatapre_ventas[".originalPagesByType"] = $tdatapre_ventas[".pagesByType"];
$tdatapre_ventas[".pages"] = types2pages( my_json_decode( "{\"report\":[\"report\"],\"rprint\":[\"rprint\"],\"search\":[\"search\"]}" ) );
$tdatapre_ventas[".originalPages"] = $tdatapre_ventas[".pages"];
$tdatapre_ventas[".defaultPages"] = my_json_decode( "{\"report\":\"report\",\"rprint\":\"rprint\",\"search\":\"search\"}" );
$tdatapre_ventas[".originalDefaultPages"] = $tdatapre_ventas[".defaultPages"];

//	field labels
$fieldLabelspre_ventas = array();
$fieldToolTipspre_ventas = array();
$pageTitlespre_ventas = array();
$placeHolderspre_ventas = array();

if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelspre_ventas["Spanish"] = array();
	$fieldToolTipspre_ventas["Spanish"] = array();
	$placeHolderspre_ventas["Spanish"] = array();
	$pageTitlespre_ventas["Spanish"] = array();
	$fieldLabelspre_ventas["Spanish"]["fecha_Emision"] = "Fecha";
	$fieldToolTipspre_ventas["Spanish"]["fecha_Emision"] = "";
	$placeHolderspre_ventas["Spanish"]["fecha_Emision"] = "";
	$fieldLabelspre_ventas["Spanish"]["total_bs"] = "Total Bs";
	$fieldToolTipspre_ventas["Spanish"]["total_bs"] = "";
	$placeHolderspre_ventas["Spanish"]["total_bs"] = "";
	$fieldLabelspre_ventas["Spanish"]["total_bs_literal"] = "Total Bs Literal";
	$fieldToolTipspre_ventas["Spanish"]["total_bs_literal"] = "";
	$placeHolderspre_ventas["Spanish"]["total_bs_literal"] = "";
	$fieldLabelspre_ventas["Spanish"]["sub_total_acciones"] = "Sub Total Acciones";
	$fieldToolTipspre_ventas["Spanish"]["sub_total_acciones"] = "";
	$placeHolderspre_ventas["Spanish"]["sub_total_acciones"] = "";
	$fieldLabelspre_ventas["Spanish"]["total_acumulado"] = "Total Acumulado";
	$fieldToolTipspre_ventas["Spanish"]["total_acumulado"] = "";
	$placeHolderspre_ventas["Spanish"]["total_acumulado"] = "";
	$fieldLabelspre_ventas["Spanish"]["id_Pre_venta"] = "Id Pre Venta";
	$fieldToolTipspre_ventas["Spanish"]["id_Pre_venta"] = "";
	$placeHolderspre_ventas["Spanish"]["id_Pre_venta"] = "";
	$fieldLabelspre_ventas["Spanish"]["ci"] = "Ci";
	$fieldToolTipspre_ventas["Spanish"]["ci"] = "";
	$placeHolderspre_ventas["Spanish"]["ci"] = "";
	$fieldLabelspre_ventas["Spanish"]["Titular"] = "Titular";
	$fieldToolTipspre_ventas["Spanish"]["Titular"] = "";
	$placeHolderspre_ventas["Spanish"]["Titular"] = "";
	$fieldLabelspre_ventas["Spanish"]["pre_venta"] = "Pre Venta";
	$fieldToolTipspre_ventas["Spanish"]["pre_venta"] = "";
	$placeHolderspre_ventas["Spanish"]["pre_venta"] = "";
	$fieldLabelspre_ventas["Spanish"]["nombre"] = "Nombre";
	$fieldToolTipspre_ventas["Spanish"]["nombre"] = "";
	$placeHolderspre_ventas["Spanish"]["nombre"] = "";
	$pageTitlespre_ventas["Spanish"]["rprint"] = "Pre Ventas de Acciones";
	if (count($fieldToolTipspre_ventas["Spanish"]))
		$tdatapre_ventas[".isUseToolTips"] = true;
}


	$tdatapre_ventas[".NCSearch"] = true;



$tdatapre_ventas[".shortTableName"] = "pre_ventas";
$tdatapre_ventas[".nSecOptions"] = 0;

$tdatapre_ventas[".mainTableOwnerID"] = "";
$tdatapre_ventas[".entityType"] = 2;
$tdatapre_ventas[".connId"] = "titulo_at_localhost";


$tdatapre_ventas[".strOriginalTableName"] = "derecho_propietario_2";

	



$tdatapre_ventas[".showAddInPopup"] = false;

$tdatapre_ventas[".showEditInPopup"] = false;

$tdatapre_ventas[".showViewInPopup"] = false;

$tdatapre_ventas[".listAjax"] = false;
//	temporary
//$tdatapre_ventas[".listAjax"] = false;

	$tdatapre_ventas[".audit"] = false;

	$tdatapre_ventas[".locking"] = false;


$pages = $tdatapre_ventas[".defaultPages"];

if( $pages[PAGE_EDIT] ) {
	$tdatapre_ventas[".edit"] = true;
	$tdatapre_ventas[".afterEditAction"] = 1;
	$tdatapre_ventas[".closePopupAfterEdit"] = 1;
	$tdatapre_ventas[".afterEditActionDetTable"] = "";
}

if( $pages[PAGE_ADD] ) {
$tdatapre_ventas[".add"] = true;
$tdatapre_ventas[".afterAddAction"] = 1;
$tdatapre_ventas[".closePopupAfterAdd"] = 1;
$tdatapre_ventas[".afterAddActionDetTable"] = "";
}

if( $pages[PAGE_LIST] ) {
	$tdatapre_ventas[".list"] = true;
}



$tdatapre_ventas[".strSortControlSettingsJSON"] = "";




if( $pages[PAGE_VIEW] ) {
$tdatapre_ventas[".view"] = true;
}

if( $pages[PAGE_IMPORT] ) {
$tdatapre_ventas[".import"] = true;
}

if( $pages[PAGE_EXPORT] ) {
$tdatapre_ventas[".exportTo"] = true;
}

if( $pages[PAGE_PRINT] ) {
$tdatapre_ventas[".printFriendly"] = true;
}



$tdatapre_ventas[".showSimpleSearchOptions"] = true; // temp fix #13449

// Allow Show/Hide Fields in GRID
$tdatapre_ventas[".allowShowHideFields"] = true; // temp fix #13449
//

// Allow Fields Reordering in GRID
$tdatapre_ventas[".allowFieldsReordering"] = true; // temp fix #13449
//

$tdatapre_ventas[".isUseAjaxSuggest"] = true;





$tdatapre_ventas[".ajaxCodeSnippetAdded"] = false;

$tdatapre_ventas[".buttonsAdded"] = false;

$tdatapre_ventas[".addPageEvents"] = false;

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


$tdatapre_ventas[".badgeColor"] = "CFAE83";


$tdatapre_ventas[".allSearchFields"] = array();
$tdatapre_ventas[".filterFields"] = array();
$tdatapre_ventas[".requiredSearchFields"] = array();

$tdatapre_ventas[".googleLikeFields"] = array();
$tdatapre_ventas[".googleLikeFields"][] = "id_Pre_venta";
$tdatapre_ventas[".googleLikeFields"][] = "fecha_Emision";
$tdatapre_ventas[".googleLikeFields"][] = "ci";
$tdatapre_ventas[".googleLikeFields"][] = "Titular";
$tdatapre_ventas[".googleLikeFields"][] = "pre_venta";
$tdatapre_ventas[".googleLikeFields"][] = "sub_total_acciones";
$tdatapre_ventas[".googleLikeFields"][] = "total_acumulado";
$tdatapre_ventas[".googleLikeFields"][] = "total_bs";
$tdatapre_ventas[".googleLikeFields"][] = "total_bs_literal";
$tdatapre_ventas[".googleLikeFields"][] = "nombre";



$tdatapre_ventas[".tableType"] = "report";

$tdatapre_ventas[".printerPageOrientation"] = 0;
$tdatapre_ventas[".nPrinterPageScale"] = 100;

$tdatapre_ventas[".nPrinterSplitRecords"] = 40;

$tdatapre_ventas[".geocodingEnabled"] = false;

//report settings

$tdatapre_ventas[".reportPrintGroupsPerPage"] = 10;
$tdatapre_ventas[".reportPrintRecordsPerPage"] = 40;

$tdatapre_ventas[".pageSizeGroups"] = 20;
$tdatapre_ventas[".pageSizeRecords"] = 20;


//end of report settings






$tdatapre_ventas[".noRecordsFirstPage"] = true;




$tstrOrderBy = "";
$tdatapre_ventas[".strOrderBy"] = $tstrOrderBy;

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


$tdatapre_ventas[".sqlHead"] = "SELECT DP.id_derecho_Propietario AS id_Pre_venta,  DATE(DP.fecha_Emision) AS fecha_Emision,  CONCAT(S.ci, '', S.ci_complemento, ' ', A.alias) AS ci,  CONCAT(S.apellido_Paterno, ' ', S.apellido_Materno, ' ', S.apellido_Casada, ' ', S.nombres) AS Titular,  DP.nro_Acciones_2 AS pre_venta,  DP.sub_total_acciones,  DP.total_acumulado,  DP.total_bs,  DP.total_bs_literal,  B.nombre";
$tdatapre_ventas[".sqlFrom"] = "FROM derecho_propietario_2 AS DP  INNER JOIN socio AS S ON DP.accionista = S.id_Socio  INNER JOIN aux AS A ON S.ci_procedencia = A.id_aux  INNER JOIN aux AS B ON DP.estado_titulo = B.id_aux";
$tdatapre_ventas[".sqlWhereExpr"] = "";
$tdatapre_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;
$tdatapre_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;
$tdatapre_ventas[".arrGroupsPerPage"] = $arrGPP;

$tdatapre_ventas[".highlightSearchResults"] = true;

$tableKeyspre_ventas = array();
$tdatapre_ventas[".Keys"] = $tableKeyspre_ventas;


$tdatapre_ventas[".hideMobileList"] = array();




//	id_Pre_venta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id_Pre_venta";
	$fdata["GoodName"] = "id_Pre_venta";
	$fdata["ownerTable"] = "derecho_propietario_2";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","id_Pre_venta");
	$fdata["FieldType"] = 3;


		$fdata["AutoInc"] = true;

	
			

		$fdata["strField"] = "id_derecho_Propietario";

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DP.id_derecho_Propietario";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["id_Pre_venta"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "id_Pre_venta";
//	fecha_Emision
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "fecha_Emision";
	$fdata["GoodName"] = "fecha_Emision";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","fecha_Emision");
	$fdata["FieldType"] = 135;


	
	
			

		$fdata["strField"] = "fecha_Emision";

		$fdata["sourceSingle"] = "fecha_Emision";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DATE(DP.fecha_Emision)";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Short Date");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Date");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 13;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Between";

			// the default search options list
				$fdata["searchOptionsList"] = array("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, NOT_EMPTY );
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["fecha_Emision"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "fecha_Emision";
//	ci
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "ci";
	$fdata["GoodName"] = "ci";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","ci");
	$fdata["FieldType"] = 200;


	
	
			

		$fdata["strField"] = "ci";

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "CONCAT(S.ci, '', S.ci_complemento, ' ', A.alias)";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["ci"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "ci";
//	Titular
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Titular";
	$fdata["GoodName"] = "Titular";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","Titular");
	$fdata["FieldType"] = 200;


	
	
			

		$fdata["strField"] = "Titular";

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "CONCAT(S.apellido_Paterno, ' ', S.apellido_Materno, ' ', S.apellido_Casada, ' ', S.nombres)";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["Titular"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "Titular";
//	pre_venta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "pre_venta";
	$fdata["GoodName"] = "pre_venta";
	$fdata["ownerTable"] = "derecho_propietario_2";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","pre_venta");
	$fdata["FieldType"] = 14;


	
	
			

		$fdata["strField"] = "nro_Acciones_2";

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DP.nro_Acciones_2";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Number");

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["pre_venta"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "pre_venta";
//	sub_total_acciones
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "sub_total_acciones";
	$fdata["GoodName"] = "sub_total_acciones";
	$fdata["ownerTable"] = "derecho_propietario_2";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","sub_total_acciones");
	$fdata["FieldType"] = 14;


	
	
			

		$fdata["strField"] = "sub_total_acciones";

		$fdata["sourceSingle"] = "sub_total_acciones";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DP.sub_total_acciones";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Number");

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["sub_total_acciones"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "sub_total_acciones";
//	total_acumulado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "total_acumulado";
	$fdata["GoodName"] = "total_acumulado";
	$fdata["ownerTable"] = "derecho_propietario_2";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","total_acumulado");
	$fdata["FieldType"] = 14;


	
	
			

		$fdata["strField"] = "total_acumulado";

		$fdata["sourceSingle"] = "total_acumulado";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DP.total_acumulado";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Number");

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
							
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["total_acumulado"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "total_acumulado";
//	total_bs
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "total_bs";
	$fdata["GoodName"] = "total_bs";
	$fdata["ownerTable"] = "derecho_propietario_2";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","total_bs");
	$fdata["FieldType"] = 14;


	
	
			

		$fdata["strField"] = "total_bs";

		$fdata["sourceSingle"] = "total_bs";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DP.total_bs";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "Number");

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
				$edata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["total_bs"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "total_bs";
//	total_bs_literal
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "total_bs_literal";
	$fdata["GoodName"] = "total_bs_literal";
	$fdata["ownerTable"] = "derecho_propietario_2";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","total_bs_literal");
	$fdata["FieldType"] = 200;


	
	
			

		$fdata["strField"] = "total_bs_literal";

		$fdata["sourceSingle"] = "total_bs_literal";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DP.total_bs_literal";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=255";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["total_bs_literal"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "total_bs_literal";
//	nombre
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "nombre";
	$fdata["GoodName"] = "nombre";
	$fdata["ownerTable"] = "aux";
	$fdata["Label"] = GetFieldLabel("Pre_Ventas","nombre");
	$fdata["FieldType"] = 200;


	
	
			

		$fdata["strField"] = "nombre";

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "B.nombre";

	
	
				$fdata["UploadFolder"] = "files";

//  Begin View Formats
	$fdata["ViewFormats"] = array();

	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

	
		$vdata["truncateText"] = true;
	$vdata["NumberOfChars"] = 80;

	$fdata["ViewFormats"]["report"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Text field");

	
		$edata["weekdayMessage"] = array("message" => "", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



	
	
	
	
			$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
	
	
//	End validation

	
	
	
	
	
	$fdata["EditFormats"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "Contains";

			// the default search options list
				$fdata["searchOptionsList"] = array("Contains", "Equals", "Starts with", "More than", "Less than", "Between", "Empty", NOT_EMPTY);
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatapre_ventas["nombre"] = $fdata;
		$tdatapre_ventas[".searchableFields"][] = "nombre";


$tables_data["Pre-Ventas"]=&$tdatapre_ventas;
$field_labels["Pre_Ventas"] = &$fieldLabelspre_ventas;
$fieldToolTips["Pre_Ventas"] = &$fieldToolTipspre_ventas;
$placeHolders["Pre_Ventas"] = &$placeHolderspre_ventas;
$page_titles["Pre_Ventas"] = &$pageTitlespre_ventas;


changeTextControlsToDate( "Pre-Ventas" );

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)

//if !@TABLE.bReportCrossTab

$detailsTablesData["Pre-Ventas"] = array();
//endif

// tables which are master tables for current table (detail)
$masterTablesData["Pre-Ventas"] = array();



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



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











function createSqlQuery_pre_ventas()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "DP.id_derecho_Propietario AS id_Pre_venta,  DATE(DP.fecha_Emision) AS fecha_Emision,  CONCAT(S.ci, '', S.ci_complemento, ' ', A.alias) AS ci,  CONCAT(S.apellido_Paterno, ' ', S.apellido_Materno, ' ', S.apellido_Casada, ' ', S.nombres) AS Titular,  DP.nro_Acciones_2 AS pre_venta,  DP.sub_total_acciones,  DP.total_acumulado,  DP.total_bs,  DP.total_bs_literal,  B.nombre";
$proto0["m_strFrom"] = "FROM derecho_propietario_2 AS DP  INNER JOIN socio AS S ON DP.accionista = S.id_Socio  INNER JOIN aux AS A ON S.ci_procedencia = A.id_aux  INNER JOIN aux AS B ON DP.estado_titulo = B.id_aux";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "id_derecho_Propietario",
	"m_strTable" => "DP",
	"m_srcTableName" => "Pre-Ventas"
));

$proto6["m_sql"] = "DP.id_derecho_Propietario";
$proto6["m_srcTableName"] = "Pre-Ventas";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "id_Pre_venta";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$proto9=array();
$proto9["m_functiontype"] = "SQLF_CUSTOM";
$proto9["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "DP.fecha_Emision"
));

$proto9["m_arguments"][]=$obj;
$proto9["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto9);

$proto8["m_sql"] = "DATE(DP.fecha_Emision)";
$proto8["m_srcTableName"] = "Pre-Ventas";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "fecha_Emision";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto11=array();
			$proto12=array();
$proto12["m_functiontype"] = "SQLF_CUSTOM";
$proto12["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "S.ci"
));

$proto12["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "''"
));

$proto12["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "S.ci_complemento"
));

$proto12["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "' '"
));

$proto12["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "A.alias"
));

$proto12["m_arguments"][]=$obj;
$proto12["m_strFunctionName"] = "CONCAT";
$obj = new SQLFunctionCall($proto12);

$proto11["m_sql"] = "CONCAT(S.ci, '', S.ci_complemento, ' ', A.alias)";
$proto11["m_srcTableName"] = "Pre-Ventas";
$proto11["m_expr"]=$obj;
$proto11["m_alias"] = "ci";
$obj = new SQLFieldListItem($proto11);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$proto19=array();
$proto19["m_functiontype"] = "SQLF_CUSTOM";
$proto19["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "S.apellido_Paterno"
));

$proto19["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "' '"
));

$proto19["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "S.apellido_Materno"
));

$proto19["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "' '"
));

$proto19["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "S.apellido_Casada"
));

$proto19["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "' '"
));

$proto19["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "S.nombres"
));

$proto19["m_arguments"][]=$obj;
$proto19["m_strFunctionName"] = "CONCAT";
$obj = new SQLFunctionCall($proto19);

$proto18["m_sql"] = "CONCAT(S.apellido_Paterno, ' ', S.apellido_Materno, ' ', S.apellido_Casada, ' ', S.nombres)";
$proto18["m_srcTableName"] = "Pre-Ventas";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "Titular";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto27=array();
			$obj = new SQLField(array(
	"m_strName" => "nro_Acciones_2",
	"m_strTable" => "DP",
	"m_srcTableName" => "Pre-Ventas"
));

$proto27["m_sql"] = "DP.nro_Acciones_2";
$proto27["m_srcTableName"] = "Pre-Ventas";
$proto27["m_expr"]=$obj;
$proto27["m_alias"] = "pre_venta";
$obj = new SQLFieldListItem($proto27);

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLField(array(
	"m_strName" => "sub_total_acciones",
	"m_strTable" => "DP",
	"m_srcTableName" => "Pre-Ventas"
));

$proto29["m_sql"] = "DP.sub_total_acciones";
$proto29["m_srcTableName"] = "Pre-Ventas";
$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "";
$obj = new SQLFieldListItem($proto29);

$proto0["m_fieldlist"][]=$obj;
						$proto31=array();
			$obj = new SQLField(array(
	"m_strName" => "total_acumulado",
	"m_strTable" => "DP",
	"m_srcTableName" => "Pre-Ventas"
));

$proto31["m_sql"] = "DP.total_acumulado";
$proto31["m_srcTableName"] = "Pre-Ventas";
$proto31["m_expr"]=$obj;
$proto31["m_alias"] = "";
$obj = new SQLFieldListItem($proto31);

$proto0["m_fieldlist"][]=$obj;
						$proto33=array();
			$obj = new SQLField(array(
	"m_strName" => "total_bs",
	"m_strTable" => "DP",
	"m_srcTableName" => "Pre-Ventas"
));

$proto33["m_sql"] = "DP.total_bs";
$proto33["m_srcTableName"] = "Pre-Ventas";
$proto33["m_expr"]=$obj;
$proto33["m_alias"] = "";
$obj = new SQLFieldListItem($proto33);

$proto0["m_fieldlist"][]=$obj;
						$proto35=array();
			$obj = new SQLField(array(
	"m_strName" => "total_bs_literal",
	"m_strTable" => "DP",
	"m_srcTableName" => "Pre-Ventas"
));

$proto35["m_sql"] = "DP.total_bs_literal";
$proto35["m_srcTableName"] = "Pre-Ventas";
$proto35["m_expr"]=$obj;
$proto35["m_alias"] = "";
$obj = new SQLFieldListItem($proto35);

$proto0["m_fieldlist"][]=$obj;
						$proto37=array();
			$obj = new SQLField(array(
	"m_strName" => "nombre",
	"m_strTable" => "B",
	"m_srcTableName" => "Pre-Ventas"
));

$proto37["m_sql"] = "B.nombre";
$proto37["m_srcTableName"] = "Pre-Ventas";
$proto37["m_expr"]=$obj;
$proto37["m_alias"] = "";
$obj = new SQLFieldListItem($proto37);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto39=array();
$proto39["m_link"] = "SQLL_MAIN";
			$proto40=array();
$proto40["m_strName"] = "derecho_propietario_2";
$proto40["m_srcTableName"] = "Pre-Ventas";
$proto40["m_columns"] = array();
$proto40["m_columns"][] = "id_derecho_Propietario";
$proto40["m_columns"][] = "gestion";
$proto40["m_columns"][] = "nro_Partido";
$proto40["m_columns"][] = "nro_Folio";
$proto40["m_columns"][] = "accionista";
$proto40["m_columns"][] = "nro_Titulo";
$proto40["m_columns"][] = "nro_Acciones_2";
$proto40["m_columns"][] = "serie_Acciones";
$proto40["m_columns"][] = "estado_Pago";
$proto40["m_columns"][] = "tipo_Acciones";
$proto40["m_columns"][] = "gravamen";
$proto40["m_columns"][] = "fecha_Emision";
$proto40["m_columns"][] = "fecha_Inscripcion";
$proto40["m_columns"][] = "clase_Acciones";
$proto40["m_columns"][] = "nro_Acciones_Literal";
$proto40["m_columns"][] = "total_bs";
$proto40["m_columns"][] = "total_bs_literal";
$proto40["m_columns"][] = "estado_titulo";
$proto40["m_columns"][] = "saldo_Acciones_A";
$proto40["m_columns"][] = "saldo_Acciones";
$proto40["m_columns"][] = "id_constitucion";
$proto40["m_columns"][] = "responsable";
$proto40["m_columns"][] = "sub_total_acciones";
$proto40["m_columns"][] = "total_acumulado";
$obj = new SQLTable($proto40);

$proto39["m_table"] = $obj;
$proto39["m_sql"] = "derecho_propietario_2 AS DP";
$proto39["m_alias"] = "DP";
$proto39["m_srcTableName"] = "Pre-Ventas";
$proto41=array();
$proto41["m_sql"] = "";
$proto41["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto43=array();
$proto43["m_link"] = "SQLL_INNERJOIN";
			$proto44=array();
$proto44["m_strName"] = "socio";
$proto44["m_srcTableName"] = "Pre-Ventas";
$proto44["m_columns"] = array();
$proto44["m_columns"][] = "id_Socio";
$proto44["m_columns"][] = "ci";
$proto44["m_columns"][] = "ci_complemento";
$proto44["m_columns"][] = "ci_procedencia";
$proto44["m_columns"][] = "nombres";
$proto44["m_columns"][] = "apellido_Paterno";
$proto44["m_columns"][] = "apellido_Materno";
$proto44["m_columns"][] = "fecha_Nacimiento";
$proto44["m_columns"][] = "lugar_Nacimiento";
$proto44["m_columns"][] = "depto_Nacimiento";
$proto44["m_columns"][] = "direccion";
$proto44["m_columns"][] = "profesion";
$proto44["m_columns"][] = "telefono";
$proto44["m_columns"][] = "celular";
$proto44["m_columns"][] = "foto_actual";
$proto44["m_columns"][] = "foto_Ci";
$proto44["m_columns"][] = "estado";
$proto44["m_columns"][] = "tipo_Doc";
$proto44["m_columns"][] = "pais_Nacimiento";
$proto44["m_columns"][] = "sexo";
$proto44["m_columns"][] = "estado_Civil";
$proto44["m_columns"][] = "apellido_Casada";
$proto44["m_columns"][] = "tipo_accionista";
$proto44["m_columns"][] = "id_dp";
$proto44["m_columns"][] = "id_gestion";
$proto44["m_columns"][] = "id_constitucion";
$obj = new SQLTable($proto44);

$proto43["m_table"] = $obj;
$proto43["m_sql"] = "INNER JOIN socio AS S ON DP.accionista = S.id_Socio";
$proto43["m_alias"] = "S";
$proto43["m_srcTableName"] = "Pre-Ventas";
$proto45=array();
$proto45["m_sql"] = "S.id_Socio = DP.accionista";
$proto45["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id_Socio",
	"m_strTable" => "S",
	"m_srcTableName" => "Pre-Ventas"
));

$proto45["m_column"]=$obj;
$proto45["m_contained"] = array();
$proto45["m_strCase"] = "= DP.accionista";
$proto45["m_havingmode"] = false;
$proto45["m_inBrackets"] = false;
$proto45["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto45);

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

$proto0["m_fromlist"][]=$obj;
												$proto47=array();
$proto47["m_link"] = "SQLL_INNERJOIN";
			$proto48=array();
$proto48["m_strName"] = "aux";
$proto48["m_srcTableName"] = "Pre-Ventas";
$proto48["m_columns"] = array();
$proto48["m_columns"][] = "alias";
$proto48["m_columns"][] = "aux";
$proto48["m_columns"][] = "color";
$proto48["m_columns"][] = "id_aux";
$proto48["m_columns"][] = "nombre";
$proto48["m_columns"][] = "orden";
$proto48["m_columns"][] = "valor";
$proto48["m_columns"][] = "valor_1";
$proto48["m_columns"][] = "valor_2";
$proto48["m_columns"][] = "valor_3";
$proto48["m_columns"][] = "valor_4";
$obj = new SQLTable($proto48);

$proto47["m_table"] = $obj;
$proto47["m_sql"] = "INNER JOIN aux AS A ON S.ci_procedencia = A.id_aux";
$proto47["m_alias"] = "A";
$proto47["m_srcTableName"] = "Pre-Ventas";
$proto49=array();
$proto49["m_sql"] = "A.id_aux = S.ci_procedencia";
$proto49["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id_aux",
	"m_strTable" => "A",
	"m_srcTableName" => "Pre-Ventas"
));

$proto49["m_column"]=$obj;
$proto49["m_contained"] = array();
$proto49["m_strCase"] = "= S.ci_procedencia";
$proto49["m_havingmode"] = false;
$proto49["m_inBrackets"] = false;
$proto49["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto49);

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

$proto0["m_fromlist"][]=$obj;
												$proto51=array();
$proto51["m_link"] = "SQLL_INNERJOIN";
			$proto52=array();
$proto52["m_strName"] = "aux";
$proto52["m_srcTableName"] = "Pre-Ventas";
$proto52["m_columns"] = array();
$proto52["m_columns"][] = "alias";
$proto52["m_columns"][] = "aux";
$proto52["m_columns"][] = "color";
$proto52["m_columns"][] = "id_aux";
$proto52["m_columns"][] = "nombre";
$proto52["m_columns"][] = "orden";
$proto52["m_columns"][] = "valor";
$proto52["m_columns"][] = "valor_1";
$proto52["m_columns"][] = "valor_2";
$proto52["m_columns"][] = "valor_3";
$proto52["m_columns"][] = "valor_4";
$obj = new SQLTable($proto52);

$proto51["m_table"] = $obj;
$proto51["m_sql"] = "INNER JOIN aux AS B ON DP.estado_titulo = B.id_aux";
$proto51["m_alias"] = "B";
$proto51["m_srcTableName"] = "Pre-Ventas";
$proto53=array();
$proto53["m_sql"] = "B.id_aux = DP.estado_titulo";
$proto53["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id_aux",
	"m_strTable" => "B",
	"m_srcTableName" => "Pre-Ventas"
));

$proto53["m_column"]=$obj;
$proto53["m_contained"] = array();
$proto53["m_strCase"] = "= DP.estado_titulo";
$proto53["m_havingmode"] = false;
$proto53["m_inBrackets"] = false;
$proto53["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto53);

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

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

	return $obj;
}
$queryData_pre_ventas = createSqlQuery_pre_ventas();


	
		;

										

$tdatapre_ventas[".sqlquery"] = $queryData_pre_ventas;



$tdatapre_ventas[".hasEvents"] = false;

?>