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


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

//	field labels
$fieldLabelsrout_plans = array();
$fieldToolTipsrout_plans = array();
$pageTitlesrout_plans = array();
$placeHoldersrout_plans = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsrout_plans["English"] = array();
	$fieldToolTipsrout_plans["English"] = array();
	$placeHoldersrout_plans["English"] = array();
	$pageTitlesrout_plans["English"] = array();
	$fieldLabelsrout_plans["English"]["id"] = "Id";
	$fieldToolTipsrout_plans["English"]["id"] = "";
	$placeHoldersrout_plans["English"]["id"] = "";
	$fieldLabelsrout_plans["English"]["route_id"] = "Route Id";
	$fieldToolTipsrout_plans["English"]["route_id"] = "";
	$placeHoldersrout_plans["English"]["route_id"] = "";
	$fieldLabelsrout_plans["English"]["order_number"] = "Order Number";
	$fieldToolTipsrout_plans["English"]["order_number"] = "";
	$placeHoldersrout_plans["English"]["order_number"] = "";
	$fieldLabelsrout_plans["English"]["Loan_Details"] = "Loan Details";
	$fieldToolTipsrout_plans["English"]["Loan_Details"] = "";
	$placeHoldersrout_plans["English"]["Loan_Details"] = "";
	$fieldLabelsrout_plans["English"]["Name"] = "Name";
	$fieldToolTipsrout_plans["English"]["Name"] = "";
	$placeHoldersrout_plans["English"]["Name"] = "";
	$fieldLabelsrout_plans["English"]["Loan_No"] = "Loan No";
	$fieldToolTipsrout_plans["English"]["Loan_No"] = "";
	$placeHoldersrout_plans["English"]["Loan_No"] = "";
	$fieldLabelsrout_plans["English"]["status"] = "Status";
	$fieldToolTipsrout_plans["English"]["status"] = "";
	$placeHoldersrout_plans["English"]["status"] = "";
	$fieldLabelsrout_plans["English"]["Arrears_Amount"] = "Arrears Amount";
	$fieldToolTipsrout_plans["English"]["Arrears_Amount"] = "";
	$placeHoldersrout_plans["English"]["Arrears_Amount"] = "";
	if (count($fieldToolTipsrout_plans["English"]))
		$tdatarout_plans[".isUseToolTips"] = true;
}


	$tdatarout_plans[".NCSearch"] = true;



$tdatarout_plans[".shortTableName"] = "rout_plans";
$tdatarout_plans[".nSecOptions"] = 0;

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


$tdatarout_plans[".strOriginalTableName"] = "rout_plans";

	



$tdatarout_plans[".showAddInPopup"] = false;

$tdatarout_plans[".showEditInPopup"] = false;

$tdatarout_plans[".showViewInPopup"] = false;

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


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

	$tdatarout_plans[".audit"] = false;

	$tdatarout_plans[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatarout_plans[".isUseAjaxSuggest"] = true;

$tdatarout_plans[".rowHighlite"] = true;



																								

$tdatarout_plans[".ajaxCodeSnippetAdded"] = false;

$tdatarout_plans[".buttonsAdded"] = false;

$tdatarout_plans[".addPageEvents"] = false;

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


$tdatarout_plans[".badgeColor"] = "1E90FF";


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

$tdatarout_plans[".googleLikeFields"] = array();
$tdatarout_plans[".googleLikeFields"][] = "id";
$tdatarout_plans[".googleLikeFields"][] = "route_id";
$tdatarout_plans[".googleLikeFields"][] = "order_number";
$tdatarout_plans[".googleLikeFields"][] = "Loan Details";
$tdatarout_plans[".googleLikeFields"][] = "Name";
$tdatarout_plans[".googleLikeFields"][] = "Loan No";
$tdatarout_plans[".googleLikeFields"][] = "Arrears Amount";
$tdatarout_plans[".googleLikeFields"][] = "status";



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

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

$tdatarout_plans[".nPrinterSplitRecords"] = 40;

$tdatarout_plans[".geocodingEnabled"] = false;





$tdatarout_plans[".isResizeColumns"] = true;





$tdatarout_plans[".pageSize"] = 20;

$tdatarout_plans[".warnLeavingPages"] = true;



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

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


$tdatarout_plans[".sqlHead"] = "SELECT id,  route_id,  order_number,  loan_id AS `Loan Details`,  loan_id AS Name,  loan_id AS `Loan No`,  loan_id AS `Arrears Amount`,  status";
$tdatarout_plans[".sqlFrom"] = "FROM rout_plans";
$tdatarout_plans[".sqlWhereExpr"] = "";
$tdatarout_plans[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "1",
	'name' => "1",
	'nameType' => 'Text',
	'where' => "route_id = \"1\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "2",
	'name' => "2",
	'nameType' => 'Text',
	'where' => "route_id = \"2\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "3",
	'name' => "3",
	'nameType' => 'Text',
	'where' => "route_id = \"3\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "4",
	'name' => "4",
	'nameType' => 'Text',
	'where' => "route_id = \"4\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "5",
	'name' => "5",
	'nameType' => 'Text',
	'where' => "route_id = \"5\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "6",
	'name' => "6",
	'nameType' => 'Text',
	'where' => "route_id = \"6\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "7",
	'name' => "7",
	'nameType' => 'Text',
	'where' => "route_id = \"7\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "8",
	'name' => "8",
	'nameType' => 'Text',
	'where' => "route_id = \"8\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "9",
	'name' => "9",
	'nameType' => 'Text',
	'where' => "route_id = \"9\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "10",
	'name' => "10",
	'nameType' => 'Text',
	'where' => "route_id = \"10\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "11",
	'name' => "11",
	'nameType' => 'Text',
	'where' => "route_id = \"11\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "12",
	'name' => "12",
	'nameType' => 'Text',
	'where' => "route_id = \"12\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "All",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatarout_plans[".arrGridTabs"] = $arrGridTabs;









//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;
$tdatarout_plans[".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;
$tdatarout_plans[".arrGroupsPerPage"] = $arrGPP;

$tdatarout_plans[".highlightSearchResults"] = true;

$tableKeysrout_plans = array();
$tableKeysrout_plans[] = "id";
$tdatarout_plans[".Keys"] = $tableKeysrout_plans;


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




//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","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


	$tdatarout_plans["id"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "id";
//	route_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "route_id";
	$fdata["GoodName"] = "route_id";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","route_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "route_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" => "Lookup wizard");

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


	
	

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

	
		
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "route_name";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$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


	$tdatarout_plans["route_id"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "route_id";
//	order_number
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "order_number";
	$fdata["GoodName"] = "order_number";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","order_number");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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


	$tdatarout_plans["order_number"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "order_number";
//	Loan Details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Loan Details";
	$fdata["GoodName"] = "Loan_Details";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","Loan_Details");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$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"] = "Loan Details";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"Name", 'lookupF'=>"name");
	$edata["autoCompleteFields"][] = array('masterF'=>"Loan No", 'lookupF'=>"loan_id");
	$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "loan_id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "details";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$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


	$tdatarout_plans["Loan Details"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "Loan Details";
//	Name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Name";
	$fdata["GoodName"] = "Name";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","Name");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "loan_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" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "Loan Details";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"route_id", 'lookupF'=>"loan_id");
	$edata["autoCompleteFields"][] = array('masterF'=>"Loan Details", 'lookupF'=>"details");
	$edata["autoCompleteFields"][] = array('masterF'=>"Loan No", 'lookupF'=>"loan_id");
	$edata["LCType"] = 1;

	
		
	$edata["LinkField"] = "loan_id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "name";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

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


	$tdatarout_plans["Name"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "Name";
//	Loan No
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "Loan No";
	$fdata["GoodName"] = "Loan_No";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","Loan_No");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$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"] = "Loan Details";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"Loan Details", 'lookupF'=>"details");
	$edata["autoCompleteFields"][] = array('masterF'=>"Name", 'lookupF'=>"customer_id");
	$edata["LCType"] = 0;

	
			$edata["LookupUnique"] = true;

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

	

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

	
	
	
	

	
	
		$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


	$tdatarout_plans["Loan No"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "Loan No";
//	Arrears Amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Arrears Amount";
	$fdata["GoodName"] = "Arrears_Amount";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","Arrears_Amount");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "loan_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" => "Lookup wizard");

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


	
	

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

	
		
	$edata["LinkField"] = "loan_id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "arrears_amount";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$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


	$tdatarout_plans["Arrears Amount"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "Arrears Amount";
//	status
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "status";
	$fdata["GoodName"] = "status";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("rout_plans","status");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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();
	
		$edata["autoUpdatable"] = true;

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


	$tdatarout_plans["status"] = $fdata;
		$tdatarout_plans[".searchableFields"][] = "status";


$tables_data["rout_plans"]=&$tdatarout_plans;
$field_labels["rout_plans"] = &$fieldLabelsrout_plans;
$fieldToolTips["rout_plans"] = &$fieldToolTipsrout_plans;
$placeHolders["rout_plans"] = &$placeHoldersrout_plans;
$page_titles["rout_plans"] = &$pageTitlesrout_plans;

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

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



		
		$detailsParam["dType"]=PAGE_LIST;
	$detailsParam["dShortTable"] = "collections";
	$detailsParam["dCaptionTable"] = GetTableCaption("collections");
	$detailsParam["masterKeys"] =array();
	$detailsParam["detailKeys"] =array();


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

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

	$detailsTablesData["rout_plans"][$dIndex]["masterKeys"][]="Loan No";

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

	$detailsTablesData["rout_plans"][$dIndex]["detailKeys"][]="loan_id";

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



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



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











function createSqlQuery_rout_plans()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  route_id,  order_number,  loan_id AS `Loan Details`,  loan_id AS Name,  loan_id AS `Loan No`,  loan_id AS `Arrears Amount`,  status";
$proto0["m_strFrom"] = "FROM rout_plans";
$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" => "rout_plans",
	"m_srcTableName" => "rout_plans"
));

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

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

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

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

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

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

$proto12["m_sql"] = "loan_id";
$proto12["m_srcTableName"] = "rout_plans";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "Loan Details";
$obj = new SQLFieldListItem($proto12);

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

$proto14["m_sql"] = "loan_id";
$proto14["m_srcTableName"] = "rout_plans";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "Name";
$obj = new SQLFieldListItem($proto14);

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

$proto16["m_sql"] = "loan_id";
$proto16["m_srcTableName"] = "rout_plans";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "Loan No";
$obj = new SQLFieldListItem($proto16);

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

$proto18["m_sql"] = "loan_id";
$proto18["m_srcTableName"] = "rout_plans";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "Arrears Amount";
$obj = new SQLFieldListItem($proto18);

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

$proto20["m_sql"] = "status";
$proto20["m_srcTableName"] = "rout_plans";
$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"] = "rout_plans";
$proto23["m_srcTableName"] = "rout_plans";
$proto23["m_columns"] = array();
$proto23["m_columns"][] = "id";
$proto23["m_columns"][] = "route_id";
$proto23["m_columns"][] = "order_number";
$proto23["m_columns"][] = "loan_id";
$proto23["m_columns"][] = "status";
$obj = new SQLTable($proto23);

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

	return $obj;
}
$queryData_rout_plans = createSqlQuery_rout_plans();


	
		;

								

$tdatarout_plans[".sqlquery"] = $queryData_rout_plans;



$tableEvents["rout_plans"] = new eventsBase;
$tdatarout_plans[".hasEvents"] = false;

?>