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


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

//	field labels
$fieldLabelscollections1 = array();
$fieldToolTipscollections1 = array();
$pageTitlescollections1 = array();
$placeHolderscollections1 = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscollections1["English"] = array();
	$fieldToolTipscollections1["English"] = array();
	$placeHolderscollections1["English"] = array();
	$pageTitlescollections1["English"] = array();
	$fieldLabelscollections1["English"]["loan_id"] = "Loan Id";
	$fieldToolTipscollections1["English"]["loan_id"] = "";
	$placeHolderscollections1["English"]["loan_id"] = "";
	$fieldLabelscollections1["English"]["details"] = "Details";
	$fieldToolTipscollections1["English"]["details"] = "";
	$placeHolderscollections1["English"]["details"] = "";
	$fieldLabelscollections1["English"]["horno"] = "Horno";
	$fieldToolTipscollections1["English"]["horno"] = "";
	$placeHolderscollections1["English"]["horno"] = "";
	$fieldLabelscollections1["English"]["collection_id"] = "Collection Id";
	$fieldToolTipscollections1["English"]["collection_id"] = "";
	$placeHolderscollections1["English"]["collection_id"] = "";
	$fieldLabelscollections1["English"]["pay_date"] = "Pay Date";
	$fieldToolTipscollections1["English"]["pay_date"] = "";
	$placeHolderscollections1["English"]["pay_date"] = "";
	$fieldLabelscollections1["English"]["amount"] = "Amount";
	$fieldToolTipscollections1["English"]["amount"] = "";
	$placeHolderscollections1["English"]["amount"] = "";
	$fieldLabelscollections1["English"]["user"] = "User";
	$fieldToolTipscollections1["English"]["user"] = "";
	$placeHolderscollections1["English"]["user"] = "";
	$fieldLabelscollections1["English"]["creat_at"] = "Creat At";
	$fieldToolTipscollections1["English"]["creat_at"] = "";
	$placeHolderscollections1["English"]["creat_at"] = "";
	$fieldLabelscollections1["English"]["remaining_balance"] = "Remaining Balance";
	$fieldToolTipscollections1["English"]["remaining_balance"] = "";
	$placeHolderscollections1["English"]["remaining_balance"] = "";
	$fieldLabelscollections1["English"]["full_name"] = "Full Name";
	$fieldToolTipscollections1["English"]["full_name"] = "";
	$placeHolderscollections1["English"]["full_name"] = "";
	if (count($fieldToolTipscollections1["English"]))
		$tdatacollections1[".isUseToolTips"] = true;
}


	$tdatacollections1[".NCSearch"] = true;



$tdatacollections1[".shortTableName"] = "collections1";
$tdatacollections1[".nSecOptions"] = 0;

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


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

	



$tdatacollections1[".showAddInPopup"] = false;

$tdatacollections1[".showEditInPopup"] = false;

$tdatacollections1[".showViewInPopup"] = false;

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


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

	$tdatacollections1[".audit"] = true;

	$tdatacollections1[".locking"] = false;


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

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

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

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



$tdatacollections1[".strSortControlSettingsJSON"] = "[{\"fields\":[{\"desc\":true,\"field\":\"creat_at\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"collection_id\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"loan_id\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"pay_date\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"amount\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"customer_id\"}],\"label\":\"\"},{\"fields\":[{\"desc\":false,\"field\":\"user\"}],\"label\":\"\"}]";




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

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

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

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



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

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

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

$tdatacollections1[".isUseAjaxSuggest"] = true;

$tdatacollections1[".rowHighlite"] = true;



																																																

$tdatacollections1[".ajaxCodeSnippetAdded"] = false;

$tdatacollections1[".buttonsAdded"] = false;

$tdatacollections1[".addPageEvents"] = false;

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


$tdatacollections1[".badgeColor"] = "3cb371";


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

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



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

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

$tdatacollections1[".nPrinterSplitRecords"] = 40;

$tdatacollections1[".geocodingEnabled"] = false;





$tdatacollections1[".isResizeColumns"] = true;





$tdatacollections1[".pageSize"] = 50;

$tdatacollections1[".warnLeavingPages"] = true;



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

$tdatacollections1[".orderindexes"] = array();
	$tdatacollections1[".orderindexes"][] = array(8, (1 ? "ASC" : "DESC"), "collections.creat_at");



$tdatacollections1[".sqlHead"] = "SELECT collections.collection_id,      collections.loan_id,      DATE(collections.pay_date) AS pay_date,      collections.amount,      collections.details,      collections.horno,      collections.`user`,      collections.creat_at,      collections.remaining_balance,      customers.full_name";
$tdatacollections1[".sqlFrom"] = "FROM collections  INNER JOIN loans       ON collections.loan_id = loans.loan_id  INNER JOIN customers       ON loans.customer_id = customers.customer_id";
$tdatacollections1[".sqlWhereExpr"] = "";
$tdatacollections1[".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;
$tdatacollections1[".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;
$tdatacollections1[".arrGroupsPerPage"] = $arrGPP;

$tdatacollections1[".highlightSearchResults"] = true;

$tableKeyscollections1 = array();
$tableKeyscollections1[] = "loan_id";
$tdatacollections1[".Keys"] = $tableKeyscollections1;


$tdatacollections1[".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("collections1","collection_id");
	$fdata["FieldType"] = 3;

	
		$fdata["AutoInc"] = true;

	
			

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

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


	$tdatacollections1["collection_id"] = $fdata;
		$tdatacollections1[".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("collections1","loan_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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


	$tdatacollections1["loan_id"] = $fdata;
		$tdatacollections1[".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("collections1","pay_date");
	$fdata["FieldType"] = 7;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DATE(collections.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


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

	
	
	
			

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

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


	$tdatacollections1["amount"] = $fdata;
		$tdatacollections1[".searchableFields"][] = "amount";
//	details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "details";
	$fdata["GoodName"] = "details";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections1","details");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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


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

	
	
	
			

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

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


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

	
	
	
			

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

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


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

	
	
	
			

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

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


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

	
	
	
			

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

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


	$tdatacollections1["remaining_balance"] = $fdata;
		$tdatacollections1[".searchableFields"][] = "remaining_balance";
//	full_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "full_name";
	$fdata["GoodName"] = "full_name";
	$fdata["ownerTable"] = "customers";
	$fdata["Label"] = GetFieldLabel("collections1","full_name");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "customers.full_name";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Text field");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
			$edata["HTML5InuptType"] = "text";

		$edata["EditParams"] = "";
		
		$edata["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


	$tdatacollections1["full_name"] = $fdata;
		$tdatacollections1[".searchableFields"][] = "full_name";


$tables_data["collections1"]=&$tdatacollections1;
$field_labels["collections1"] = &$fieldLabelscollections1;
$fieldToolTips["collections1"] = &$fieldToolTipscollections1;
$placeHolders["collections1"] = &$placeHolderscollections1;
$page_titles["collections1"] = &$pageTitlescollections1;

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

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



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

	$masterParams["type"] = PAGE_LIST;
					$masterTablesData["collections1"][0] = $masterParams;
				$masterTablesData["collections1"][0]["masterKeys"] = array();
	$masterTablesData["collections1"][0]["masterKeys"][]="txn_date";
				$masterTablesData["collections1"][0]["detailKeys"] = array();
	$masterTablesData["collections1"][0]["detailKeys"][]="pay_date";
		
// -----------------end  prepare master-details data arrays ------------------------------//



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











function createSqlQuery_collections1()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "collections.collection_id,      collections.loan_id,      DATE(collections.pay_date) AS pay_date,      collections.amount,      collections.details,      collections.horno,      collections.`user`,      collections.creat_at,      collections.remaining_balance,      customers.full_name";
$proto0["m_strFrom"] = "FROM collections  INNER JOIN loans       ON collections.loan_id = loans.loan_id  INNER JOIN customers       ON loans.customer_id = customers.customer_id";
$proto0["m_strWhere"] = "";
$proto0["m_strOrderBy"] = "ORDER BY collections.creat_at";
	
		;
			$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" => "collections1"
));

$proto6["m_sql"] = "collections.collection_id";
$proto6["m_srcTableName"] = "collections1";
$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" => "collections1"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$proto11=array();
$proto11["m_functiontype"] = "SQLF_CUSTOM";
$proto11["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "collections.pay_date"
));

$proto11["m_arguments"][]=$obj;
$proto11["m_strFunctionName"] = "DATE";
$obj = new SQLFunctionCall($proto11);

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
						$proto25=array();
			$obj = new SQLField(array(
	"m_strName" => "full_name",
	"m_strTable" => "customers",
	"m_srcTableName" => "collections1"
));

$proto25["m_sql"] = "customers.full_name";
$proto25["m_srcTableName"] = "collections1";
$proto25["m_expr"]=$obj;
$proto25["m_alias"] = "";
$obj = new SQLFieldListItem($proto25);

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

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

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

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

$proto0["m_fromlist"][]=$obj;
												$proto31=array();
$proto31["m_link"] = "SQLL_INNERJOIN";
			$proto32=array();
$proto32["m_strName"] = "loans";
$proto32["m_srcTableName"] = "collections1";
$proto32["m_columns"] = array();
$proto32["m_columns"][] = "loan_id";
$proto32["m_columns"][] = "customer_id";
$proto32["m_columns"][] = "loan_amount";
$proto32["m_columns"][] = "total_payable";
$proto32["m_columns"][] = "profit_amount";
$proto32["m_columns"][] = "payment_interval_days";
$proto32["m_columns"][] = "installment_amount";
$proto32["m_columns"][] = "start_date";
$proto32["m_columns"][] = "end_date";
$proto32["m_columns"][] = "status";
$proto32["m_columns"][] = "created_at";
$proto32["m_columns"][] = "call_record";
$proto32["m_columns"][] = "loan_period";
$proto32["m_columns"][] = "Loan";
$proto32["m_columns"][] = "video";
$proto32["m_columns"][] = "files";
$proto32["m_columns"][] = "image";
$proto32["m_columns"][] = "horno";
$proto32["m_columns"][] = "user";
$proto32["m_columns"][] = "guarantor_1";
$proto32["m_columns"][] = "guarantor_2";
$proto32["m_columns"][] = "Old_Loan";
$proto32["m_columns"][] = "new_loan";
$proto32["m_columns"][] = "route_id";
$proto32["m_columns"][] = "route_order";
$obj = new SQLTable($proto32);

$proto31["m_table"] = $obj;
$proto31["m_sql"] = "INNER JOIN loans       ON collections.loan_id = loans.loan_id";
$proto31["m_alias"] = "";
$proto31["m_srcTableName"] = "collections1";
$proto33=array();
$proto33["m_sql"] = "collections.loan_id = loans.loan_id";
$proto33["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "loan_id",
	"m_strTable" => "collections",
	"m_srcTableName" => "collections1"
));

$proto33["m_column"]=$obj;
$proto33["m_contained"] = array();
$proto33["m_strCase"] = "= loans.loan_id";
$proto33["m_havingmode"] = false;
$proto33["m_inBrackets"] = false;
$proto33["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto33);

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

$proto0["m_fromlist"][]=$obj;
												$proto35=array();
$proto35["m_link"] = "SQLL_INNERJOIN";
			$proto36=array();
$proto36["m_strName"] = "customers";
$proto36["m_srcTableName"] = "collections1";
$proto36["m_columns"] = array();
$proto36["m_columns"][] = "customer_id";
$proto36["m_columns"][] = "full_name";
$proto36["m_columns"][] = "nic";
$proto36["m_columns"][] = "phone";
$proto36["m_columns"][] = "address";
$proto36["m_columns"][] = "photo";
$proto36["m_columns"][] = "created_at";
$proto36["m_columns"][] = "user";
$obj = new SQLTable($proto36);

$proto35["m_table"] = $obj;
$proto35["m_sql"] = "INNER JOIN customers       ON loans.customer_id = customers.customer_id";
$proto35["m_alias"] = "";
$proto35["m_srcTableName"] = "collections1";
$proto37=array();
$proto37["m_sql"] = "loans.customer_id = customers.customer_id";
$proto37["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "customer_id",
	"m_strTable" => "loans",
	"m_srcTableName" => "collections1"
));

$proto37["m_column"]=$obj;
$proto37["m_contained"] = array();
$proto37["m_strCase"] = "= customers.customer_id";
$proto37["m_havingmode"] = false;
$proto37["m_inBrackets"] = false;
$proto37["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto37);

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
												$proto39=array();
						$obj = new SQLField(array(
	"m_strName" => "creat_at",
	"m_strTable" => "collections",
	"m_srcTableName" => "collections1"
));

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

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

	return $obj;
}
$queryData_collections1 = createSqlQuery_collections1();


	
		;

										

$tdatacollections1[".sqlquery"] = $queryData_collections1;



include_once(getabspath("include/collections1_events.php"));
$tableEvents["collections1"] = new eventclass_collections1;
$tdatacollections1[".hasEvents"] = true;

?>