<?php
$tdataexpenses = array();
$tdataexpenses[".searchableFields"] = array();
$tdataexpenses[".ShortName"] = "expenses";
$tdataexpenses[".OwnerID"] = "";
$tdataexpenses[".OriginalTable"] = "expenses";


$tdataexpenses[".pagesByType"] = my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\",\"list1\",\"list2\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" );
$tdataexpenses[".originalPagesByType"] = $tdataexpenses[".pagesByType"];
$tdataexpenses[".pages"] = types2pages( my_json_decode( "{\"add\":[\"add\"],\"edit\":[\"edit\"],\"export\":[\"export\"],\"import\":[\"import\"],\"list\":[\"list\",\"list1\",\"list2\"],\"print\":[\"print\"],\"search\":[\"search\"],\"view\":[\"view\"]}" ) );
$tdataexpenses[".originalPages"] = $tdataexpenses[".pages"];
$tdataexpenses[".defaultPages"] = my_json_decode( "{\"add\":\"add\",\"edit\":\"edit\",\"export\":\"export\",\"import\":\"import\",\"list\":\"list\",\"print\":\"print\",\"search\":\"search\",\"view\":\"view\"}" );
$tdataexpenses[".originalDefaultPages"] = $tdataexpenses[".defaultPages"];

//	field labels
$fieldLabelsexpenses = array();
$fieldToolTipsexpenses = array();
$pageTitlesexpenses = array();
$placeHoldersexpenses = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsexpenses["English"] = array();
	$fieldToolTipsexpenses["English"] = array();
	$placeHoldersexpenses["English"] = array();
	$pageTitlesexpenses["English"] = array();
	$fieldLabelsexpenses["English"]["expense_id"] = "Expense Id";
	$fieldToolTipsexpenses["English"]["expense_id"] = "";
	$placeHoldersexpenses["English"]["expense_id"] = "";
	$fieldLabelsexpenses["English"]["expense_date"] = "Expense Date";
	$fieldToolTipsexpenses["English"]["expense_date"] = "";
	$placeHoldersexpenses["English"]["expense_date"] = "";
	$fieldLabelsexpenses["English"]["amount"] = "Amount";
	$fieldToolTipsexpenses["English"]["amount"] = "";
	$placeHoldersexpenses["English"]["amount"] = "";
	$fieldLabelsexpenses["English"]["reference_no"] = "Reference No";
	$fieldToolTipsexpenses["English"]["reference_no"] = "";
	$placeHoldersexpenses["English"]["reference_no"] = "";
	$fieldLabelsexpenses["English"]["created_by"] = "Created By";
	$fieldToolTipsexpenses["English"]["created_by"] = "";
	$placeHoldersexpenses["English"]["created_by"] = "";
	$fieldLabelsexpenses["English"]["created_at"] = "Created At";
	$fieldToolTipsexpenses["English"]["created_at"] = "";
	$placeHoldersexpenses["English"]["created_at"] = "";
	$fieldLabelsexpenses["English"]["category"] = "Category";
	$fieldToolTipsexpenses["English"]["category"] = "";
	$placeHoldersexpenses["English"]["category"] = "";
	$fieldLabelsexpenses["English"]["details"] = "Details";
	$fieldToolTipsexpenses["English"]["details"] = "";
	$placeHoldersexpenses["English"]["details"] = "";
	if (count($fieldToolTipsexpenses["English"]))
		$tdataexpenses[".isUseToolTips"] = true;
}


	$tdataexpenses[".NCSearch"] = true;



$tdataexpenses[".shortTableName"] = "expenses";
$tdataexpenses[".nSecOptions"] = 0;

$tdataexpenses[".mainTableOwnerID"] = "";
$tdataexpenses[".entityType"] = 0;
$tdataexpenses[".connId"] = "easy_cash_at_localhost";


$tdataexpenses[".strOriginalTableName"] = "expenses";

	



$tdataexpenses[".showAddInPopup"] = false;

$tdataexpenses[".showEditInPopup"] = false;

$tdataexpenses[".showViewInPopup"] = false;

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


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

	$tdataexpenses[".audit"] = false;

	$tdataexpenses[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataexpenses[".isUseAjaxSuggest"] = true;

$tdataexpenses[".rowHighlite"] = true;



																																																

$tdataexpenses[".ajaxCodeSnippetAdded"] = false;

$tdataexpenses[".buttonsAdded"] = false;

$tdataexpenses[".addPageEvents"] = false;

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


$tdataexpenses[".badgeColor"] = "7b68ee";


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

$tdataexpenses[".googleLikeFields"] = array();
$tdataexpenses[".googleLikeFields"][] = "expense_id";
$tdataexpenses[".googleLikeFields"][] = "expense_date";
$tdataexpenses[".googleLikeFields"][] = "amount";
$tdataexpenses[".googleLikeFields"][] = "reference_no";
$tdataexpenses[".googleLikeFields"][] = "created_by";
$tdataexpenses[".googleLikeFields"][] = "created_at";
$tdataexpenses[".googleLikeFields"][] = "category";
$tdataexpenses[".googleLikeFields"][] = "details";



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

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

$tdataexpenses[".nPrinterSplitRecords"] = 40;

$tdataexpenses[".geocodingEnabled"] = false;










$tdataexpenses[".pageSize"] = 20;

$tdataexpenses[".warnLeavingPages"] = true;



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

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


$tdataexpenses[".sqlHead"] = "SELECT expense_id,  	expense_date,  	amount,  	reference_no,  	created_by,  	created_at,  	category,  	details";
$tdataexpenses[".sqlFrom"] = "FROM expenses";
$tdataexpenses[".sqlWhereExpr"] = "";
$tdataexpenses[".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;
$tdataexpenses[".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;
$tdataexpenses[".arrGroupsPerPage"] = $arrGPP;

$tdataexpenses[".highlightSearchResults"] = true;

$tableKeysexpenses = array();
$tableKeysexpenses[] = "expense_id";
$tdataexpenses[".Keys"] = $tableKeysexpenses;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

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

	
	
				$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


	$tdataexpenses["expense_id"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "expense_id";
//	expense_date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "expense_date";
	$fdata["GoodName"] = "expense_date";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","expense_date");
	$fdata["FieldType"] = 7;

	
	
	
			

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

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

	
	
				$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"] = 5;
	$edata["InitialYearFactor"] = 100;
	$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


	$tdataexpenses["expense_date"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "expense_date";
//	amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "amount";
	$fdata["GoodName"] = "amount";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","amount");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

	
	
				$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"]["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"] = "number";

		$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


	$tdataexpenses["amount"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "amount";
//	reference_no
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "reference_no";
	$fdata["GoodName"] = "reference_no";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","reference_no");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

		$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


	$tdataexpenses["reference_no"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "reference_no";
//	created_by
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "created_by";
	$fdata["GoodName"] = "created_by";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","created_by");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

	
		$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"] = "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


	$tdataexpenses["created_by"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "created_by";
//	created_at
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "created_at";
	$fdata["GoodName"] = "created_at";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","created_at");
	$fdata["FieldType"] = 135;

	
	
	
			

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

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

	
	
				$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


	$tdataexpenses["created_at"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "created_at";
//	category
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "category";
	$fdata["GoodName"] = "category";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","category");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = "expense_categories";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
			$edata["LookupUnique"] = true;

	$edata["LinkField"] = "category_name";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "category_name";

	

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

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

	
	
		$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


	$tdataexpenses["category"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "category";
//	details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "details";
	$fdata["GoodName"] = "details";
	$fdata["ownerTable"] = "expenses";
	$fdata["Label"] = GetFieldLabel("expenses","details");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = "expense_categories";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "description";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "description";

	

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

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

	
	

	
	
		$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


	$tdataexpenses["details"] = $fdata;
		$tdataexpenses[".searchableFields"][] = "details";


$tables_data["expenses"]=&$tdataexpenses;
$field_labels["expenses"] = &$fieldLabelsexpenses;
$fieldToolTips["expenses"] = &$fieldToolTipsexpenses;
$placeHolders["expenses"] = &$placeHoldersexpenses;
$page_titles["expenses"] = &$pageTitlesexpenses;

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

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



	
				$strOriginalDetailsTable="dally report";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="dally report";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "dally_report";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["expenses"][0] = $masterParams;
				$masterTablesData["expenses"][0]["masterKeys"] = array();
	$masterTablesData["expenses"][0]["masterKeys"][]="txn_date";
				$masterTablesData["expenses"][0]["detailKeys"] = array();
	$masterTablesData["expenses"][0]["detailKeys"][]="expense_date";
		
// -----------------end  prepare master-details data arrays ------------------------------//



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











function createSqlQuery_expenses()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "expense_id,  	expense_date,  	amount,  	reference_no,  	created_by,  	created_at,  	category,  	details";
$proto0["m_strFrom"] = "FROM expenses";
$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" => "expense_id",
	"m_strTable" => "expenses",
	"m_srcTableName" => "expenses"
));

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto12=array();
			$obj = new SQLField(array(
	"m_strName" => "reference_no",
	"m_strTable" => "expenses",
	"m_srcTableName" => "expenses"
));

$proto12["m_sql"] = "reference_no";
$proto12["m_srcTableName"] = "expenses";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "created_by",
	"m_strTable" => "expenses",
	"m_srcTableName" => "expenses"
));

$proto14["m_sql"] = "created_by";
$proto14["m_srcTableName"] = "expenses";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "created_at",
	"m_strTable" => "expenses",
	"m_srcTableName" => "expenses"
));

$proto16["m_sql"] = "created_at";
$proto16["m_srcTableName"] = "expenses";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLField(array(
	"m_strName" => "category",
	"m_strTable" => "expenses",
	"m_srcTableName" => "expenses"
));

$proto18["m_sql"] = "category";
$proto18["m_srcTableName"] = "expenses";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLField(array(
	"m_strName" => "details",
	"m_strTable" => "expenses",
	"m_srcTableName" => "expenses"
));

$proto20["m_sql"] = "details";
$proto20["m_srcTableName"] = "expenses";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto22=array();
$proto22["m_link"] = "SQLL_MAIN";
			$proto23=array();
$proto23["m_strName"] = "expenses";
$proto23["m_srcTableName"] = "expenses";
$proto23["m_columns"] = array();
$proto23["m_columns"][] = "expense_id";
$proto23["m_columns"][] = "expense_date";
$proto23["m_columns"][] = "amount";
$proto23["m_columns"][] = "reference_no";
$proto23["m_columns"][] = "created_by";
$proto23["m_columns"][] = "created_at";
$proto23["m_columns"][] = "category";
$proto23["m_columns"][] = "details";
$obj = new SQLTable($proto23);

$proto22["m_table"] = $obj;
$proto22["m_sql"] = "expenses";
$proto22["m_alias"] = "";
$proto22["m_srcTableName"] = "expenses";
$proto24=array();
$proto24["m_sql"] = "";
$proto24["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_expenses = createSqlQuery_expenses();


	
		;

								

$tdataexpenses[".sqlquery"] = $queryData_expenses;



$tableEvents["expenses"] = new eventsBase;
$tdataexpenses[".hasEvents"] = false;

?>