<?php
$tdataexpenditure_code_view_for_sub_office = array();
$tdataexpenditure_code_view_for_sub_office[".searchableFields"] = array();
$tdataexpenditure_code_view_for_sub_office[".ShortName"] = "expenditure_code_view_for_sub_office";
$tdataexpenditure_code_view_for_sub_office[".OwnerID"] = "";
$tdataexpenditure_code_view_for_sub_office[".OriginalTable"] = "expenditure_code";


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

//	field labels
$fieldLabelsexpenditure_code_view_for_sub_office = array();
$fieldToolTipsexpenditure_code_view_for_sub_office = array();
$pageTitlesexpenditure_code_view_for_sub_office = array();
$placeHoldersexpenditure_code_view_for_sub_office = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsexpenditure_code_view_for_sub_office["English"] = array();
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"] = array();
	$placeHoldersexpenditure_code_view_for_sub_office["English"] = array();
	$pageTitlesexpenditure_code_view_for_sub_office["English"] = array();
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["id"] = "Id";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["id"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["id"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["department_code"] = "Department Code";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["department_code"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["department_code"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["department_name"] = "Department Name";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["department_name"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["department_name"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["expenditure_code"] = "Expenditure Code";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["expenditure_code"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["expenditure_code"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["description"] = "Description";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["description"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["description"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["user"] = "User";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["user"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["user"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["English"]["md"] = "Md";
	$fieldToolTipsexpenditure_code_view_for_sub_office["English"]["md"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["English"]["md"] = "";
	if (count($fieldToolTipsexpenditure_code_view_for_sub_office["English"]))
		$tdataexpenditure_code_view_for_sub_office[".isUseToolTips"] = true;
}
if(mlang_getcurrentlang()=="sinhala")
{
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"] = array();
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"] = array();
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"] = array();
	$pageTitlesexpenditure_code_view_for_sub_office["sinhala"] = array();
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["id"] = "Id";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["id"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["id"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["department_code"] = "දෙපාර්තමේන්තු කේතය";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["department_code"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["department_code"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["department_name"] = "දෙපාර්තමේන්තු නාමය";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["department_name"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["department_name"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["expenditure_code"] = "වියදම් කේතය";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["expenditure_code"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["expenditure_code"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["description"] = "විස්තරය";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["description"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["description"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["user"] = "User";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["user"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["user"] = "";
	$fieldLabelsexpenditure_code_view_for_sub_office["sinhala"]["md"] = "Md";
	$fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]["md"] = "";
	$placeHoldersexpenditure_code_view_for_sub_office["sinhala"]["md"] = "";
	if (count($fieldToolTipsexpenditure_code_view_for_sub_office["sinhala"]))
		$tdataexpenditure_code_view_for_sub_office[".isUseToolTips"] = true;
}


	$tdataexpenditure_code_view_for_sub_office[".NCSearch"] = true;



$tdataexpenditure_code_view_for_sub_office[".shortTableName"] = "expenditure_code_view_for_sub_office";
$tdataexpenditure_code_view_for_sub_office[".nSecOptions"] = 0;

$tdataexpenditure_code_view_for_sub_office[".mainTableOwnerID"] = "";
$tdataexpenditure_code_view_for_sub_office[".entityType"] = 1;
$tdataexpenditure_code_view_for_sub_office[".connId"] = "allo_at_localhost";


$tdataexpenditure_code_view_for_sub_office[".strOriginalTableName"] = "expenditure_code";

	



$tdataexpenditure_code_view_for_sub_office[".showAddInPopup"] = false;

$tdataexpenditure_code_view_for_sub_office[".showEditInPopup"] = false;

$tdataexpenditure_code_view_for_sub_office[".showViewInPopup"] = false;

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


	$tdataexpenditure_code_view_for_sub_office[".listAjax"] = true;
//	temporary
$tdataexpenditure_code_view_for_sub_office[".listAjax"] = false;

	$tdataexpenditure_code_view_for_sub_office[".audit"] = true;

	$tdataexpenditure_code_view_for_sub_office[".locking"] = true;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataexpenditure_code_view_for_sub_office[".isUseAjaxSuggest"] = true;

$tdataexpenditure_code_view_for_sub_office[".rowHighlite"] = true;



																								

$tdataexpenditure_code_view_for_sub_office[".ajaxCodeSnippetAdded"] = false;

$tdataexpenditure_code_view_for_sub_office[".buttonsAdded"] = false;

$tdataexpenditure_code_view_for_sub_office[".addPageEvents"] = false;

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


$tdataexpenditure_code_view_for_sub_office[".badgeColor"] = "00C2C5";


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

$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"] = array();
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "id";
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "department_code";
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "department_name";
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "expenditure_code";
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "description";
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "user";
$tdataexpenditure_code_view_for_sub_office[".googleLikeFields"][] = "md";



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

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

$tdataexpenditure_code_view_for_sub_office[".nPrinterSplitRecords"] = 40;

$tdataexpenditure_code_view_for_sub_office[".geocodingEnabled"] = false;










$tdataexpenditure_code_view_for_sub_office[".pageSize"] = 20;

$tdataexpenditure_code_view_for_sub_office[".warnLeavingPages"] = true;



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

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


$tdataexpenditure_code_view_for_sub_office[".sqlHead"] = "SELECT id,  	department_code,  	department_name,  	expenditure_code,  	description,  	`user`,  	md";
$tdataexpenditure_code_view_for_sub_office[".sqlFrom"] = "FROM expenditure_code";
$tdataexpenditure_code_view_for_sub_office[".sqlWhereExpr"] = "";
$tdataexpenditure_code_view_for_sub_office[".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;
$tdataexpenditure_code_view_for_sub_office[".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;
$tdataexpenditure_code_view_for_sub_office[".arrGroupsPerPage"] = $arrGPP;

$tdataexpenditure_code_view_for_sub_office[".highlightSearchResults"] = true;

$tableKeysexpenditure_code_view_for_sub_office = array();
$tableKeysexpenditure_code_view_for_sub_office[] = "id";
$tdataexpenditure_code_view_for_sub_office[".Keys"] = $tableKeysexpenditure_code_view_for_sub_office;


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




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

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


	$tdataexpenditure_code_view_for_sub_office["id"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "id";
//	department_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "department_code";
	$fdata["GoodName"] = "department_code";
	$fdata["ownerTable"] = "expenditure_code";
	$fdata["Label"] = GetFieldLabel("expenditure_code_view_for_sub_office","department_code");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = "department";
		$edata["listPageId"] = "list";
		$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"department_name", 'lookupF'=>"department_name");
	$edata["autoCompleteFields"][] = array('masterF'=>"md", 'lookupF'=>"md");
	$edata["LCType"] = 2;

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

	

	
	$edata["LookupOrderBy"] = "";

	
	
		$edata["AllowToAdd"] = true;
		
	

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


	$tdataexpenditure_code_view_for_sub_office["department_code"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "department_code";
//	department_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "department_name";
	$fdata["GoodName"] = "department_name";
	$fdata["ownerTable"] = "expenditure_code";
	$fdata["Label"] = GetFieldLabel("expenditure_code_view_for_sub_office","department_name");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

		$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


	$tdataexpenditure_code_view_for_sub_office["department_name"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "department_name";
//	expenditure_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "expenditure_code";
	$fdata["GoodName"] = "expenditure_code";
	$fdata["ownerTable"] = "expenditure_code";
	$fdata["Label"] = GetFieldLabel("expenditure_code_view_for_sub_office","expenditure_code");
	$fdata["FieldType"] = 200;

	
	
	
			

		$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"]["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["EditParams"].= " maxlength=250";

		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
			$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "Value %value% already exists", "messageType" => "Text");

	
	//	End validation

	
			
	
		$edata["denyDuplicates"] = true;

	
	$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


	$tdataexpenditure_code_view_for_sub_office["expenditure_code"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "expenditure_code";
//	description
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "description";
	$fdata["GoodName"] = "description";
	$fdata["ownerTable"] = "expenditure_code";
	$fdata["Label"] = GetFieldLabel("expenditure_code_view_for_sub_office","description");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

	

	
	$edata["LookupOrderBy"] = "";

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

	

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


	$tdataexpenditure_code_view_for_sub_office["description"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "description";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "expenditure_code";
	$fdata["Label"] = GetFieldLabel("expenditure_code_view_for_sub_office","user");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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


	$tdataexpenditure_code_view_for_sub_office["user"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "user";
//	md
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "md";
	$fdata["GoodName"] = "md";
	$fdata["ownerTable"] = "expenditure_code";
	$fdata["Label"] = GetFieldLabel("expenditure_code_view_for_sub_office","md");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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


	$tdataexpenditure_code_view_for_sub_office["md"] = $fdata;
		$tdataexpenditure_code_view_for_sub_office[".searchableFields"][] = "md";


$tables_data["expenditure_code_view_for_sub_office"]=&$tdataexpenditure_code_view_for_sub_office;
$field_labels["expenditure_code_view_for_sub_office"] = &$fieldLabelsexpenditure_code_view_for_sub_office;
$fieldToolTips["expenditure_code_view_for_sub_office"] = &$fieldToolTipsexpenditure_code_view_for_sub_office;
$placeHolders["expenditure_code_view_for_sub_office"] = &$placeHoldersexpenditure_code_view_for_sub_office;
$page_titles["expenditure_code_view_for_sub_office"] = &$pageTitlesexpenditure_code_view_for_sub_office;

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

		$dIndex = 0;
	$detailsParam = array();
	$detailsParam["dDataSourceTable"]="Details";
		$detailsParam["dOriginalTable"] = "allocation_detail";



		$detailsParam["dType"]=PAGE_REPORT;
	
		$detailsParam["dShortTable"] = "details";
	$detailsParam["dCaptionTable"] = GetTableCaption("Details");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


		
	$detailsTablesData["expenditure_code_view_for_sub_office"][$dIndex] = $detailsParam;

	
		$detailsTablesData["expenditure_code_view_for_sub_office"][$dIndex]["masterKeys"] = array();

	$detailsTablesData["expenditure_code_view_for_sub_office"][$dIndex]["masterKeys"][]="expenditure_code";

				$detailsTablesData["expenditure_code_view_for_sub_office"][$dIndex]["detailKeys"] = array();

	$detailsTablesData["expenditure_code_view_for_sub_office"][$dIndex]["detailKeys"][]="expenditure_code";

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



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



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











function createSqlQuery_expenditure_code_view_for_sub_office()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	department_code,  	department_name,  	expenditure_code,  	description,  	`user`,  	md";
$proto0["m_strFrom"] = "FROM expenditure_code";
$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" => "expenditure_code",
	"m_srcTableName" => "expenditure_code_view_for_sub_office"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto20=array();
$proto20["m_link"] = "SQLL_MAIN";
			$proto21=array();
$proto21["m_strName"] = "expenditure_code";
$proto21["m_srcTableName"] = "expenditure_code_view_for_sub_office";
$proto21["m_columns"] = array();
$proto21["m_columns"][] = "id";
$proto21["m_columns"][] = "department_code";
$proto21["m_columns"][] = "department_name";
$proto21["m_columns"][] = "expenditure_code";
$proto21["m_columns"][] = "description";
$proto21["m_columns"][] = "user";
$proto21["m_columns"][] = "md";
$obj = new SQLTable($proto21);

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

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

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

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

	return $obj;
}
$queryData_expenditure_code_view_for_sub_office = createSqlQuery_expenditure_code_view_for_sub_office();


	
		;

							

$tdataexpenditure_code_view_for_sub_office[".sqlquery"] = $queryData_expenditure_code_view_for_sub_office;



$tableEvents["expenditure_code_view_for_sub_office"] = new eventsBase;
$tdataexpenditure_code_view_for_sub_office[".hasEvents"] = false;

?>