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


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

//	field labels
$fieldLabelsmo_details = array();
$fieldToolTipsmo_details = array();
$pageTitlesmo_details = array();
$placeHoldersmo_details = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsmo_details["English"] = array();
	$fieldToolTipsmo_details["English"] = array();
	$placeHoldersmo_details["English"] = array();
	$pageTitlesmo_details["English"] = array();
	$fieldLabelsmo_details["English"]["id"] = "Id";
	$fieldToolTipsmo_details["English"]["id"] = "";
	$placeHoldersmo_details["English"]["id"] = "";
	$fieldLabelsmo_details["English"]["mid"] = "Mid";
	$fieldToolTipsmo_details["English"]["mid"] = "";
	$placeHoldersmo_details["English"]["mid"] = "";
	$fieldLabelsmo_details["English"]["product_code"] = "Product";
	$fieldToolTipsmo_details["English"]["product_code"] = "";
	$placeHoldersmo_details["English"]["product_code"] = "";
	$fieldLabelsmo_details["English"]["product_type"] = "Product Type";
	$fieldToolTipsmo_details["English"]["product_type"] = "";
	$placeHoldersmo_details["English"]["product_type"] = "";
	$fieldLabelsmo_details["English"]["unit_cost"] = "Unit Cost";
	$fieldToolTipsmo_details["English"]["unit_cost"] = "";
	$placeHoldersmo_details["English"]["unit_cost"] = "";
	$fieldLabelsmo_details["English"]["quantity"] = "Quantity";
	$fieldToolTipsmo_details["English"]["quantity"] = "";
	$placeHoldersmo_details["English"]["quantity"] = "";
	$fieldLabelsmo_details["English"]["related_person"] = "Related Person";
	$fieldToolTipsmo_details["English"]["related_person"] = "";
	$placeHoldersmo_details["English"]["related_person"] = "";
	$fieldLabelsmo_details["English"]["payment_status"] = "Payment Status";
	$fieldToolTipsmo_details["English"]["payment_status"] = "";
	$placeHoldersmo_details["English"]["payment_status"] = "";
	$fieldLabelsmo_details["English"]["Sub_Total"] = "Sub Total";
	$fieldToolTipsmo_details["English"]["Sub_Total"] = "";
	$placeHoldersmo_details["English"]["Sub_Total"] = "";
	if (count($fieldToolTipsmo_details["English"]))
		$tdatamo_details[".isUseToolTips"] = true;
}


	$tdatamo_details[".NCSearch"] = true;



$tdatamo_details[".shortTableName"] = "mo_details";
$tdatamo_details[".nSecOptions"] = 0;

$tdatamo_details[".mainTableOwnerID"] = "";
$tdatamo_details[".entityType"] = 0;
$tdatamo_details[".connId"] = "new_lakmini_at_localhost";


$tdatamo_details[".strOriginalTableName"] = "mo_details";

	



$tdatamo_details[".showAddInPopup"] = false;

$tdatamo_details[".showEditInPopup"] = false;

$tdatamo_details[".showViewInPopup"] = false;

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


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

	$tdatamo_details[".audit"] = false;

	$tdatamo_details[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatamo_details[".isUseAjaxSuggest"] = true;

$tdatamo_details[".rowHighlite"] = true;



						

$tdatamo_details[".ajaxCodeSnippetAdded"] = false;

$tdatamo_details[".buttonsAdded"] = false;

$tdatamo_details[".addPageEvents"] = false;

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


$tdatamo_details[".badgeColor"] = "8fbc8b";


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

$tdatamo_details[".googleLikeFields"] = array();
$tdatamo_details[".googleLikeFields"][] = "id";
$tdatamo_details[".googleLikeFields"][] = "mid";
$tdatamo_details[".googleLikeFields"][] = "product_code";
$tdatamo_details[".googleLikeFields"][] = "product_type";
$tdatamo_details[".googleLikeFields"][] = "unit_cost";
$tdatamo_details[".googleLikeFields"][] = "quantity";
$tdatamo_details[".googleLikeFields"][] = "related_person";
$tdatamo_details[".googleLikeFields"][] = "payment_status";
$tdatamo_details[".googleLikeFields"][] = "Sub Total";



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

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

$tdatamo_details[".nPrinterSplitRecords"] = 40;

$tdatamo_details[".geocodingEnabled"] = false;










$tdatamo_details[".pageSize"] = 20;

$tdatamo_details[".warnLeavingPages"] = true;



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

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


$tdatamo_details[".sqlHead"] = "SELECT id,  	mid,  	product_code,  	product_type,  	unit_cost,  	quantity,  	related_person,  	payment_status,   unit_cost * quantity AS \"Sub Total\"";
$tdatamo_details[".sqlFrom"] = "FROM mo_details";
$tdatamo_details[".sqlWhereExpr"] = "";
$tdatamo_details[".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;
$tdatamo_details[".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;
$tdatamo_details[".arrGroupsPerPage"] = $arrGPP;

$tdatamo_details[".highlightSearchResults"] = true;

$tableKeysmo_details = array();
$tableKeysmo_details[] = "id";
$tdatamo_details[".Keys"] = $tableKeysmo_details;


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




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


	$tdatamo_details["id"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "id";
//	mid
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "mid";
	$fdata["GoodName"] = "mid";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","mid");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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"] = "mo_master";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
		
	$edata["LinkField"] = "id";
	$edata["LinkFieldType"] = 3;
	$edata["DisplayField"] = "product_code";

	

	
	$edata["LookupOrderBy"] = "";

	
	
	
	

	
	
		$edata["SelectSize"] = 1;

// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




// the field's search options settings
		$fdata["defaultSearchOption"] = "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


	$tdatamo_details["mid"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "mid";
//	product_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "product_code";
	$fdata["GoodName"] = "product_code";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","product_code");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "product_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" => "Lookup wizard");

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "products";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"product_type", 'lookupF'=>"product_type");
	$edata["autoCompleteFields"][] = array('masterF'=>"unit_cost", 'lookupF'=>"last_selling_price");
	$edata["LCType"] = 1;

	
		
	$edata["LinkField"] = "product_code";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "product_name";

	

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

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

	
	
	
// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatamo_details["product_code"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "product_code";
//	product_type
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "product_type";
	$fdata["GoodName"] = "product_type";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","product_type");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatamo_details["product_type"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "product_type";
//	unit_cost
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "unit_cost";
	$fdata["GoodName"] = "unit_cost";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","unit_cost");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatamo_details["unit_cost"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "unit_cost";
//	quantity
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "quantity";
	$fdata["GoodName"] = "quantity";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","quantity");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatamo_details["quantity"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "quantity";
//	related_person
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "related_person";
	$fdata["GoodName"] = "related_person";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","related_person");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

	
	
				$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"] = "employers";
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

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

	

	
	$edata["LookupOrderBy"] = "";

	
	
		$edata["AllowToAdd"] = true;
			$edata["addPageId"] = "add";

	

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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatamo_details["related_person"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "related_person";
//	payment_status
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "payment_status";
	$fdata["GoodName"] = "payment_status";
	$fdata["ownerTable"] = "mo_details";
	$fdata["Label"] = GetFieldLabel("mo_details","payment_status");
	$fdata["FieldType"] = 129;

	
	
	
			

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

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

	
	
				$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"] = 0;
			$edata["autoCompleteFieldsOnEdit"] = 0;
	$edata["autoCompleteFields"] = array();
		$edata["LCType"] = 0;

	
	
		$edata["LookupValues"] = array();
	$edata["LookupValues"][] = "paid";
	$edata["LookupValues"][] = "pending";

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


	$tdatamo_details["payment_status"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "payment_status";
//	Sub Total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "Sub Total";
	$fdata["GoodName"] = "Sub_Total";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("mo_details","Sub_Total");
	$fdata["FieldType"] = 14;

	
	
	
			

		$fdata["strField"] = "Sub Total";

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "unit_cost * quantity";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 0;

	
	
	
	
		
	
		$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


	$tdatamo_details["Sub Total"] = $fdata;
		$tdatamo_details[".searchableFields"][] = "Sub Total";


$tables_data["mo_details"]=&$tdatamo_details;
$field_labels["mo_details"] = &$fieldLabelsmo_details;
$fieldToolTips["mo_details"] = &$fieldToolTipsmo_details;
$placeHolders["mo_details"] = &$placeHoldersmo_details;
$page_titles["mo_details"] = &$pageTitlesmo_details;

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

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



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

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



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











function createSqlQuery_mo_details()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	mid,  	product_code,  	product_type,  	unit_cost,  	quantity,  	related_person,  	payment_status,   unit_cost * quantity AS \"Sub Total\"";
$proto0["m_strFrom"] = "FROM mo_details";
$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" => "mo_details",
	"m_srcTableName" => "mo_details"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$proto20["m_sql"] = "payment_status";
$proto20["m_srcTableName"] = "mo_details";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

$proto0["m_fieldlist"][]=$obj;
						$proto22=array();
			$obj = new SQLNonParsed(array(
	"m_sql" => "unit_cost * quantity"
));

$proto22["m_sql"] = "unit_cost * quantity";
$proto22["m_srcTableName"] = "mo_details";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "Sub Total";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto24=array();
$proto24["m_link"] = "SQLL_MAIN";
			$proto25=array();
$proto25["m_strName"] = "mo_details";
$proto25["m_srcTableName"] = "mo_details";
$proto25["m_columns"] = array();
$proto25["m_columns"][] = "id";
$proto25["m_columns"][] = "mid";
$proto25["m_columns"][] = "product_code";
$proto25["m_columns"][] = "product_type";
$proto25["m_columns"][] = "unit_cost";
$proto25["m_columns"][] = "quantity";
$proto25["m_columns"][] = "related_person";
$proto25["m_columns"][] = "payment_status";
$proto25["m_columns"][] = "tbid";
$obj = new SQLTable($proto25);

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

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

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

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

	return $obj;
}
$queryData_mo_details = createSqlQuery_mo_details();


	
		;

									

$tdatamo_details[".sqlquery"] = $queryData_mo_details;



include_once(getabspath("include/mo_details_events.php"));
$tableEvents["mo_details"] = new eventclass_mo_details;
$tdatamo_details[".hasEvents"] = true;

?>