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


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

//	field labels
$fieldLabelspreventa = array();
$fieldToolTipspreventa = array();
$pageTitlespreventa = array();
$placeHolderspreventa = array();

if(mlang_getcurrentlang()=="Spanish")
{
	$fieldLabelspreventa["Spanish"] = array();
	$fieldToolTipspreventa["Spanish"] = array();
	$placeHolderspreventa["Spanish"] = array();
	$pageTitlespreventa["Spanish"] = array();
	$fieldLabelspreventa["Spanish"]["fecha_Emision"] = "Fecha Emision";
	$fieldToolTipspreventa["Spanish"]["fecha_Emision"] = "";
	$placeHolderspreventa["Spanish"]["fecha_Emision"] = "";
	$fieldLabelspreventa["Spanish"]["total_bs"] = "Total Bs";
	$fieldToolTipspreventa["Spanish"]["total_bs"] = "";
	$placeHolderspreventa["Spanish"]["total_bs"] = "";
	$fieldLabelspreventa["Spanish"]["total_bs_literal"] = "Total Bs Literal";
	$fieldToolTipspreventa["Spanish"]["total_bs_literal"] = "";
	$placeHolderspreventa["Spanish"]["total_bs_literal"] = "";
	$fieldLabelspreventa["Spanish"]["sub_total_acciones"] = "Sub Total Acciones";
	$fieldToolTipspreventa["Spanish"]["sub_total_acciones"] = "";
	$placeHolderspreventa["Spanish"]["sub_total_acciones"] = "";
	$fieldLabelspreventa["Spanish"]["total_acumulado"] = "Total Acumulado";
	$fieldToolTipspreventa["Spanish"]["total_acumulado"] = "";
	$placeHolderspreventa["Spanish"]["total_acumulado"] = "";
	$fieldLabelspreventa["Spanish"]["id_Pre_venta"] = "Id Pre Venta";
	$fieldToolTipspreventa["Spanish"]["id_Pre_venta"] = "";
	$placeHolderspreventa["Spanish"]["id_Pre_venta"] = "";
	$fieldLabelspreventa["Spanish"]["ci"] = "Ci";
	$fieldToolTipspreventa["Spanish"]["ci"] = "";
	$placeHolderspreventa["Spanish"]["ci"] = "";
	$fieldLabelspreventa["Spanish"]["Titular"] = "Titular";
	$fieldToolTipspreventa["Spanish"]["Titular"] = "";
	$placeHolderspreventa["Spanish"]["Titular"] = "";
	$fieldLabelspreventa["Spanish"]["pre_venta"] = "Pre Venta";
	$fieldToolTipspreventa["Spanish"]["pre_venta"] = "";
	$placeHolderspreventa["Spanish"]["pre_venta"] = "";
	if (count($fieldToolTipspreventa["Spanish"]))
		$tdatapreventa[".isUseToolTips"] = true;
}


	$tdatapreventa[".NCSearch"] = true;



$tdatapreventa[".shortTableName"] = "preventa";
$tdatapreventa[".nSecOptions"] = 0;

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


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

	



$tdatapreventa[".showAddInPopup"] = false;

$tdatapreventa[".showEditInPopup"] = false;

$tdatapreventa[".showViewInPopup"] = false;

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

	$tdatapreventa[".audit"] = false;

	$tdatapreventa[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatapreventa[".isUseAjaxSuggest"] = true;





$tdatapreventa[".ajaxCodeSnippetAdded"] = false;

$tdatapreventa[".buttonsAdded"] = false;

$tdatapreventa[".addPageEvents"] = false;

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


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


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

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



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

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

$tdatapreventa[".nPrinterSplitRecords"] = 40;

$tdatapreventa[".geocodingEnabled"] = false;

//report settings

$tdatapreventa[".reportPrintGroupsPerPage"] = 5;
$tdatapreventa[".reportPrintRecordsPerPage"] = 40;

$tdatapreventa[".pageSizeGroups"] = 5;
$tdatapreventa[".pageSizeRecords"] = 20;


//end of report settings






$tdatapreventa[".noRecordsFirstPage"] = true;




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

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


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

$tdatapreventa[".highlightSearchResults"] = true;

$tableKeyspreventa = array();
$tdatapreventa[".Keys"] = $tableKeyspreventa;


$tdatapreventa[".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("preventa_report","id_Pre_venta");
	$fdata["FieldType"] = 3;


		$fdata["AutoInc"] = true;

	
			

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

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "derecho_propietario_2.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


	$tdatapreventa["id_Pre_venta"] = $fdata;
		$tdatapreventa[".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("preventa_report","fecha_Emision");
	$fdata["FieldType"] = 135;


	
	
			

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

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "date (derecho_propietario_2.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


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


	
	
			

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

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "CONCAT( socio.ci, '', socio.ci_complemento, ' ', aux.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


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


	
	
			

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

	
	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "CONCAT( socio.apellido_Paterno, ' ', socio.apellido_Materno, ' ', socio.apellido_Casada, ' ', socio.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


	$tdatapreventa["Titular"] = $fdata;
		$tdatapreventa[".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("preventa_report","pre_venta");
	$fdata["FieldType"] = 14;


	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
	
		$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


	$tdatapreventa["pre_venta"] = $fdata;
		$tdatapreventa[".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("preventa_report","sub_total_acciones");
	$fdata["FieldType"] = 14;


	
	
			

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

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "derecho_propietario_2.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


	$tdatapreventa["sub_total_acciones"] = $fdata;
		$tdatapreventa[".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("preventa_report","total_acumulado");
	$fdata["FieldType"] = 14;


	
	
			

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

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "derecho_propietario_2.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


	$tdatapreventa["total_acumulado"] = $fdata;
		$tdatapreventa[".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("preventa_report","total_bs");
	$fdata["FieldType"] = 14;


	
	
			

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

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

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

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

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

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

	
	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
	
	
		$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


	$tdatapreventa["total_bs"] = $fdata;
		$tdatapreventa[".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("preventa_report","total_bs_literal");
	$fdata["FieldType"] = 200;


	
	
			

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

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "derecho_propietario_2.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


	$tdatapreventa["total_bs_literal"] = $fdata;
		$tdatapreventa[".searchableFields"][] = "total_bs_literal";


$tables_data["preventa_report"]=&$tdatapreventa;
$field_labels["preventa_report"] = &$fieldLabelspreventa;
$fieldToolTips["preventa_report"] = &$fieldToolTipspreventa;
$placeHolders["preventa_report"] = &$placeHolderspreventa;
$page_titles["preventa_report"] = &$pageTitlespreventa;


changeTextControlsToDate( "preventa_report" );

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

//if !@TABLE.bReportCrossTab

$detailsTablesData["preventa_report"] = array();
//endif

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



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



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











function createSqlQuery_preventa()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "derecho_propietario_2.id_derecho_Propietario AS id_Pre_venta,   	date (derecho_propietario_2.fecha_Emision) AS fecha_Emision,   	CONCAT( socio.ci, '', socio.ci_complemento, ' ', aux.alias ) AS ci,   	CONCAT( socio.apellido_Paterno, ' ', socio.apellido_Materno, ' ', socio.apellido_Casada, ' ', socio.nombres ) AS Titular,   	derecho_propietario_2.nro_Acciones_2 AS pre_venta,   	derecho_propietario_2.sub_total_acciones,   	derecho_propietario_2.total_acumulado,   	derecho_propietario_2.total_bs,   	derecho_propietario_2.total_bs_literal";
$proto0["m_strFrom"] = "FROM  	derecho_propietario_2  	INNER JOIN  	socio  	ON   		derecho_propietario_2.accionista = socio.id_Socio  	INNER JOIN  	aux  	ON   		socio.ci_procedencia = aux.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" => "derecho_propietario_2",
	"m_srcTableName" => "preventa_report"
));

$proto6["m_sql"] = "derecho_propietario_2.id_derecho_Propietario";
$proto6["m_srcTableName"] = "preventa_report";
$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" => "derecho_propietario_2.fecha_Emision"
));

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

$proto8["m_sql"] = "date (derecho_propietario_2.fecha_Emision)";
$proto8["m_srcTableName"] = "preventa_report";
$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" => "socio.ci"
));

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

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

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

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

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

$proto11["m_sql"] = "CONCAT( socio.ci, '', socio.ci_complemento, ' ', aux.alias )";
$proto11["m_srcTableName"] = "preventa_report";
$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" => "socio.apellido_Paterno"
));

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

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

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

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

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

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

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

$proto18["m_sql"] = "CONCAT( socio.apellido_Paterno, ' ', socio.apellido_Materno, ' ', socio.apellido_Casada, ' ', socio.nombres )";
$proto18["m_srcTableName"] = "preventa_report";
$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" => "derecho_propietario_2",
	"m_srcTableName" => "preventa_report"
));

$proto27["m_sql"] = "derecho_propietario_2.nro_Acciones_2";
$proto27["m_srcTableName"] = "preventa_report";
$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" => "derecho_propietario_2",
	"m_srcTableName" => "preventa_report"
));

$proto29["m_sql"] = "derecho_propietario_2.sub_total_acciones";
$proto29["m_srcTableName"] = "preventa_report";
$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" => "derecho_propietario_2",
	"m_srcTableName" => "preventa_report"
));

$proto31["m_sql"] = "derecho_propietario_2.total_acumulado";
$proto31["m_srcTableName"] = "preventa_report";
$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" => "derecho_propietario_2",
	"m_srcTableName" => "preventa_report"
));

$proto33["m_sql"] = "derecho_propietario_2.total_bs";
$proto33["m_srcTableName"] = "preventa_report";
$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" => "derecho_propietario_2",
	"m_srcTableName" => "preventa_report"
));

$proto35["m_sql"] = "derecho_propietario_2.total_bs_literal";
$proto35["m_srcTableName"] = "preventa_report";
$proto35["m_expr"]=$obj;
$proto35["m_alias"] = "";
$obj = new SQLFieldListItem($proto35);

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

$proto37["m_table"] = $obj;
$proto37["m_sql"] = "derecho_propietario_2";
$proto37["m_alias"] = "";
$proto37["m_srcTableName"] = "preventa_report";
$proto39=array();
$proto39["m_sql"] = "";
$proto39["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto41["m_table"] = $obj;
$proto41["m_sql"] = "INNER JOIN  	socio  	ON   		derecho_propietario_2.accionista = socio.id_Socio";
$proto41["m_alias"] = "";
$proto41["m_srcTableName"] = "preventa_report";
$proto43=array();
$proto43["m_sql"] = "socio.id_Socio = derecho_propietario_2.accionista";
$proto43["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id_Socio",
	"m_strTable" => "socio",
	"m_srcTableName" => "preventa_report"
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto45=array();
$proto45["m_link"] = "SQLL_INNERJOIN";
			$proto46=array();
$proto46["m_strName"] = "aux";
$proto46["m_srcTableName"] = "preventa_report";
$proto46["m_columns"] = array();
$proto46["m_columns"][] = "alias";
$proto46["m_columns"][] = "aux";
$proto46["m_columns"][] = "color";
$proto46["m_columns"][] = "id_aux";
$proto46["m_columns"][] = "nombre";
$proto46["m_columns"][] = "orden";
$proto46["m_columns"][] = "valor";
$proto46["m_columns"][] = "valor_1";
$proto46["m_columns"][] = "valor_2";
$proto46["m_columns"][] = "valor_3";
$proto46["m_columns"][] = "valor_4";
$obj = new SQLTable($proto46);

$proto45["m_table"] = $obj;
$proto45["m_sql"] = "INNER JOIN  	aux  	ON   		socio.ci_procedencia = aux.id_aux";
$proto45["m_alias"] = "";
$proto45["m_srcTableName"] = "preventa_report";
$proto47=array();
$proto47["m_sql"] = "aux.id_aux = socio.ci_procedencia";
$proto47["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "id_aux",
	"m_strTable" => "aux",
	"m_srcTableName" => "preventa_report"
));

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

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

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

	return $obj;
}
$queryData_preventa = createSqlQuery_preventa();


	
		;

									

$tdatapreventa[".sqlquery"] = $queryData_preventa;



$tdatapreventa[".hasEvents"] = false;

?>