<?php



$tdataw_despesas = array();
$tdataw_despesas[".searchableFields"] = array();
$tdataw_despesas[".ShortName"] = "w_despesas";
$tdataw_despesas[".OwnerID"] = "";
$tdataw_despesas[".OriginalTable"] = "tb_despesas";


$tdataw_despesas[".pagesByType"] = my_json_decode( "{\"list\":[\"list\"],\"search\":[\"search\"],\"view\":[\"view\"]}" );
$tdataw_despesas[".originalPagesByType"] = $tdataw_despesas[".pagesByType"];
$tdataw_despesas[".pages"] = types2pages( my_json_decode( "{\"list\":[\"list\"],\"search\":[\"search\"],\"view\":[\"view\"]}" ) );
$tdataw_despesas[".originalPages"] = $tdataw_despesas[".pages"];
$tdataw_despesas[".defaultPages"] = my_json_decode( "{\"list\":\"list\",\"search\":\"search\",\"view\":\"view\"}" );
$tdataw_despesas[".originalDefaultPages"] = $tdataw_despesas[".defaultPages"];

//	field labels
$fieldLabelsw_despesas = array();
$fieldToolTipsw_despesas = array();
$pageTitlesw_despesas = array();
$placeHoldersw_despesas = array();

if(mlang_getcurrentlang()=="Portuguese(Brazil)")
{
	$fieldLabelsw_despesas["Portuguese(Brazil)"] = array();
	$fieldToolTipsw_despesas["Portuguese(Brazil)"] = array();
	$placeHoldersw_despesas["Portuguese(Brazil)"] = array();
	$pageTitlesw_despesas["Portuguese(Brazil)"] = array();
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["despesaID"] = "ID";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["despesaID"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["despesaID"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["categoria"] = "Categoria";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["categoria"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["categoria"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["conta"] = "Conta";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["conta"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["conta"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["Valor_pago"] = "Valor Pago";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["Valor_pago"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["Valor_pago"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["data_pagto"] = "Data Pagto";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["data_pagto"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["data_pagto"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["forma"] = "Forma";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["forma"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["forma"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["descricao"] = "Descrição ";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["descricao"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["descricao"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["debitar"] = "Debitar";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["debitar"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["debitar"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["fonte_caixa"] = "Fonte Caixa";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["fonte_caixa"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["fonte_caixa"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["reembolsar"] = "Reembolsar";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["reembolsar"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["reembolsar"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["quitado"] = "Quitado";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["quitado"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["quitado"] = "";
	$fieldLabelsw_despesas["Portuguese(Brazil)"]["data_qitacao"] = "Data Quitação ";
	$fieldToolTipsw_despesas["Portuguese(Brazil)"]["data_qitacao"] = "";
	$placeHoldersw_despesas["Portuguese(Brazil)"]["data_qitacao"] = "";
	if (count($fieldToolTipsw_despesas["Portuguese(Brazil)"]))
		$tdataw_despesas[".isUseToolTips"] = true;
}


	$tdataw_despesas[".NCSearch"] = true;


	$tdataw_despesas[".scrollGridBody"] = true;

$tdataw_despesas[".shortTableName"] = "w_despesas";
$tdataw_despesas[".nSecOptions"] = 0;

$tdataw_despesas[".mainTableOwnerID"] = "";
$tdataw_despesas[".entityType"] = 1;

$tdataw_despesas[".strOriginalTableName"] = "tb_despesas";

	



$tdataw_despesas[".showAddInPopup"] = false;

$tdataw_despesas[".showEditInPopup"] = false;

$tdataw_despesas[".showViewInPopup"] = false;

//page's base css files names
$popupPagesLayoutNames = array();
$tdataw_despesas[".popupPagesLayoutNames"] = $popupPagesLayoutNames;


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

	$tdataw_despesas[".audit"] = false;

	$tdataw_despesas[".locking"] = false;


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

if( $pages[PAGE_EDIT] ) {
	$tdataw_despesas[".edit"] = true;
	$tdataw_despesas[".afterEditAction"] = 0;
	$tdataw_despesas[".closePopupAfterEdit"] = 1;
	$tdataw_despesas[".afterEditActionDetTable"] = "Detail tables not found!";
}

if( $pages[PAGE_ADD] ) {
$tdataw_despesas[".add"] = true;
$tdataw_despesas[".afterAddAction"] = 0;
$tdataw_despesas[".closePopupAfterAdd"] = 1;
$tdataw_despesas[".afterAddActionDetTable"] = "Detail tables not found!";
}

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



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




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

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

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

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



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

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

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

$tdataw_despesas[".isUseAjaxSuggest"] = true;

$tdataw_despesas[".rowHighlite"] = true;





$tdataw_despesas[".ajaxCodeSnippetAdded"] = false;

$tdataw_despesas[".buttonsAdded"] = false;

$tdataw_despesas[".addPageEvents"] = false;

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


$tdataw_despesas[".badgeColor"] = "7B68EE";


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

$tdataw_despesas[".googleLikeFields"] = array();
$tdataw_despesas[".googleLikeFields"][] = "despesaID";
$tdataw_despesas[".googleLikeFields"][] = "categoria";
$tdataw_despesas[".googleLikeFields"][] = "conta";
$tdataw_despesas[".googleLikeFields"][] = "Valor_pago";
$tdataw_despesas[".googleLikeFields"][] = "data_pagto";
$tdataw_despesas[".googleLikeFields"][] = "forma";
$tdataw_despesas[".googleLikeFields"][] = "descricao";
$tdataw_despesas[".googleLikeFields"][] = "debitar";
$tdataw_despesas[".googleLikeFields"][] = "fonte_caixa";
$tdataw_despesas[".googleLikeFields"][] = "reembolsar";
$tdataw_despesas[".googleLikeFields"][] = "quitado";
$tdataw_despesas[".googleLikeFields"][] = "data_qitacao";



$tdataw_despesas[".tableType"] = "list";

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

$tdataw_despesas[".nPrinterSplitRecords"] = 40;

$tdataw_despesas[".geocodingEnabled"] = false;










$tdataw_despesas[".pageSize"] = 20;

$tdataw_despesas[".warnLeavingPages"] = true;



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

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

$tdataw_despesas[".sqlHead"] = "SELECT despesaID,  categoria,  conta,  SUM(valor_pago) AS Valor_pago,  data_pagto,  forma,  descricao,  debitar,  fonte_caixa,  reembolsar,  quitado,  data_qitacao";
$tdataw_despesas[".sqlFrom"] = "FROM tb_despesas";
$tdataw_despesas[".sqlWhereExpr"] = "(debitar =1)";
$tdataw_despesas[".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;
$tdataw_despesas[".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;
$tdataw_despesas[".arrGroupsPerPage"] = $arrGPP;

$tdataw_despesas[".highlightSearchResults"] = true;

$tableKeysw_despesas = array();
$tableKeysw_despesas[] = "despesaID";
$tdataw_despesas[".Keys"] = $tableKeysw_despesas;


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




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

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "despesaID";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["view"] = $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["acceptFileTypes"] = ".+$";
		$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"]["edit"] = $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


	$tdataw_despesas["despesaID"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "despesaID";
//	categoria
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "categoria";
	$fdata["GoodName"] = "categoria";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","categoria");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "categoria";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "tb_categ_despesas";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "catdespID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "categoria";

				$edata["LookupWhere"] = "ativar =1";


	
	$edata["LookupOrderBy"] = "categoria";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	
				//dependent dropdowns @deprecated data ?
	$edata["DependentLookups"] = array();
	$edata["DependentLookups"][] = "conta";

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["categoria"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "categoria";
//	conta
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "conta";
	$fdata["GoodName"] = "conta";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","conta");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "conta";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "tb_contas_desp";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "despID";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "conta";

				$edata["LookupWhere"] = "ativar=1";


	
	$edata["LookupOrderBy"] = "categoria";

	
		$edata["UseCategory"] = true;
	$edata["categoryFields"] = array();
	$edata["categoryFields"][] = array( "main" => "categoria", "lookup" => "categoria" );

	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["conta"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "conta";
//	Valor_pago
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Valor_pago";
	$fdata["GoodName"] = "Valor_pago";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("w_despesas","Valor_pago");
	$fdata["FieldType"] = 14;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "SUM(valor_pago)";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$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"]["edit"] = $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


	$tdataw_despesas["Valor_pago"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "Valor_pago";
//	data_pagto
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "data_pagto";
	$fdata["GoodName"] = "data_pagto";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","data_pagto");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "data_pagto";

	
	
				$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"]["view"] = $vdata;
//  End View Formats

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

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

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


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 2;
	$edata["InitialYearFactor"] = 1;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["data_pagto"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "data_pagto";
//	forma
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "forma";
	$fdata["GoodName"] = "forma";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","forma");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "forma";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
		$edata["LookupType"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "Dinheiro";
	$edata["LookupValues"][] = "Pix";
	$edata["LookupValues"][] = "Débito ";
	$edata["LookupValues"][] = "Crédito ";
	$edata["LookupValues"][] = "Permuta";
	$edata["LookupValues"][] = "Empréstimo";

	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["forma"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "forma";
//	descricao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "descricao";
	$fdata["GoodName"] = "descricao";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","descricao");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "descricao";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

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

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

		$edata["controlWidth"] = 200;

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

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $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


	$tdataw_despesas["descricao"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "descricao";
//	debitar
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "debitar";
	$fdata["GoodName"] = "debitar";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","debitar");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "debitar";

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

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

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

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["debitar"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "debitar";
//	fonte_caixa
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "fonte_caixa";
	$fdata["GoodName"] = "fonte_caixa";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","fonte_caixa");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "fonte_caixa";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
		$edata["LookupType"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "CX Físico ";
	$edata["LookupValues"][] = "PicPay Fatto";
	$edata["LookupValues"][] = "Itaú (Luiz)";
	$edata["LookupValues"][] = "Picpay (Rafael)";
	$edata["LookupValues"][] = "Outros";

	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["fonte_caixa"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "fonte_caixa";
//	reembolsar
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "reembolsar";
	$fdata["GoodName"] = "reembolsar";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","reembolsar");
	$fdata["FieldType"] = 200;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "reembolsar";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
		$edata["LookupType"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "Luiz C.";
	$edata["LookupValues"][] = "Rafael";
	$edata["LookupValues"][] = "Outros";
	$edata["LookupValues"][] = "Não ";

	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["reembolsar"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "reembolsar";
//	quitado
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "quitado";
	$fdata["GoodName"] = "quitado";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","quitado");
	$fdata["FieldType"] = 3;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "quitado";

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

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

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

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

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

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

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

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


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["quitado"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "quitado";
//	data_qitacao
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "data_qitacao";
	$fdata["GoodName"] = "data_qitacao";
	$fdata["ownerTable"] = "tb_despesas";
	$fdata["Label"] = GetFieldLabel("w_despesas","data_qitacao");
	$fdata["FieldType"] = 7;

	
	
	
			

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

		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "data_qitacao";

	
	
				$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"]["view"] = $vdata;
//  End View Formats

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

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

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


	
	



	
	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$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"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// 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


	$tdataw_despesas["data_qitacao"] = $fdata;
		$tdataw_despesas[".searchableFields"][] = "data_qitacao";


$tables_data["w_despesas"]=&$tdataw_despesas;
$field_labels["w_despesas"] = &$fieldLabelsw_despesas;
$fieldToolTips["w_despesas"] = &$fieldToolTipsw_despesas;
$placeHolders["w_despesas"] = &$placeHoldersw_despesas;
$page_titles["w_despesas"] = &$pageTitlesw_despesas;

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

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



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


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










function createSqlQuery_w_despesas()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "despesaID,  categoria,  conta,  SUM(valor_pago) AS Valor_pago,  data_pagto,  forma,  descricao,  debitar,  fonte_caixa,  reembolsar,  quitado,  data_qitacao";
$proto0["m_strFrom"] = "FROM tb_despesas";
$proto0["m_strWhere"] = "(debitar =1)";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "debitar =1";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "debitar",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto2["m_column"]=$obj;
$proto2["m_contained"] = array();
$proto2["m_strCase"] = "=1";
$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" => "despesaID",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto6["m_sql"] = "despesaID";
$proto6["m_srcTableName"] = "w_despesas";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "categoria",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto8["m_sql"] = "categoria";
$proto8["m_srcTableName"] = "w_despesas";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "conta",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto10["m_sql"] = "conta";
$proto10["m_srcTableName"] = "w_despesas";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$proto13=array();
$proto13["m_functiontype"] = "SQLF_SUM";
$proto13["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "valor_pago",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto13["m_arguments"][]=$obj;
$proto13["m_strFunctionName"] = "SUM";
$obj = new SQLFunctionCall($proto13);

$proto12["m_sql"] = "SUM(valor_pago)";
$proto12["m_srcTableName"] = "w_despesas";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "Valor_pago";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "data_pagto",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto15["m_sql"] = "data_pagto";
$proto15["m_srcTableName"] = "w_despesas";
$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "forma",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto17["m_sql"] = "forma";
$proto17["m_srcTableName"] = "w_despesas";
$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "descricao",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto19["m_sql"] = "descricao";
$proto19["m_srcTableName"] = "w_despesas";
$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
						$proto21=array();
			$obj = new SQLField(array(
	"m_strName" => "debitar",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto21["m_sql"] = "debitar";
$proto21["m_srcTableName"] = "w_despesas";
$proto21["m_expr"]=$obj;
$proto21["m_alias"] = "";
$obj = new SQLFieldListItem($proto21);

$proto0["m_fieldlist"][]=$obj;
						$proto23=array();
			$obj = new SQLField(array(
	"m_strName" => "fonte_caixa",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto23["m_sql"] = "fonte_caixa";
$proto23["m_srcTableName"] = "w_despesas";
$proto23["m_expr"]=$obj;
$proto23["m_alias"] = "";
$obj = new SQLFieldListItem($proto23);

$proto0["m_fieldlist"][]=$obj;
						$proto25=array();
			$obj = new SQLField(array(
	"m_strName" => "reembolsar",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto25["m_sql"] = "reembolsar";
$proto25["m_srcTableName"] = "w_despesas";
$proto25["m_expr"]=$obj;
$proto25["m_alias"] = "";
$obj = new SQLFieldListItem($proto25);

$proto0["m_fieldlist"][]=$obj;
						$proto27=array();
			$obj = new SQLField(array(
	"m_strName" => "quitado",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto27["m_sql"] = "quitado";
$proto27["m_srcTableName"] = "w_despesas";
$proto27["m_expr"]=$obj;
$proto27["m_alias"] = "";
$obj = new SQLFieldListItem($proto27);

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLField(array(
	"m_strName" => "data_qitacao",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto29["m_sql"] = "data_qitacao";
$proto29["m_srcTableName"] = "w_despesas";
$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "";
$obj = new SQLFieldListItem($proto29);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto31=array();
$proto31["m_link"] = "SQLL_MAIN";
			$proto32=array();
$proto32["m_strName"] = "tb_despesas";
$proto32["m_srcTableName"] = "w_despesas";
$proto32["m_columns"] = array();
$proto32["m_columns"][] = "despesaID";
$proto32["m_columns"][] = "categoria";
$proto32["m_columns"][] = "conta";
$proto32["m_columns"][] = "valor_pago";
$proto32["m_columns"][] = "data_pagto";
$proto32["m_columns"][] = "forma";
$proto32["m_columns"][] = "descricao";
$proto32["m_columns"][] = "debitar";
$proto32["m_columns"][] = "fonte_caixa";
$proto32["m_columns"][] = "reembolsar";
$proto32["m_columns"][] = "quitado";
$proto32["m_columns"][] = "data_qitacao";
$obj = new SQLTable($proto32);

$proto31["m_table"] = $obj;
$proto31["m_sql"] = "tb_despesas";
$proto31["m_alias"] = "";
$proto31["m_srcTableName"] = "w_despesas";
$proto33=array();
$proto33["m_sql"] = "";
$proto33["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
												$proto35=array();
						$obj = new SQLField(array(
	"m_strName" => "data_pagto",
	"m_strTable" => "tb_despesas",
	"m_srcTableName" => "w_despesas"
));

$proto35["m_column"]=$obj;
$obj = new SQLGroupByItem($proto35);

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

	return $obj;
}
$queryData_w_despesas = createSqlQuery_w_despesas();


	
		;

												

$tdataw_despesas[".sqlquery"] = $queryData_w_despesas;

$tableEvents["w_despesas"] = new eventsBase;
$tdataw_despesas[".hasEvents"] = false;

?>