<?php
$tdatareport1 = array();
$tdatareport1[".searchableFields"] = array();
$tdatareport1[".ShortName"] = "report1";
$tdatareport1[".OwnerID"] = "";
$tdatareport1[".OriginalTable"] = "allocation_detail";


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

//	field labels
$fieldLabelsreport1 = array();
$fieldToolTipsreport1 = array();
$pageTitlesreport1 = array();
$placeHoldersreport1 = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsreport1["English"] = array();
	$fieldToolTipsreport1["English"] = array();
	$placeHoldersreport1["English"] = array();
	$pageTitlesreport1["English"] = array();
	$fieldLabelsreport1["English"]["id"] = "Id";
	$fieldToolTipsreport1["English"]["id"] = "";
	$placeHoldersreport1["English"]["id"] = "";
	$fieldLabelsreport1["English"]["sub_office"] = "Sub Office";
	$fieldToolTipsreport1["English"]["sub_office"] = "";
	$placeHoldersreport1["English"]["sub_office"] = "";
	$fieldLabelsreport1["English"]["expenditure_code"] = "Expenditure Code";
	$fieldToolTipsreport1["English"]["expenditure_code"] = "";
	$placeHoldersreport1["English"]["expenditure_code"] = "";
	$fieldLabelsreport1["English"]["department"] = "Department";
	$fieldToolTipsreport1["English"]["department"] = "";
	$placeHoldersreport1["English"]["department"] = "";
	$fieldLabelsreport1["English"]["amount"] = "Amount";
	$fieldToolTipsreport1["English"]["amount"] = "";
	$placeHoldersreport1["English"]["amount"] = "";
	$fieldLabelsreport1["English"]["date"] = "Date";
	$fieldToolTipsreport1["English"]["date"] = "";
	$placeHoldersreport1["English"]["date"] = "";
	$fieldLabelsreport1["English"]["action"] = "Action";
	$fieldToolTipsreport1["English"]["action"] = "";
	$placeHoldersreport1["English"]["action"] = "";
	$fieldLabelsreport1["English"]["c_acc"] = "C Acc";
	$fieldToolTipsreport1["English"]["c_acc"] = "";
	$placeHoldersreport1["English"]["c_acc"] = "";
	if (count($fieldToolTipsreport1["English"]))
		$tdatareport1[".isUseToolTips"] = true;
}
if(mlang_getcurrentlang()=="sinhala")
{
	$fieldLabelsreport1["sinhala"] = array();
	$fieldToolTipsreport1["sinhala"] = array();
	$placeHoldersreport1["sinhala"] = array();
	$pageTitlesreport1["sinhala"] = array();
	$fieldLabelsreport1["sinhala"]["id"] = "Id";
	$fieldToolTipsreport1["sinhala"]["id"] = "";
	$placeHoldersreport1["sinhala"]["id"] = "";
	$fieldLabelsreport1["sinhala"]["sub_office"] = "Sub Office";
	$fieldToolTipsreport1["sinhala"]["sub_office"] = "";
	$placeHoldersreport1["sinhala"]["sub_office"] = "";
	$fieldLabelsreport1["sinhala"]["expenditure_code"] = "Expenditure Code";
	$fieldToolTipsreport1["sinhala"]["expenditure_code"] = "";
	$placeHoldersreport1["sinhala"]["expenditure_code"] = "";
	$fieldLabelsreport1["sinhala"]["department"] = "Department";
	$fieldToolTipsreport1["sinhala"]["department"] = "";
	$placeHoldersreport1["sinhala"]["department"] = "";
	$fieldLabelsreport1["sinhala"]["amount"] = "Amount";
	$fieldToolTipsreport1["sinhala"]["amount"] = "";
	$placeHoldersreport1["sinhala"]["amount"] = "";
	$fieldLabelsreport1["sinhala"]["date"] = "Date";
	$fieldToolTipsreport1["sinhala"]["date"] = "";
	$placeHoldersreport1["sinhala"]["date"] = "";
	$fieldLabelsreport1["sinhala"]["action"] = "Action";
	$fieldToolTipsreport1["sinhala"]["action"] = "";
	$placeHoldersreport1["sinhala"]["action"] = "";
	$fieldLabelsreport1["sinhala"]["c_acc"] = "C Acc";
	$fieldToolTipsreport1["sinhala"]["c_acc"] = "";
	$placeHoldersreport1["sinhala"]["c_acc"] = "";
	if (count($fieldToolTipsreport1["sinhala"]))
		$tdatareport1[".isUseToolTips"] = true;
}


	$tdatareport1[".NCSearch"] = true;



$tdatareport1[".shortTableName"] = "report1";
$tdatareport1[".nSecOptions"] = 0;

$tdatareport1[".mainTableOwnerID"] = "";
$tdatareport1[".entityType"] = 2;
$tdatareport1[".connId"] = "allo_at_localhost";


$tdatareport1[".strOriginalTableName"] = "allocation_detail";

	



$tdatareport1[".showAddInPopup"] = false;

$tdatareport1[".showEditInPopup"] = false;

$tdatareport1[".showViewInPopup"] = false;

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


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

	$tdatareport1[".audit"] = false;

	$tdatareport1[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatareport1[".isUseAjaxSuggest"] = true;




																								

$tdatareport1[".ajaxCodeSnippetAdded"] = false;

$tdatareport1[".buttonsAdded"] = false;

$tdatareport1[".addPageEvents"] = false;

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


$tdatareport1[".badgeColor"] = "8FBC8B";


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

$tdatareport1[".googleLikeFields"] = array();
$tdatareport1[".googleLikeFields"][] = "id";
$tdatareport1[".googleLikeFields"][] = "sub_office";
$tdatareport1[".googleLikeFields"][] = "expenditure_code";
$tdatareport1[".googleLikeFields"][] = "department";
$tdatareport1[".googleLikeFields"][] = "amount";
$tdatareport1[".googleLikeFields"][] = "date";
$tdatareport1[".googleLikeFields"][] = "action";
$tdatareport1[".googleLikeFields"][] = "c_acc";



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

$tdatareport1[".printerPageOrientation"] = 0;
$tdatareport1[".isPrinterPageFitToPage"] = 0;
$tdatareport1[".nPrinterPageScale"] = 100;

$tdatareport1[".nPrinterSplitRecords"] = 40;

$tdatareport1[".geocodingEnabled"] = false;

//report settings
$tdatareport1[".printReportLayout"] = 3;

$tdatareport1[".reportPrintPartitionType"] = 1;
$tdatareport1[".reportPrintGroupsPerPage"] = 3;
$tdatareport1[".lowGroup"] = 4;



$tdatareport1[".reportGroupFields"] = true;
$tdatareport1[".pageSize"] = 5;
$tdatareport1[".showGroupSummaryCount"] = true;
$reportGroupFieldsList = array();
$reportGroupFields = array();
	$reportGroupFieldsList []= "department";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "department";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 1;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
	$reportGroupFieldsList []= "sub_office";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "sub_office";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 2;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
	$reportGroupFieldsList []= "expenditure_code";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "expenditure_code";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 3;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
	$reportGroupFieldsList []= "action";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "action";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 4;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
$tdatareport1[".reportGroupFieldsData"] = $reportGroupFields;
$tdatareport1[".reportGroupFieldsList"] = $reportGroupFieldsList;


$tdatareport1[".isExistTotalFields"] = true;




$tdatareport1[".repShowDet"] = true;

$tdatareport1[".reportLayout"] = 3;

//end of report settings










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

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


$tdatareport1[".sqlHead"] = "SELECT id,  sub_office,  expenditure_code,  department,  amount,  `date`,  `action`,  c_acc";
$tdatareport1[".sqlFrom"] = "FROM allocation_detail";
$tdatareport1[".sqlWhereExpr"] = "";
$tdatareport1[".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;
$tdatareport1[".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;
$tdatareport1[".arrGroupsPerPage"] = $arrGPP;

$tdatareport1[".highlightSearchResults"] = true;

$tableKeysreport1 = array();
$tableKeysreport1[] = "id";
$tdatareport1[".Keys"] = $tableKeysreport1;


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




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

		// report field settings
					// end of report field settings

		$fdata["AutoInc"] = true;

	
			

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

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

	
	
				$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["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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["id"] = $fdata;
		$tdatareport1[".searchableFields"][] = "id";
//	sub_office
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "sub_office";
	$fdata["GoodName"] = "sub_office";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","sub_office");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

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

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

	
	
				$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" => "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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["sub_office"] = $fdata;
		$tdatareport1[".searchableFields"][] = "sub_office";
//	expenditure_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "expenditure_code";
	$fdata["GoodName"] = "expenditure_code";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","expenditure_code");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

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

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

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

		$edata["maxNumberOfFiles"] = 1;

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

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

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["expenditure_code"] = $fdata;
		$tdatareport1[".searchableFields"][] = "expenditure_code";
//	department
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "department";
	$fdata["GoodName"] = "department";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","department");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

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

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

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

		$edata["maxNumberOfFiles"] = 1;

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

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

		$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 user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["department"] = $fdata;
		$tdatareport1[".searchableFields"][] = "department";
//	amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "amount";
	$fdata["GoodName"] = "amount";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","amount");
	$fdata["FieldType"] = 14;

		// report field settings
					$fdata["isTotalSum"] = true;
	// end of report field settings

	
	
			

		$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"]["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["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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["amount"] = $fdata;
		$tdatareport1[".searchableFields"][] = "amount";
//	date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "date";
	$fdata["GoodName"] = "date";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","date");
	$fdata["FieldType"] = 7;

		// report field settings
					// end of report field settings

	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`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"]["report"] = $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"] = 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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["date"] = $fdata;
		$tdatareport1[".searchableFields"][] = "date";
//	action
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "action";
	$fdata["GoodName"] = "action";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","action");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "`action`";

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

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


	
	

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

		$edata["HorizontalLookup"] = true;

	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "නිකුත් කිරීම";
	$edata["LookupValues"][] = "පවරාගැනීම";

	
	
// 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"]["search"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// the user's search options list
		$fdata["searchOptionsList"] = array();
		$fdata["searchOptionsList"][] = "Contains";
		$fdata["searchOptionsList"][] = "Equals";
		$fdata["searchOptionsList"][] = "Starts with";
		$fdata["searchOptionsList"][] = "More than";
		$fdata["searchOptionsList"][] = "Less than";
		$fdata["searchOptionsList"][] = "Between";
		$fdata["searchOptionsList"][] = "Empty";
		$fdata["searchOptionsList"][] = "NOT Contains";
		$fdata["searchOptionsList"][] = "NOT Equals";
		$fdata["searchOptionsList"][] = "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


	$tdatareport1["action"] = $fdata;
		$tdatareport1[".searchableFields"][] = "action";
//	c_acc
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "c_acc";
	$fdata["GoodName"] = "c_acc";
	$fdata["ownerTable"] = "allocation_detail";
	$fdata["Label"] = GetFieldLabel("Report1","c_acc");
	$fdata["FieldType"] = 14;

		// report field settings
					// end of report field settings

	
	
			

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

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

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


	$tdatareport1["c_acc"] = $fdata;
		$tdatareport1[".searchableFields"][] = "c_acc";


$tables_data["Report1"]=&$tdatareport1;
$field_labels["Report1"] = &$fieldLabelsreport1;
$fieldToolTips["Report1"] = &$fieldToolTipsreport1;
$placeHolders["Report1"] = &$placeHoldersreport1;
$page_titles["Report1"] = &$pageTitlesreport1;

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

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



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



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











function createSqlQuery_report1()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  sub_office,  expenditure_code,  department,  amount,  `date`,  `action`,  c_acc";
$proto0["m_strFrom"] = "FROM allocation_detail";
$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",
	"m_strTable" => "allocation_detail",
	"m_srcTableName" => "Report1"
));

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

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

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

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

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

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

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

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

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

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

$proto16["m_sql"] = "`date`";
$proto16["m_srcTableName"] = "Report1";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

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

$proto18["m_sql"] = "`action`";
$proto18["m_srcTableName"] = "Report1";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

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

$proto20["m_sql"] = "c_acc";
$proto20["m_srcTableName"] = "Report1";
$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"] = "allocation_detail";
$proto23["m_srcTableName"] = "Report1";
$proto23["m_columns"] = array();
$proto23["m_columns"][] = "id";
$proto23["m_columns"][] = "sub_office_code";
$proto23["m_columns"][] = "sub_office";
$proto23["m_columns"][] = "expenditure_code";
$proto23["m_columns"][] = "department";
$proto23["m_columns"][] = "amount";
$proto23["m_columns"][] = "date";
$proto23["m_columns"][] = "user";
$proto23["m_columns"][] = "on_time";
$proto23["m_columns"][] = "fk";
$proto23["m_columns"][] = "action";
$proto23["m_columns"][] = "ud";
$proto23["m_columns"][] = "md";
$proto23["m_columns"][] = "comment";
$proto23["m_columns"][] = "description";
$proto23["m_columns"][] = "c_acc";
$proto23["m_columns"][] = "delete";
$proto23["m_columns"][] = "accounting_code";
$obj = new SQLTable($proto23);

$proto22["m_table"] = $obj;
$proto22["m_sql"] = "allocation_detail";
$proto22["m_alias"] = "";
$proto22["m_srcTableName"] = "Report1";
$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"]="Report1";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_report1 = createSqlQuery_report1();


	
		;

								

$tdatareport1[".sqlquery"] = $queryData_report1;



$tableEvents["Report1"] = new eventsBase;
$tdatareport1[".hasEvents"] = false;

?>