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


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

//	field labels
$fieldLabelscollection = array();
$fieldToolTipscollection = array();
$pageTitlescollection = array();
$placeHolderscollection = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscollection["English"] = array();
	$fieldToolTipscollection["English"] = array();
	$placeHolderscollection["English"] = array();
	$pageTitlescollection["English"] = array();
	$fieldLabelscollection["English"]["collection_id"] = "Collection Id";
	$fieldToolTipscollection["English"]["collection_id"] = "";
	$placeHolderscollection["English"]["collection_id"] = "";
	$fieldLabelscollection["English"]["loan_id"] = "Loan Id";
	$fieldToolTipscollection["English"]["loan_id"] = "";
	$placeHolderscollection["English"]["loan_id"] = "";
	$fieldLabelscollection["English"]["pay_date"] = "Pay Date";
	$fieldToolTipscollection["English"]["pay_date"] = "";
	$placeHolderscollection["English"]["pay_date"] = "";
	$fieldLabelscollection["English"]["amount"] = "Amount";
	$fieldToolTipscollection["English"]["amount"] = "";
	$placeHolderscollection["English"]["amount"] = "";
	if (count($fieldToolTipscollection["English"]))
		$tdatacollection[".isUseToolTips"] = true;
}


	$tdatacollection[".NCSearch"] = true;



$tdatacollection[".shortTableName"] = "collection";
$tdatacollection[".nSecOptions"] = 0;

$tdatacollection[".mainTableOwnerID"] = "";
$tdatacollection[".entityType"] = 6;
$tdatacollection[".connId"] = "easy_cash_at_localhost";


$tdatacollection[".strOriginalTableName"] = "collection";

	



$tdatacollection[".showAddInPopup"] = false;

$tdatacollection[".showEditInPopup"] = false;

$tdatacollection[".showViewInPopup"] = false;

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


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

	$tdatacollection[".audit"] = false;

	$tdatacollection[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatacollection[".isUseAjaxSuggest"] = true;

$tdatacollection[".rowHighlite"] = true;



																																																																								

$tdatacollection[".ajaxCodeSnippetAdded"] = false;

$tdatacollection[".buttonsAdded"] = false;

$tdatacollection[".addPageEvents"] = false;

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


$tdatacollection[".badgeColor"] = "6da5c8";


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

$tdatacollection[".googleLikeFields"] = array();
$tdatacollection[".googleLikeFields"][] = "collection_id";
$tdatacollection[".googleLikeFields"][] = "loan_id";
$tdatacollection[".googleLikeFields"][] = "pay_date";
$tdatacollection[".googleLikeFields"][] = "amount";




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

$tdatacollection[".nPrinterSplitRecords"] = 40;

$tdatacollection[".geocodingEnabled"] = false;










$tdatacollection[".pageSize"] = 20;

$tdatacollection[".warnLeavingPages"] = true;



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

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


$tdatacollection[".sqlHead"] = "";
$tdatacollection[".sqlFrom"] = "";
$tdatacollection[".sqlWhereExpr"] = "";
$tdatacollection[".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;
$tdatacollection[".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;
$tdatacollection[".arrGroupsPerPage"] = $arrGPP;

$tdatacollection[".highlightSearchResults"] = true;

$tableKeyscollection = array();
$tableKeyscollection[] = "collection_id";
$tdatacollection[".Keys"] = $tableKeyscollection;


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




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

	
	
	
			

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

	
		$fdata["FullName"] = "collection_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


	$tdatacollection["collection_id"] = $fdata;
		$tdatacollection[".searchableFields"][] = "collection_id";
//	loan_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "loan_id";
	$fdata["GoodName"] = "loan_id";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("collection","loan_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$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


	$tdatacollection["loan_id"] = $fdata;
		$tdatacollection[".searchableFields"][] = "loan_id";
//	pay_date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "pay_date";
	$fdata["GoodName"] = "pay_date";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("collection","pay_date");
	$fdata["FieldType"] = 7;

	
	
	
			

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

	
		$fdata["FullName"] = "pay_date";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["view"] = $vdata;
//  End View Formats

//	Begin Edit Formats
	$fdata["EditFormats"] = array();

	$edata = array("EditFormat" => "Date");

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


	
	



		$edata["IsRequired"] = true;

	
	
	
			$edata["acceptFileTypes"] = ".+$";
		$edata["acceptFileTypesHtml"] = "";

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 13;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

//	Begin validation
	$edata["validateAs"] = array();
	$edata["validateAs"]["basicValidate"] = array();
	$edata["validateAs"]["customMessages"] = array();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

	
			
	
	
	
	$fdata["EditFormats"]["edit"] = $edata;
//	End Edit Formats


	$fdata["isSeparate"] = false;




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

			// the default search options list
				$fdata["searchOptionsList"] = array("Equals", "More than", "Less than", "Between", EMPTY_SEARCH, NOT_EMPTY );
// the end of search options settings


//Filters settings
	$fdata["filterTotals"] = 0;
		$fdata["filterMultiSelect"] = 0;
			$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

		$fdata["sortValueType"] = 0;
		$fdata["numberOfVisibleItems"] = 10;

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatacollection["pay_date"] = $fdata;
		$tdatacollection[".searchableFields"][] = "pay_date";
//	amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "amount";
	$fdata["GoodName"] = "amount";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("collection","amount");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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


	$tdatacollection["amount"] = $fdata;
		$tdatacollection[".searchableFields"][] = "amount";


$tables_data["collection"]=&$tdatacollection;
$field_labels["collection"] = &$fieldLabelscollection;
$fieldToolTips["collection"] = &$fieldToolTipscollection;
$placeHolders["collection"] = &$placeHolderscollection;
$page_titles["collection"] = &$pageTitlescollection;

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

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



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

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collection"][0] = $masterParams;
				$masterTablesData["collection"][0]["masterKeys"] = array();
	$masterTablesData["collection"][0]["masterKeys"][]="loan_id";
				$masterTablesData["collection"][0]["detailKeys"] = array();
	$masterTablesData["collection"][0]["detailKeys"][]="loan_id";
		
	
				$strOriginalDetailsTable="collections";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="collections_collecters";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "collections_collecters";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collection"][1] = $masterParams;
				$masterTablesData["collection"][1]["masterKeys"] = array();
	$masterTablesData["collection"][1]["masterKeys"][]="loan_id";
				$masterTablesData["collection"][1]["detailKeys"] = array();
	$masterTablesData["collection"][1]["detailKeys"][]="loan_id";
		
// -----------------end  prepare master-details data arrays ------------------------------//


require_once( getabspath( "include/collection_ops.php" ) );



	
		;

				

$tdatacollection[".sqlquery"] = $queryData_collection;



$tableEvents["collection"] = new eventsBase;
$tdatacollection[".hasEvents"] = false;

?>