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


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

//	field labels
$fieldLabelsmy_route = array();
$fieldToolTipsmy_route = array();
$pageTitlesmy_route = array();
$placeHoldersmy_route = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsmy_route["English"] = array();
	$fieldToolTipsmy_route["English"] = array();
	$placeHoldersmy_route["English"] = array();
	$pageTitlesmy_route["English"] = array();
	$fieldLabelsmy_route["English"]["id"] = "Id";
	$fieldToolTipsmy_route["English"]["id"] = "";
	$placeHoldersmy_route["English"]["id"] = "";
	$fieldLabelsmy_route["English"]["route_id"] = "Route Id";
	$fieldToolTipsmy_route["English"]["route_id"] = "";
	$placeHoldersmy_route["English"]["route_id"] = "";
	$fieldLabelsmy_route["English"]["order_number"] = "Order";
	$fieldToolTipsmy_route["English"]["order_number"] = "";
	$placeHoldersmy_route["English"]["order_number"] = "";
	$fieldLabelsmy_route["English"]["Loan_Details"] = "Loan Details";
	$fieldToolTipsmy_route["English"]["Loan_Details"] = "";
	$placeHoldersmy_route["English"]["Loan_Details"] = "";
	$fieldLabelsmy_route["English"]["Name"] = "Name";
	$fieldToolTipsmy_route["English"]["Name"] = "";
	$placeHoldersmy_route["English"]["Name"] = "";
	$fieldLabelsmy_route["English"]["status"] = "Status";
	$fieldToolTipsmy_route["English"]["status"] = "";
	$placeHoldersmy_route["English"]["status"] = "";
	$fieldLabelsmy_route["English"]["Arrears_Amount"] = "Arrears Amount";
	$fieldToolTipsmy_route["English"]["Arrears_Amount"] = "";
	$placeHoldersmy_route["English"]["Arrears_Amount"] = "";
	$fieldLabelsmy_route["English"]["Loan_Id"] = "Loan Id";
	$fieldToolTipsmy_route["English"]["Loan_Id"] = "";
	$placeHoldersmy_route["English"]["Loan_Id"] = "";
	$pageTitlesmy_route["English"]["edit"] = "My Route,Status Change -  {%id}";
	if (count($fieldToolTipsmy_route["English"]))
		$tdatamy_route[".isUseToolTips"] = true;
}


	$tdatamy_route[".NCSearch"] = true;



$tdatamy_route[".shortTableName"] = "my_route";
$tdatamy_route[".nSecOptions"] = 1;

$tdatamy_route[".mainTableOwnerID"] = "route_id";
$tdatamy_route[".entityType"] = 1;
$tdatamy_route[".connId"] = "easy_cash_at_localhost";


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

	



$tdatamy_route[".showAddInPopup"] = false;

$tdatamy_route[".showEditInPopup"] = false;

$tdatamy_route[".showViewInPopup"] = false;

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


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

	$tdatamy_route[".audit"] = false;

	$tdatamy_route[".locking"] = false;


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

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

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

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



$tdatamy_route[".strSortControlSettingsJSON"] = "[{\"fields\":[{\"desc\":false,\"field\":\"order_number\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"id\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"route_id\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"Loan Details\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"Name\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"Loan No\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"Arrears Amount\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"status\"}],\"label\":\"\"}]";

$tdatamy_route[".strClickActionJSON"] = "{\"fields\":{\"Arrears Amount\":{\"action\":\"noaction\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{\"action\":\"checkbox\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"goto\",\"page\":\"details\",\"table\":\"collections_collecters\",\"url\":\"\"}},\"Loan Details\":{\"action\":\"noaction\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{\"action\":\"checkbox\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"popup\",\"page\":\"edit\",\"table\":\"collections_collecters\",\"url\":\"\"}},\"Loan Id\":{\"action\":\"noaction\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{},\"openData\":{}},\"Name\":{\"action\":\"open\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{\"action\":\"checkbox\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"popup\",\"page\":\"edit\",\"table\":\"collections_collecters\",\"url\":\"\"}},\"id\":{\"action\":\"noaction\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{\"action\":\"details\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"goto\",\"page\":\"url\",\"table\":\"collections_collecters\",\"url\":\"\"}},\"order_number\":{\"action\":\"open\",\"codeData\":{},\"gridData\":{\"action\":\"checkbox\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"goto\",\"page\":\"edit\",\"table\":\"collections_collecters\",\"url\":\"\"}},\"route_id\":{\"action\":\"noaction\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{\"action\":\"checkbox\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"popup\",\"page\":\"edit\",\"table\":\"collections_collecters\",\"url\":\"\"}},\"status\":{\"action\":\"noaction\",\"codeData\":{\"snippet\":\"\"},\"gridData\":{\"action\":\"checkbox\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"goto\",\"page\":\"url\",\"table\":\"collections_collecters\",\"url\":\"\"}}},\"row\":{\"action\":\"noaction\",\"codeData\":{},\"gridData\":{\"action\":\"details\",\"table\":\"collections_collecters\"},\"openData\":{\"how\":\"goto\",\"page\":\"url\",\"table\":\"collections_collecters\",\"url\":\"\"}}}";



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

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

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

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



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

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

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

$tdatamy_route[".isUseAjaxSuggest"] = true;

$tdatamy_route[".rowHighlite"] = true;



																								

$tdatamy_route[".ajaxCodeSnippetAdded"] = false;

$tdatamy_route[".buttonsAdded"] = false;

$tdatamy_route[".addPageEvents"] = false;

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


$tdatamy_route[".badgeColor"] = "5F9EA0";


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

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



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

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

$tdatamy_route[".nPrinterSplitRecords"] = 40;

$tdatamy_route[".geocodingEnabled"] = false;





$tdatamy_route[".isResizeColumns"] = true;





$tdatamy_route[".pageSize"] = 100;

$tdatamy_route[".warnLeavingPages"] = true;



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

$tdatamy_route[".orderindexes"] = array();
	$tdatamy_route[".orderindexes"][] = array(3, (1 ? "ASC" : "DESC"), "order_number");



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

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "accepted",
	'name' => "Waiting",
	'nameType' => 'Text',
	'where' => "status = 'Waiting'",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "All",
	'name' => "Done",
	'nameType' => 'Text',
	'where' => "status =\"Done\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "Missed",
	'name' => "Missed",
	'nameType' => 'Text',
	'where' => "status =\"Missed\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "Faild",
	'name' => "Faild",
	'nameType' => 'Text',
	'where' => "status =\"Faild\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$arrGridTabs[] = array(
	'tabId' => "Deferred",
	'name' => "Deferred",
	'nameType' => 'Text',
	'where' => "status =\"Deferred\"",
	'showRowCount' => 1,
	'hideEmpty' => 1,
);
$tdatamy_route[".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;
$tdatamy_route[".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;
$tdatamy_route[".arrGroupsPerPage"] = $arrGPP;

$tdatamy_route[".highlightSearchResults"] = true;

$tableKeysmy_route = array();
$tableKeysmy_route[] = "id";
$tdatamy_route[".Keys"] = $tableKeysmy_route;


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




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


	$tdatamy_route["id"] = $fdata;
		$tdatamy_route[".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("My_route","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


	$tdatamy_route["route_id"] = $fdata;
		$tdatamy_route[".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("My_route","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


	$tdatamy_route["order_number"] = $fdata;
		$tdatamy_route[".searchableFields"][] = "order_number";
//	Loan Id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "Loan Id";
	$fdata["GoodName"] = "Loan_Id";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("My_route","Loan_Id");
	$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" => "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


	$tdatamy_route["Loan Id"] = $fdata;
		$tdatamy_route[".searchableFields"][] = "Loan Id";
//	Loan Details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "Loan Details";
	$fdata["GoodName"] = "Loan_Details";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("My_route","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"] = 10;

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


	$tdatamy_route["Loan Details"] = $fdata;
		$tdatamy_route[".searchableFields"][] = "Loan Details";
//	Name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "Name";
	$fdata["GoodName"] = "Name";
	$fdata["ownerTable"] = "rout_plans";
	$fdata["Label"] = GetFieldLabel("My_route","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"] = 40;

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


	$tdatamy_route["Name"] = $fdata;
		$tdatamy_route[".searchableFields"][] = "Name";
//	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("My_route","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


	$tdatamy_route["Arrears Amount"] = $fdata;
		$tdatamy_route[".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("My_route","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" => "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["LookupValues"] = array();
	$edata["LookupValues"][] = "Missed";
	$edata["LookupValues"][] = "Faild";
	$edata["LookupValues"][] = "Deferred";

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

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


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


$tables_data["My route"]=&$tdatamy_route;
$field_labels["My_route"] = &$fieldLabelsmy_route;
$fieldToolTips["My_route"] = &$fieldToolTipsmy_route;
$placeHolders["My_route"] = &$placeHoldersmy_route;
$page_titles["My_route"] = &$pageTitlesmy_route;

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

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



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


		
	$detailsTablesData["My route"][$dIndex] = $detailsParam;

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

	$detailsTablesData["My route"][$dIndex]["masterKeys"][]="Loan Id";

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

	$detailsTablesData["My route"][$dIndex]["detailKeys"][]="loan_id";

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



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



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











function createSqlQuery_my_route()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  route_id,  order_number,  loan_id AS `Loan Id`,  loan_id AS `Loan Details`,  loan_id AS Name,  loan_id AS `Arrears Amount`,  status";
$proto0["m_strFrom"] = "FROM rout_plans";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY order_number";
	
		;
			$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" => "My route"
));

$proto6["m_sql"] = "id";
$proto6["m_srcTableName"] = "My route";
$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" => "My route"
));

$proto8["m_sql"] = "route_id";
$proto8["m_srcTableName"] = "My route";
$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" => "My route"
));

$proto10["m_sql"] = "order_number";
$proto10["m_srcTableName"] = "My route";
$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" => "My route"
));

$proto12["m_sql"] = "loan_id";
$proto12["m_srcTableName"] = "My route";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "Loan Id";
$obj = new SQLFieldListItem($proto12);

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

$proto14["m_sql"] = "loan_id";
$proto14["m_srcTableName"] = "My route";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "Loan Details";
$obj = new SQLFieldListItem($proto14);

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

$proto16["m_sql"] = "loan_id";
$proto16["m_srcTableName"] = "My route";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "Name";
$obj = new SQLFieldListItem($proto16);

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

$proto18["m_sql"] = "loan_id";
$proto18["m_srcTableName"] = "My route";
$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" => "My route"
));

$proto20["m_sql"] = "status";
$proto20["m_srcTableName"] = "My route";
$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"] = "My route";
$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"] = "My route";
$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();
												$proto26=array();
						$obj = new SQLField(array(
	"m_strName" => "order_number",
	"m_strTable" => "rout_plans",
	"m_srcTableName" => "My route"
));

$proto26["m_column"]=$obj;
$proto26["m_bAsc"] = 1;
$proto26["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto26);

$proto0["m_orderby"][]=$obj;					
$proto0["m_srcTableName"]="My route";		
$obj = new SQLQuery($proto0);

	return $obj;
}
$queryData_my_route = createSqlQuery_my_route();


	
		;

								

$tdatamy_route[".sqlquery"] = $queryData_my_route;



$tableEvents["My route"] = new eventsBase;
$tdatamy_route[".hasEvents"] = false;

?>