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


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

//	field labels
$fieldLabelsexpens = array();
$fieldToolTipsexpens = array();
$pageTitlesexpens = array();
$placeHoldersexpens = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsexpens["English"] = array();
	$fieldToolTipsexpens["English"] = array();
	$placeHoldersexpens["English"] = array();
	$pageTitlesexpens["English"] = array();
	$fieldLabelsexpens["English"]["id"] = "Id";
	$fieldToolTipsexpens["English"]["id"] = "";
	$placeHoldersexpens["English"]["id"] = "";
	$fieldLabelsexpens["English"]["date_time"] = "Date Time";
	$fieldToolTipsexpens["English"]["date_time"] = "";
	$placeHoldersexpens["English"]["date_time"] = "";
	$fieldLabelsexpens["English"]["amount"] = "Amount";
	$fieldToolTipsexpens["English"]["amount"] = "";
	$placeHoldersexpens["English"]["amount"] = "";
	$fieldLabelsexpens["English"]["branch_code"] = "Branch Code";
	$fieldToolTipsexpens["English"]["branch_code"] = "";
	$placeHoldersexpens["English"]["branch_code"] = "";
	$fieldLabelsexpens["English"]["outlet_code"] = "Outlet Code";
	$fieldToolTipsexpens["English"]["outlet_code"] = "";
	$placeHoldersexpens["English"]["outlet_code"] = "";
	$fieldLabelsexpens["English"]["user"] = "User";
	$fieldToolTipsexpens["English"]["user"] = "";
	$placeHoldersexpens["English"]["user"] = "";
	if (count($fieldToolTipsexpens["English"]))
		$tdataexpens[".isUseToolTips"] = true;
}


	$tdataexpens[".NCSearch"] = true;



$tdataexpens[".shortTableName"] = "expens";
$tdataexpens[".nSecOptions"] = 0;

$tdataexpens[".mainTableOwnerID"] = "";
$tdataexpens[".entityType"] = 0;
$tdataexpens[".connId"] = "test2_at_localhost";


$tdataexpens[".strOriginalTableName"] = "expens";

	



$tdataexpens[".showAddInPopup"] = false;

$tdataexpens[".showEditInPopup"] = false;

$tdataexpens[".showViewInPopup"] = false;

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


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

	$tdataexpens[".audit"] = true;

	$tdataexpens[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdataexpens[".isUseAjaxSuggest"] = true;

$tdataexpens[".rowHighlite"] = true;



																																																			

$tdataexpens[".ajaxCodeSnippetAdded"] = false;

$tdataexpens[".buttonsAdded"] = false;

$tdataexpens[".addPageEvents"] = false;

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


$tdataexpens[".badgeColor"] = "008B8B";


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

$tdataexpens[".googleLikeFields"] = array();
$tdataexpens[".googleLikeFields"][] = "id";
$tdataexpens[".googleLikeFields"][] = "date_time";
$tdataexpens[".googleLikeFields"][] = "amount";
$tdataexpens[".googleLikeFields"][] = "branch_code";
$tdataexpens[".googleLikeFields"][] = "outlet_code";
$tdataexpens[".googleLikeFields"][] = "user";



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

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

$tdataexpens[".nPrinterSplitRecords"] = 40;

$tdataexpens[".geocodingEnabled"] = false;










$tdataexpens[".pageSize"] = 20;

$tdataexpens[".warnLeavingPages"] = true;



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

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


$tdataexpens[".sqlHead"] = "SELECT id,  	date_time,  	amount,  	branch_code,  	outlet_code,  	`user`";
$tdataexpens[".sqlFrom"] = "FROM expens";
$tdataexpens[".sqlWhereExpr"] = "";
$tdataexpens[".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;
$tdataexpens[".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;
$tdataexpens[".arrGroupsPerPage"] = $arrGPP;

$tdataexpens[".highlightSearchResults"] = true;

$tableKeysexpens = array();
$tableKeysexpens[] = "id";
$tdataexpens[".Keys"] = $tableKeysexpens;


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




//	id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 1;
	$fdata["strName"] = "id";
	$fdata["GoodName"] = "id";
	$fdata["ownerTable"] = "expens";
	$fdata["Label"] = GetFieldLabel("expens","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


	$tdataexpens["id"] = $fdata;
		$tdataexpens[".searchableFields"][] = "id";
//	date_time
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "date_time";
	$fdata["GoodName"] = "date_time";
	$fdata["ownerTable"] = "expens";
	$fdata["Label"] = GetFieldLabel("expens","date_time");
	$fdata["FieldType"] = 135;

	
	
	
			

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

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

	
	
				$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" => "Readonly");

	
		$edata["weekdayMessage"] = array("message" => "Invalid week day", "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();
	
		$edata["autoUpdatable"] = true;

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


	$tdataexpens["date_time"] = $fdata;
		$tdataexpens[".searchableFields"][] = "date_time";
//	amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "amount";
	$fdata["GoodName"] = "amount";
	$fdata["ownerTable"] = "expens";
	$fdata["Label"] = GetFieldLabel("expens","amount");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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


	$tdataexpens["amount"] = $fdata;
		$tdataexpens[".searchableFields"][] = "amount";
//	branch_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "branch_code";
	$fdata["GoodName"] = "branch_code";
	$fdata["ownerTable"] = "expens";
	$fdata["Label"] = GetFieldLabel("expens","branch_code");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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();
	
		$edata["autoUpdatable"] = true;

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


	$tdataexpens["branch_code"] = $fdata;
		$tdataexpens[".searchableFields"][] = "branch_code";
//	outlet_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "outlet_code";
	$fdata["GoodName"] = "outlet_code";
	$fdata["ownerTable"] = "expens";
	$fdata["Label"] = GetFieldLabel("expens","outlet_code");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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();
							
		$edata["autoUpdatable"] = true;

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


	$tdataexpens["outlet_code"] = $fdata;
		$tdataexpens[".searchableFields"][] = "outlet_code";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "expens";
	$fdata["Label"] = GetFieldLabel("expens","user");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$tdataexpens["user"] = $fdata;
		$tdataexpens[".searchableFields"][] = "user";


$tables_data["expens"]=&$tdataexpens;
$field_labels["expens"] = &$fieldLabelsexpens;
$fieldToolTips["expens"] = &$fieldToolTipsexpens;
$placeHolders["expens"] = &$placeHoldersexpens;
$page_titles["expens"] = &$pageTitlesexpens;

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

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



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


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

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

	$detailsTablesData["expens"][$dIndex]["masterKeys"][]="id";

	$detailsTablesData["expens"][$dIndex]["masterKeys"][]="outlet_code";

	$detailsTablesData["expens"][$dIndex]["masterKeys"][]="user";

	$detailsTablesData["expens"][$dIndex]["masterKeys"][]="date_time";

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

	$detailsTablesData["expens"][$dIndex]["detailKeys"][]="expens_id";

		
	$detailsTablesData["expens"][$dIndex]["detailKeys"][]="outlet_code";

		
	$detailsTablesData["expens"][$dIndex]["detailKeys"][]="user";

		
	$detailsTablesData["expens"][$dIndex]["detailKeys"][]="date";

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



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



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











function createSqlQuery_expens()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	date_time,  	amount,  	branch_code,  	outlet_code,  	`user`";
$proto0["m_strFrom"] = "FROM expens";
$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" => "id",
	"m_strTable" => "expens",
	"m_srcTableName" => "expens"
));

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

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

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

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

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

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto18=array();
$proto18["m_link"] = "SQLL_MAIN";
			$proto19=array();
$proto19["m_strName"] = "expens";
$proto19["m_srcTableName"] = "expens";
$proto19["m_columns"] = array();
$proto19["m_columns"][] = "id";
$proto19["m_columns"][] = "date_time";
$proto19["m_columns"][] = "amount";
$proto19["m_columns"][] = "branch_code";
$proto19["m_columns"][] = "outlet_code";
$proto19["m_columns"][] = "user";
$obj = new SQLTable($proto19);

$proto18["m_table"] = $obj;
$proto18["m_sql"] = "expens";
$proto18["m_alias"] = "";
$proto18["m_srcTableName"] = "expens";
$proto20=array();
$proto20["m_sql"] = "";
$proto20["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_expens = createSqlQuery_expens();


	
		;

						

$tdataexpens[".sqlquery"] = $queryData_expens;



$tableEvents["expens"] = new eventsBase;
$tdataexpens[".hasEvents"] = false;

?>