<?php
$tdataresultant_account = array();
$tdataresultant_account[".searchableFields"] = array();
$tdataresultant_account[".ShortName"] = "resultant_account";
$tdataresultant_account[".OwnerID"] = "";
$tdataresultant_account[".OriginalTable"] = "bank_activity";


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

//	field labels
$fieldLabelsresultant_account = array();
$fieldToolTipsresultant_account = array();
$pageTitlesresultant_account = array();
$placeHoldersresultant_account = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsresultant_account["English"] = array();
	$fieldToolTipsresultant_account["English"] = array();
	$placeHoldersresultant_account["English"] = array();
	$pageTitlesresultant_account["English"] = array();
	$fieldLabelsresultant_account["English"]["id"] = "Id";
	$fieldToolTipsresultant_account["English"]["id"] = "";
	$placeHoldersresultant_account["English"]["id"] = "";
	$fieldLabelsresultant_account["English"]["activity"] = "Activity";
	$fieldToolTipsresultant_account["English"]["activity"] = "";
	$placeHoldersresultant_account["English"]["activity"] = "";
	$fieldLabelsresultant_account["English"]["amount"] = "Amount";
	$fieldToolTipsresultant_account["English"]["amount"] = "";
	$placeHoldersresultant_account["English"]["amount"] = "";
	$fieldLabelsresultant_account["English"]["officer"] = "Officer";
	$fieldToolTipsresultant_account["English"]["officer"] = "";
	$placeHoldersresultant_account["English"]["officer"] = "";
	$fieldLabelsresultant_account["English"]["date"] = "Date";
	$fieldToolTipsresultant_account["English"]["date"] = "";
	$placeHoldersresultant_account["English"]["date"] = "";
	$fieldLabelsresultant_account["English"]["image"] = "Image";
	$fieldToolTipsresultant_account["English"]["image"] = "";
	$placeHoldersresultant_account["English"]["image"] = "";
	$fieldLabelsresultant_account["English"]["Account"] = "Account";
	$fieldToolTipsresultant_account["English"]["Account"] = "";
	$placeHoldersresultant_account["English"]["Account"] = "";
	$fieldLabelsresultant_account["English"]["Deposit"] = "Deposit";
	$fieldToolTipsresultant_account["English"]["Deposit"] = "";
	$placeHoldersresultant_account["English"]["Deposit"] = "";
	$fieldLabelsresultant_account["English"]["Withdraw"] = "Withdraw";
	$fieldToolTipsresultant_account["English"]["Withdraw"] = "";
	$placeHoldersresultant_account["English"]["Withdraw"] = "";
	$fieldLabelsresultant_account["English"]["End_of_day"] = "End of day";
	$fieldToolTipsresultant_account["English"]["End_of_day"] = "";
	$placeHoldersresultant_account["English"]["End_of_day"] = "";
	$fieldLabelsresultant_account["English"]["particular"] = "Particular";
	$fieldToolTipsresultant_account["English"]["particular"] = "";
	$placeHoldersresultant_account["English"]["particular"] = "";
	if (count($fieldToolTipsresultant_account["English"]))
		$tdataresultant_account[".isUseToolTips"] = true;
}


	$tdataresultant_account[".NCSearch"] = true;



$tdataresultant_account[".shortTableName"] = "resultant_account";
$tdataresultant_account[".nSecOptions"] = 0;

$tdataresultant_account[".mainTableOwnerID"] = "";
$tdataresultant_account[".entityType"] = 1;
$tdataresultant_account[".connId"] = "test2_at_localhost";


$tdataresultant_account[".strOriginalTableName"] = "bank_activity";

	



$tdataresultant_account[".showAddInPopup"] = false;

$tdataresultant_account[".showEditInPopup"] = false;

$tdataresultant_account[".showViewInPopup"] = false;

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


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

	$tdataresultant_account[".audit"] = true;

	$tdataresultant_account[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataresultant_account[".isUseAjaxSuggest"] = true;

$tdataresultant_account[".rowHighlite"] = true;



																																																			

$tdataresultant_account[".ajaxCodeSnippetAdded"] = false;

$tdataresultant_account[".buttonsAdded"] = false;

$tdataresultant_account[".addPageEvents"] = false;

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


$tdataresultant_account[".badgeColor"] = "00C2C5";


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

$tdataresultant_account[".googleLikeFields"] = array();
$tdataresultant_account[".googleLikeFields"][] = "particular";
$tdataresultant_account[".googleLikeFields"][] = "date";
$tdataresultant_account[".googleLikeFields"][] = "Deposit";
$tdataresultant_account[".googleLikeFields"][] = "Withdraw";
$tdataresultant_account[".googleLikeFields"][] = "officer";
$tdataresultant_account[".googleLikeFields"][] = "image";



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

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

$tdataresultant_account[".nPrinterSplitRecords"] = 40;

$tdataresultant_account[".geocodingEnabled"] = false;










$tdataresultant_account[".pageSize"] = 20;

$tdataresultant_account[".warnLeavingPages"] = true;



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

$tdataresultant_account[".orderindexes"] = array();
	$tdataresultant_account[".orderindexes"][] = array(6, (1 ? "ASC" : "DESC"), "`date`");



$tdataresultant_account[".sqlHead"] = "SELECT `id`, `account_number` as \"Account\", `activity`, `amount`, `particular`, `date`,  case when `amount` > 0 then `amount` end as \"Deposit\",   case when `amount` < 0 then ABS(Amount) end as \"Withdraw\",   (select SUM(`amount`) from bank_activity where (bank_activity.`date`<= kkk.`date`  )) AS \"End of day\", `officer`,  `image`";
$tdataresultant_account[".sqlFrom"] = "from bank_activity as kkk";
$tdataresultant_account[".sqlWhereExpr"] = "1";
$tdataresultant_account[".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;
$tdataresultant_account[".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;
$tdataresultant_account[".arrGroupsPerPage"] = $arrGPP;

$tdataresultant_account[".highlightSearchResults"] = true;

$tableKeysresultant_account = array();
$tableKeysresultant_account[] = "id";
$tdataresultant_account[".Keys"] = $tableKeysresultant_account;


$tdataresultant_account[".hideMobileList"] = array();
		$tdataresultant_account[".hideMobileList"][1] = array();
$tdataresultant_account[".hideMobileList"][1]["activity"] = true;
		$tdataresultant_account[".hideMobileList"][1]["amount"] = true;
		$tdataresultant_account[".hideMobileList"][1]["officer"] = true;
		$tdataresultant_account[".hideMobileList"][1]["image"] = true;
		$tdataresultant_account[".hideMobileList"][5] = array();
$tdataresultant_account[".hideMobileList"][5]["id"] = true;
		$tdataresultant_account[".hideMobileList"][5]["activity"] = true;
		$tdataresultant_account[".hideMobileList"][5]["amount"] = true;
		$tdataresultant_account[".hideMobileList"][5]["officer"] = true;
		$tdataresultant_account[".hideMobileList"][5]["image"] = true;




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

	
		$fdata["AutoInc"] = true;

	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

		$edata["EditParams"] = "";
		
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataresultant_account["id"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "id";
//	Account
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "Account";
	$fdata["GoodName"] = "Account";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","Account");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "bank_accounts";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "bank";

	

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

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


	
	
	
	
			$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"] = "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"] = 1;
		$fdata["filterTotalFields"] = "id";
		$fdata["filterFormat"] = "Values list";
		$fdata["showCollapsed"] = false;

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdataresultant_account["Account"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "Account";
//	activity
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "activity";
	$fdata["GoodName"] = "activity";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","activity");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=50";

		$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


	$tdataresultant_account["activity"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "activity";
//	amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "amount";
	$fdata["GoodName"] = "amount";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","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["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");
							
	
	//	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


	$tdataresultant_account["amount"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "amount";
//	particular
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "particular";
	$fdata["GoodName"] = "particular";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","particular");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=100";

		$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


	$tdataresultant_account["particular"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "particular";
//	date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "date";
	$fdata["GoodName"] = "date";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","date");
	$fdata["FieldType"] = 135;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



	
	
	
	
			$edata["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["filterTotalFields"] = "id";
		$fdata["filterFormat"] = "Interval slider";
		$fdata["showCollapsed"] = false;

	
	
	
	

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


	$tdataresultant_account["date"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "date";
//	Deposit
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "Deposit";
	$fdata["GoodName"] = "Deposit";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","Deposit");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "case when `amount` > 0 then `amount` end";

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


	$tdataresultant_account["Deposit"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "Deposit";
//	Withdraw
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "Withdraw";
	$fdata["GoodName"] = "Withdraw";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","Withdraw");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "case when `amount` < 0 then ABS(Amount) end";

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


	$tdataresultant_account["Withdraw"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "Withdraw";
//	End of day
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "End of day";
	$fdata["GoodName"] = "End_of_day";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","End_of_day");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "End of day";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "(select SUM(`amount`) from bank_activity where (bank_activity.`date`<= kkk.`date`  ))";

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


	$tdataresultant_account["End of day"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "End of day";
//	officer
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "officer";
	$fdata["GoodName"] = "officer";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","officer");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=50";

		$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


	$tdataresultant_account["officer"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "officer";
//	image
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "image";
	$fdata["GoodName"] = "image";
	$fdata["ownerTable"] = "bank_activity";
	$fdata["Label"] = GetFieldLabel("Resultant_Account","image");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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["EditParams"].= " maxlength=5000";

		$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


	$tdataresultant_account["image"] = $fdata;
		$tdataresultant_account[".searchableFields"][] = "image";


$tables_data["Resultant Account"]=&$tdataresultant_account;
$field_labels["Resultant_Account"] = &$fieldLabelsresultant_account;
$fieldToolTips["Resultant_Account"] = &$fieldToolTipsresultant_account;
$placeHolders["Resultant_Account"] = &$placeHoldersresultant_account;
$page_titles["Resultant_Account"] = &$pageTitlesresultant_account;

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

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



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



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











function createSqlQuery_resultant_account()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "`id`, `account_number` as \"Account\", `activity`, `amount`, `particular`, `date`,  case when `amount` > 0 then `amount` end as \"Deposit\",   case when `amount` < 0 then ABS(Amount) end as \"Withdraw\",   (select SUM(`amount`) from bank_activity where (bank_activity.`date`<= kkk.`date`  )) AS \"End of day\", `officer`,  `image`";
$proto0["m_strFrom"] = "from bank_activity as kkk";
$proto0["m_strWhere"] = "1";
$proto0["m_strOrderBy"] = "order by `date` ASC";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "1";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLNonParsed(array(
	"m_sql" => "1"
));

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

$proto0["m_where"] = $obj;
$proto4=array();
$proto4["m_sql"] = "";
$proto4["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto6=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto6["m_sql"] = "`id`";
$proto6["m_srcTableName"] = "Resultant Account";
$proto6["m_expr"]=$obj;
$proto6["m_alias"] = "";
$obj = new SQLFieldListItem($proto6);

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$obj = new SQLField(array(
	"m_strName" => "account_number",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto8["m_sql"] = "`account_number`";
$proto8["m_srcTableName"] = "Resultant Account";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "Account";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto10=array();
			$obj = new SQLField(array(
	"m_strName" => "activity",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto10["m_sql"] = "`activity`";
$proto10["m_srcTableName"] = "Resultant Account";
$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" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto14=array();
			$obj = new SQLField(array(
	"m_strName" => "particular",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto14["m_sql"] = "`particular`";
$proto14["m_srcTableName"] = "Resultant Account";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

$proto0["m_fieldlist"][]=$obj;
						$proto16=array();
			$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto16["m_sql"] = "`date`";
$proto16["m_srcTableName"] = "Resultant Account";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

$proto0["m_fieldlist"][]=$obj;
						$proto18=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "case when `amount` > 0 then `amount` end"
));

$proto18["m_sql"] = "case when `amount` > 0 then `amount` end";
$proto18["m_srcTableName"] = "Resultant Account";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "Deposit";
$obj = new SQLFieldListItem($proto18);

$proto0["m_fieldlist"][]=$obj;
						$proto20=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "case when `amount` < 0 then ABS(Amount) end"
));

$proto20["m_sql"] = "case when `amount` < 0 then ABS(Amount) end";
$proto20["m_srcTableName"] = "Resultant Account";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "Withdraw";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$proto23=array();
$proto23["m_strHead"] = "select";
$proto23["m_strFieldList"] = "SUM(`amount`)";
$proto23["m_strFrom"] = "from bank_activity";
$proto23["m_strWhere"] = "(bank_activity.`date`<= kkk.`date`  )";
$proto23["m_strOrderBy"] = "";
	
		;
			$proto23["cipherer"] = null;
$proto25=array();
$proto25["m_sql"] = "bank_activity.`date`<= kkk.`date`  ";
$proto25["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "bank_activity",
	"m_srcTableName" => "Resultant Account"
));

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

$proto23["m_where"] = $obj;
$proto27=array();
$proto27["m_sql"] = "";
$proto27["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto23["m_having"] = $obj;
$proto23["m_fieldlist"] = array();
						$proto29=array();
			$proto30=array();
$proto30["m_functiontype"] = "SQLF_SUM";
$proto30["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "amount",
	"m_strTable" => "bank_activity",
	"m_srcTableName" => "Resultant Account"
));

$proto30["m_arguments"][]=$obj;
$proto30["m_strFunctionName"] = "SUM";
$obj = new SQLFunctionCall($proto30);

$proto29["m_sql"] = "SUM(`amount`)";
$proto29["m_srcTableName"] = "Resultant Account";
$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "";
$obj = new SQLFieldListItem($proto29);

$proto23["m_fieldlist"][]=$obj;
$proto23["m_fromlist"] = array();
												$proto32=array();
$proto32["m_link"] = "SQLL_MAIN";
			$proto33=array();
$proto33["m_strName"] = "bank_activity";
$proto33["m_srcTableName"] = "Resultant Account";
$proto33["m_columns"] = array();
$proto33["m_columns"][] = "id";
$proto33["m_columns"][] = "account_number";
$proto33["m_columns"][] = "activity";
$proto33["m_columns"][] = "amount";
$proto33["m_columns"][] = "officer";
$proto33["m_columns"][] = "type";
$proto33["m_columns"][] = "date";
$proto33["m_columns"][] = "image";
$proto33["m_columns"][] = "particular";
$proto33["m_columns"][] = "outlet_code";
$obj = new SQLTable($proto33);

$proto32["m_table"] = $obj;
$proto32["m_sql"] = "bank_activity";
$proto32["m_alias"] = "";
$proto32["m_srcTableName"] = "Resultant Account";
$proto34=array();
$proto34["m_sql"] = "";
$proto34["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto23["m_fromlist"][]=$obj;
$proto23["m_groupby"] = array();
$proto23["m_orderby"] = array();
$proto23["m_srcTableName"]="Resultant Account";		
$obj = new SQLQuery($proto23);

$proto22["m_sql"] = "(select SUM(`amount`) from bank_activity where (bank_activity.`date`<= kkk.`date`  ))";
$proto22["m_srcTableName"] = "Resultant Account";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "End of day";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto36=array();
			$obj = new SQLField(array(
	"m_strName" => "officer",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto36["m_sql"] = "`officer`";
$proto36["m_srcTableName"] = "Resultant Account";
$proto36["m_expr"]=$obj;
$proto36["m_alias"] = "";
$obj = new SQLFieldListItem($proto36);

$proto0["m_fieldlist"][]=$obj;
						$proto38=array();
			$obj = new SQLField(array(
	"m_strName" => "image",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

$proto38["m_sql"] = "`image`";
$proto38["m_srcTableName"] = "Resultant Account";
$proto38["m_expr"]=$obj;
$proto38["m_alias"] = "";
$obj = new SQLFieldListItem($proto38);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto40=array();
$proto40["m_link"] = "SQLL_MAIN";
			$proto41=array();
$proto41["m_strName"] = "bank_activity";
$proto41["m_srcTableName"] = "Resultant Account";
$proto41["m_columns"] = array();
$proto41["m_columns"][] = "id";
$proto41["m_columns"][] = "account_number";
$proto41["m_columns"][] = "activity";
$proto41["m_columns"][] = "amount";
$proto41["m_columns"][] = "officer";
$proto41["m_columns"][] = "type";
$proto41["m_columns"][] = "date";
$proto41["m_columns"][] = "image";
$proto41["m_columns"][] = "particular";
$proto41["m_columns"][] = "outlet_code";
$obj = new SQLTable($proto41);

$proto40["m_table"] = $obj;
$proto40["m_sql"] = "bank_activity as kkk";
$proto40["m_alias"] = "kkk";
$proto40["m_srcTableName"] = "Resultant Account";
$proto42=array();
$proto42["m_sql"] = "";
$proto42["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
$proto0["m_groupby"] = array();
$proto0["m_orderby"] = array();
												$proto44=array();
						$obj = new SQLField(array(
	"m_strName" => "date",
	"m_strTable" => "kkk",
	"m_srcTableName" => "Resultant Account"
));

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

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

	return $obj;
}
$queryData_resultant_account = createSqlQuery_resultant_account();


	
		;

											

$tdataresultant_account[".sqlquery"] = $queryData_resultant_account;



$tableEvents["Resultant Account"] = new eventsBase;
$tdataresultant_account[".hasEvents"] = false;

?>