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


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

//	field labels
$fieldLabelscollections = array();
$fieldToolTipscollections = array();
$pageTitlescollections = array();
$placeHolderscollections = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscollections["English"] = array();
	$fieldToolTipscollections["English"] = array();
	$placeHolderscollections["English"] = array();
	$pageTitlescollections["English"] = array();
	$fieldLabelscollections["English"]["loan_id"] = "Loan Id";
	$fieldToolTipscollections["English"]["loan_id"] = "";
	$placeHolderscollections["English"]["loan_id"] = "";
	$fieldLabelscollections["English"]["customer_id"] = "Customer Id";
	$fieldToolTipscollections["English"]["customer_id"] = "";
	$placeHolderscollections["English"]["customer_id"] = "";
	$fieldLabelscollections["English"]["details"] = "Details";
	$fieldToolTipscollections["English"]["details"] = "";
	$placeHolderscollections["English"]["details"] = "";
	$fieldLabelscollections["English"]["horno"] = "Horno";
	$fieldToolTipscollections["English"]["horno"] = "";
	$placeHolderscollections["English"]["horno"] = "";
	$fieldLabelscollections["English"]["collection_id"] = "Collection Id";
	$fieldToolTipscollections["English"]["collection_id"] = "";
	$placeHolderscollections["English"]["collection_id"] = "";
	$fieldLabelscollections["English"]["pay_date"] = "Pay Date";
	$fieldToolTipscollections["English"]["pay_date"] = "";
	$placeHolderscollections["English"]["pay_date"] = "";
	$fieldLabelscollections["English"]["amount"] = "Amount";
	$fieldToolTipscollections["English"]["amount"] = "";
	$placeHolderscollections["English"]["amount"] = "";
	$fieldLabelscollections["English"]["user"] = "User";
	$fieldToolTipscollections["English"]["user"] = "";
	$placeHolderscollections["English"]["user"] = "";
	$fieldLabelscollections["English"]["creat_at"] = "Creat At";
	$fieldToolTipscollections["English"]["creat_at"] = "";
	$placeHolderscollections["English"]["creat_at"] = "";
	$fieldLabelscollections["English"]["remaining_balance"] = "Remaining Balance";
	$fieldToolTipscollections["English"]["remaining_balance"] = "";
	$placeHolderscollections["English"]["remaining_balance"] = "";
	if (count($fieldToolTipscollections["English"]))
		$tdatacollections[".isUseToolTips"] = true;
}


	$tdatacollections[".NCSearch"] = true;



$tdatacollections[".shortTableName"] = "collections";
$tdatacollections[".nSecOptions"] = 0;

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


$tdatacollections[".strOriginalTableName"] = "collections";

	



$tdatacollections[".showAddInPopup"] = false;

$tdatacollections[".showEditInPopup"] = false;

$tdatacollections[".showViewInPopup"] = false;

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


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

	$tdatacollections[".audit"] = true;

	$tdatacollections[".locking"] = false;


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

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

if( $pages[PAGE_ADD] ) {
$tdatacollections[".add"] = true;
$tdatacollections[".afterAddAction"] = 2;
$tdatacollections[".closePopupAfterAdd"] = 0;
$tdatacollections[".afterAddActionDetTable"] = "Detail tables not found!";
}

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



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




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

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

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

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



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

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

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

$tdatacollections[".isUseAjaxSuggest"] = true;

$tdatacollections[".rowHighlite"] = true;



																																																																																																																																																																								

$tdatacollections[".ajaxCodeSnippetAdded"] = false;

$tdatacollections[".buttonsAdded"] = false;

$tdatacollections[".addPageEvents"] = false;

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


$tdatacollections[".badgeColor"] = "e07878";


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

$tdatacollections[".googleLikeFields"] = array();
$tdatacollections[".googleLikeFields"][] = "collection_id";
$tdatacollections[".googleLikeFields"][] = "loan_id";
$tdatacollections[".googleLikeFields"][] = "pay_date";
$tdatacollections[".googleLikeFields"][] = "amount";
$tdatacollections[".googleLikeFields"][] = "customer_id";
$tdatacollections[".googleLikeFields"][] = "details";
$tdatacollections[".googleLikeFields"][] = "horno";
$tdatacollections[".googleLikeFields"][] = "user";
$tdatacollections[".googleLikeFields"][] = "creat_at";
$tdatacollections[".googleLikeFields"][] = "remaining_balance";



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

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

$tdatacollections[".nPrinterSplitRecords"] = 40;

$tdatacollections[".geocodingEnabled"] = false;





$tdatacollections[".isResizeColumns"] = true;





$tdatacollections[".pageSize"] = 20;

$tdatacollections[".warnLeavingPages"] = true;



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

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


$tdatacollections[".sqlHead"] = "SELECT collection_id,  	loan_id,  	pay_date,  	amount,  	customer_id,  	details,  	horno,  	`user`,  	creat_at,  	remaining_balance";
$tdatacollections[".sqlFrom"] = "FROM collections";
$tdatacollections[".sqlWhereExpr"] = "";
$tdatacollections[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatacollections[".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;
$tdatacollections[".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;
$tdatacollections[".arrGroupsPerPage"] = $arrGPP;

$tdatacollections[".highlightSearchResults"] = true;

$tableKeyscollections = array();
$tableKeyscollections[] = "loan_id";
$tdatacollections[".Keys"] = $tableKeyscollections;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

	
		$fdata["isSQLExpression"] = true;
	$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


	$tdatacollections["collection_id"] = $fdata;
		$tdatacollections[".searchableFields"][] = "collection_id";
//	loan_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "loan_id";
	$fdata["GoodName"] = "loan_id";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","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" => "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'=>"collection_id", 'lookupF'=>"customer_id");
	$edata["autoCompleteFields"][] = array('masterF'=>"customer_id", 'lookupF'=>"loan_id");
	$edata["autoCompleteFields"][] = array('masterF'=>"details", 'lookupF'=>"details");
	$edata["autoCompleteFields"][] = array('masterF'=>"horno", 'lookupF'=>"horno");
	$edata["autoCompleteFields"][] = array('masterF'=>"remaining_balance", 'lookupF'=>"remaining_balance");
	$edata["LCType"] = 1;

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

	

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

	
	
	
	

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


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

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$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" => "Invalid week day", "messageType" => "Text");
	$edata["weekdays"] = "[]";


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

	
	
	
		$edata["controlWidth"] = 200;

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

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


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

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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


	$tdatacollections["amount"] = $fdata;
		$tdatacollections[".searchableFields"][] = "amount";
//	customer_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "customer_id";
	$fdata["GoodName"] = "customer_id";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","customer_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$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_id", 'lookupF'=>"loan_id");
	$edata["autoCompleteFields"][] = array('masterF'=>"details", 'lookupF'=>"details");
	$edata["autoCompleteFields"][] = array('masterF'=>"horno", 'lookupF'=>"horno");
	$edata["autoCompleteFields"][] = array('masterF'=>"remaining_balance", 'lookupF'=>"remaining_balance");
	$edata["LCType"] = 1;

	
			$edata["LookupUnique"] = true;

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

	

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

	
	
	
	

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


	$tdatacollections["customer_id"] = $fdata;
		$tdatacollections[".searchableFields"][] = "customer_id";
//	details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "details";
	$fdata["GoodName"] = "details";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","details");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatacollections["details"] = $fdata;
		$tdatacollections[".searchableFields"][] = "details";
//	horno
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "horno";
	$fdata["GoodName"] = "horno";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","horno");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatacollections["horno"] = $fdata;
		$tdatacollections[".searchableFields"][] = "horno";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","user");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatacollections["user"] = $fdata;
		$tdatacollections[".searchableFields"][] = "user";
//	creat_at
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "creat_at";
	$fdata["GoodName"] = "creat_at";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","creat_at");
	$fdata["FieldType"] = 135;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$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["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();
	
	
	//	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


	$tdatacollections["creat_at"] = $fdata;
		$tdatacollections[".searchableFields"][] = "creat_at";
//	remaining_balance
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "remaining_balance";
	$fdata["GoodName"] = "remaining_balance";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections","remaining_balance");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatacollections["remaining_balance"] = $fdata;
		$tdatacollections[".searchableFields"][] = "remaining_balance";


$tables_data["collections"]=&$tdatacollections;
$field_labels["collections"] = &$fieldLabelscollections;
$fieldToolTips["collections"] = &$fieldToolTipscollections;
$placeHolders["collections"] = &$placeHolderscollections;
$page_titles["collections"] = &$pageTitlescollections;

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

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



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


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

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

	$detailsTablesData["collections"][$dIndex]["masterKeys"][]="loan_id";

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

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

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



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

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collections"][0] = $masterParams;
				$masterTablesData["collections"][0]["masterKeys"] = array();
	$masterTablesData["collections"][0]["masterKeys"][]="loan_id";
				$masterTablesData["collections"][0]["detailKeys"] = array();
	$masterTablesData["collections"][0]["detailKeys"][]="loan_id";
		
	
				$strOriginalDetailsTable="Loan Ladger";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Recovered";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "recovered";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collections"][1] = $masterParams;
				$masterTablesData["collections"][1]["masterKeys"] = array();
	$masterTablesData["collections"][1]["masterKeys"][]="loan_id";
				$masterTablesData["collections"][1]["detailKeys"] = array();
	$masterTablesData["collections"][1]["detailKeys"][]="loan_id";
		
	
				$strOriginalDetailsTable="Loan Ladger";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Closed";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "closed";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collections"][2] = $masterParams;
				$masterTablesData["collections"][2]["masterKeys"] = array();
	$masterTablesData["collections"][2]["masterKeys"][]="loan_id";
				$masterTablesData["collections"][2]["detailKeys"] = array();
	$masterTablesData["collections"][2]["detailKeys"][]="loan_id";
		
	
				$strOriginalDetailsTable="Loan Ladger";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Defaulted";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "defaulted";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collections"][3] = $masterParams;
				$masterTablesData["collections"][3]["masterKeys"] = array();
	$masterTablesData["collections"][3]["masterKeys"][]="loan_id";
				$masterTablesData["collections"][3]["detailKeys"] = array();
	$masterTablesData["collections"][3]["detailKeys"][]="loan_id";
		
	
				$strOriginalDetailsTable="Loan Ladger";
	$masterParams = array();
	$masterParams["mDataSourceTable"]="Loan Ladger All";
	$masterParams["mOriginalTable"]= $strOriginalDetailsTable;
	$masterParams["mShortTable"]= "loan_ladger_all";
	$masterParams["masterKeys"]= array();
	$masterParams["detailKeys"]= array();

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

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



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











function createSqlQuery_collections()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "collection_id,  	loan_id,  	pay_date,  	amount,  	customer_id,  	details,  	horno,  	`user`,  	creat_at,  	remaining_balance";
$proto0["m_strFrom"] = "FROM collections";
$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" => "collection_id",
	"m_strTable" => "collections",
	"m_srcTableName" => "collections"
));

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

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

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

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

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

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

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

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

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

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

$proto16["m_sql"] = "details";
$proto16["m_srcTableName"] = "collections";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLField(array(
	"m_strName" => "creat_at",
	"m_strTable" => "collections",
	"m_srcTableName" => "collections"
));

$proto22["m_sql"] = "creat_at";
$proto22["m_srcTableName"] = "collections";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$obj = new SQLField(array(
	"m_strName" => "remaining_balance",
	"m_strTable" => "collections",
	"m_srcTableName" => "collections"
));

$proto24["m_sql"] = "remaining_balance";
$proto24["m_srcTableName"] = "collections";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto26=array();
$proto26["m_link"] = "SQLL_MAIN";
			$proto27=array();
$proto27["m_strName"] = "collections";
$proto27["m_srcTableName"] = "collections";
$proto27["m_columns"] = array();
$proto27["m_columns"][] = "collection_id";
$proto27["m_columns"][] = "loan_id";
$proto27["m_columns"][] = "pay_date";
$proto27["m_columns"][] = "amount";
$proto27["m_columns"][] = "customer_id";
$proto27["m_columns"][] = "details";
$proto27["m_columns"][] = "horno";
$proto27["m_columns"][] = "user";
$proto27["m_columns"][] = "creat_at";
$proto27["m_columns"][] = "remaining_balance";
$obj = new SQLTable($proto27);

$proto26["m_table"] = $obj;
$proto26["m_sql"] = "collections";
$proto26["m_alias"] = "";
$proto26["m_srcTableName"] = "collections";
$proto28=array();
$proto28["m_sql"] = "";
$proto28["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_collections = createSqlQuery_collections();


	
		;

										

$tdatacollections[".sqlquery"] = $queryData_collections;



include_once(getabspath("include/collections_events.php"));
$tableEvents["collections"] = new eventclass_collections;
$tdatacollections[".hasEvents"] = true;

?>