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


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

//	field labels
$fieldLabelscollections_report = array();
$fieldToolTipscollections_report = array();
$pageTitlescollections_report = array();
$placeHolderscollections_report = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscollections_report["English"] = array();
	$fieldToolTipscollections_report["English"] = array();
	$placeHolderscollections_report["English"] = array();
	$pageTitlescollections_report["English"] = array();
	$fieldLabelscollections_report["English"]["collection_id"] = "Collection Id";
	$fieldToolTipscollections_report["English"]["collection_id"] = "";
	$placeHolderscollections_report["English"]["collection_id"] = "";
	$fieldLabelscollections_report["English"]["loan_id"] = "Loan Id";
	$fieldToolTipscollections_report["English"]["loan_id"] = "";
	$placeHolderscollections_report["English"]["loan_id"] = "";
	$fieldLabelscollections_report["English"]["pay_date"] = "Pay Date";
	$fieldToolTipscollections_report["English"]["pay_date"] = "";
	$placeHolderscollections_report["English"]["pay_date"] = "";
	$fieldLabelscollections_report["English"]["amount"] = "Amount";
	$fieldToolTipscollections_report["English"]["amount"] = "";
	$placeHolderscollections_report["English"]["amount"] = "";
	$fieldLabelscollections_report["English"]["customer_id"] = "Customer Id";
	$fieldToolTipscollections_report["English"]["customer_id"] = "";
	$placeHolderscollections_report["English"]["customer_id"] = "";
	$fieldLabelscollections_report["English"]["details"] = "Details";
	$fieldToolTipscollections_report["English"]["details"] = "";
	$placeHolderscollections_report["English"]["details"] = "";
	$fieldLabelscollections_report["English"]["user"] = "User";
	$fieldToolTipscollections_report["English"]["user"] = "";
	$placeHolderscollections_report["English"]["user"] = "";
	$fieldLabelscollections_report["English"]["creat_at"] = "Creat At";
	$fieldToolTipscollections_report["English"]["creat_at"] = "";
	$placeHolderscollections_report["English"]["creat_at"] = "";
	if (count($fieldToolTipscollections_report["English"]))
		$tdatacollections_report[".isUseToolTips"] = true;
}


	$tdatacollections_report[".NCSearch"] = true;



$tdatacollections_report[".shortTableName"] = "collections_report";
$tdatacollections_report[".nSecOptions"] = 0;

$tdatacollections_report[".mainTableOwnerID"] = "";
$tdatacollections_report[".entityType"] = 2;
$tdatacollections_report[".connId"] = "easy_cash_at_localhost";


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

	



$tdatacollections_report[".showAddInPopup"] = false;

$tdatacollections_report[".showEditInPopup"] = false;

$tdatacollections_report[".showViewInPopup"] = false;

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


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

	$tdatacollections_report[".audit"] = false;

	$tdatacollections_report[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatacollections_report[".isUseAjaxSuggest"] = true;




																								

$tdatacollections_report[".ajaxCodeSnippetAdded"] = false;

$tdatacollections_report[".buttonsAdded"] = false;

$tdatacollections_report[".addPageEvents"] = false;

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


$tdatacollections_report[".badgeColor"] = "4682B4";


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

$tdatacollections_report[".googleLikeFields"] = array();
$tdatacollections_report[".googleLikeFields"][] = "pay_date";
$tdatacollections_report[".googleLikeFields"][] = "user";



$tdatacollections_report[".tableType"] = "report";

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

$tdatacollections_report[".nPrinterSplitRecords"] = 40;

$tdatacollections_report[".geocodingEnabled"] = false;

//report settings

$tdatacollections_report[".reportPrintPartitionType"] = 1;
$tdatacollections_report[".reportPrintGroupsPerPage"] = 3;
$tdatacollections_report[".lowGroup"] = 2;



$tdatacollections_report[".reportGroupFields"] = true;
$tdatacollections_report[".pageSize"] = 5;
$tdatacollections_report[".showGroupSummaryCount"] = true;
$reportGroupFieldsList = array();
$reportGroupFields = array();
	$reportGroupFieldsList []= "pay_date";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "pay_date";
	$rgroupField['groupInterval'] = 5;
	$rgroupField['groupOrder'] = 1;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
	$reportGroupFieldsList []= "user";

	$rgroupField = array();
	$rgroupField['strGroupField'] = "user";
	$rgroupField['groupInterval'] = 0;
	$rgroupField['groupOrder'] = 2;
	$rgroupField['showGroupSummary'] = "1";
	$rgroupField['crossTabAxis'] = "0";
	$reportGroupFields[] = $rgroupField;
$tdatacollections_report[".reportGroupFieldsData"] = $reportGroupFields;
$tdatacollections_report[".reportGroupFieldsList"] = $reportGroupFieldsList;


$tdatacollections_report[".isExistTotalFields"] = true;


$tdatacollections_report[".reportPageSummary"] = true;


$tdatacollections_report[".repShowDet"] = true;

$tdatacollections_report[".reportLayout"] = 0;

//end of report settings










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

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


$tdatacollections_report[".sqlHead"] = "SELECT collection_id,  loan_id,  DATE(pay_date) AS pay_date,  amount,  customer_id,  details,  `user`,  creat_at";
$tdatacollections_report[".sqlFrom"] = "FROM collections";
$tdatacollections_report[".sqlWhereExpr"] = "";
$tdatacollections_report[".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;
$tdatacollections_report[".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_report[".arrGroupsPerPage"] = $arrGPP;

$tdatacollections_report[".highlightSearchResults"] = true;

$tableKeyscollections_report = array();
$tableKeyscollections_report[] = "loan_id";
$tdatacollections_report[".Keys"] = $tableKeyscollections_report;


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

		// report field settings
					// end of report field settings

		$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"]["report"] = $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"]["search"] = $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_report["collection_id"] = $fdata;
		$tdatacollections_report[".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_Report","loan_id");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $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_report["loan_id"] = $fdata;
		$tdatacollections_report[".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("collections_Report","pay_date");
	$fdata["FieldType"] = 7;

		// report field settings
					// end of report field settings

	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "DATE(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"]["report"] = $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"]["search"] = $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["filterTotalFields"] = "collection_id";
		$fdata["filterFormat"] = "Interval slider";
		$fdata["showCollapsed"] = false;

	
	
	
	

	$fdata["filterKnobsType"] = 0;
		$fdata["filterSliderStepType"] = 3;
	$fdata["filterSliderStepValue"] = 1;
//end of Filters settings


	$tdatacollections_report["pay_date"] = $fdata;
		$tdatacollections_report[".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_Report","amount");
	$fdata["FieldType"] = 14;

		// report field settings
					$fdata["isTotalSum"] = true;
	// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $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_report["amount"] = $fdata;
		$tdatacollections_report[".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_Report","customer_id");
	$fdata["FieldType"] = 3;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $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_report["customer_id"] = $fdata;
		$tdatacollections_report[".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_Report","details");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $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_report["details"] = $fdata;
		$tdatacollections_report[".searchableFields"][] = "details";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "collections";
	$fdata["Label"] = GetFieldLabel("collections_Report","user");
	$fdata["FieldType"] = 200;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $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_report["user"] = $fdata;
		$tdatacollections_report[".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("collections_Report","creat_at");
	$fdata["FieldType"] = 135;

		// report field settings
					// end of report field settings

	
	
			

		$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"]["report"] = $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"]["search"] = $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_report["creat_at"] = $fdata;
		$tdatacollections_report[".searchableFields"][] = "creat_at";


$tables_data["collections Report"]=&$tdatacollections_report;
$field_labels["collections_Report"] = &$fieldLabelscollections_report;
$fieldToolTips["collections_Report"] = &$fieldToolTipscollections_report;
$placeHolders["collections_Report"] = &$placeHolderscollections_report;
$page_titles["collections_Report"] = &$pageTitlescollections_report;

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

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



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



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











function createSqlQuery_collections_report()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "collection_id,  loan_id,  DATE(pay_date) AS pay_date,  amount,  customer_id,  details,  `user`,  creat_at";
$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 Report"
));

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

$proto8["m_sql"] = "loan_id";
$proto8["m_srcTableName"] = "collections Report";
$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" => "pay_date"
));

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

$proto10["m_sql"] = "DATE(pay_date)";
$proto10["m_srcTableName"] = "collections Report";
$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" => "collections Report"
));

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

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

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

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

$proto17["m_sql"] = "details";
$proto17["m_srcTableName"] = "collections Report";
$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" => "collections Report"
));

$proto19["m_sql"] = "`user`";
$proto19["m_srcTableName"] = "collections Report";
$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" => "collections Report"
));

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

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

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

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

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

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

	return $obj;
}
$queryData_collections_report = createSqlQuery_collections_report();


	
		;

								

$tdatacollections_report[".sqlquery"] = $queryData_collections_report;



$tableEvents["collections Report"] = new eventsBase;
$tdatacollections_report[".hasEvents"] = false;

?>