<?php
$tdatasales_details__ = array();
$tdatasales_details__[".searchableFields"] = array();
$tdatasales_details__[".ShortName"] = "sales_details__";
$tdatasales_details__[".OwnerID"] = "";
$tdatasales_details__[".OriginalTable"] = "sales_details";


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

//	field labels
$fieldLabelssales_details__ = array();
$fieldToolTipssales_details__ = array();
$pageTitlessales_details__ = array();
$placeHolderssales_details__ = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelssales_details__["English"] = array();
	$fieldToolTipssales_details__["English"] = array();
	$placeHolderssales_details__["English"] = array();
	$pageTitlessales_details__["English"] = array();
	$fieldLabelssales_details__["English"]["id"] = "Id";
	$fieldToolTipssales_details__["English"]["id"] = "";
	$placeHolderssales_details__["English"]["id"] = "";
	$fieldLabelssales_details__["English"]["bar_code"] = "Bar Code";
	$fieldToolTipssales_details__["English"]["bar_code"] = "";
	$placeHolderssales_details__["English"]["bar_code"] = "";
	$fieldLabelssales_details__["English"]["product"] = "Product";
	$fieldToolTipssales_details__["English"]["product"] = "";
	$placeHolderssales_details__["English"]["product"] = "";
	$fieldLabelssales_details__["English"]["quntity"] = "Quntity";
	$fieldToolTipssales_details__["English"]["quntity"] = "";
	$placeHolderssales_details__["English"]["quntity"] = "";
	$fieldLabelssales_details__["English"]["price"] = "Price";
	$fieldToolTipssales_details__["English"]["price"] = "";
	$placeHolderssales_details__["English"]["price"] = "";
	$fieldLabelssales_details__["English"]["m_id"] = "M Id";
	$fieldToolTipssales_details__["English"]["m_id"] = "";
	$placeHolderssales_details__["English"]["m_id"] = "";
	$fieldLabelssales_details__["English"]["sub_total"] = "Sub Total";
	$fieldToolTipssales_details__["English"]["sub_total"] = "";
	$placeHolderssales_details__["English"]["sub_total"] = "";
	$fieldLabelssales_details__["English"]["user"] = "User";
	$fieldToolTipssales_details__["English"]["user"] = "";
	$placeHolderssales_details__["English"]["user"] = "";
	$fieldLabelssales_details__["English"]["unit"] = "Unit";
	$fieldToolTipssales_details__["English"]["unit"] = "";
	$placeHolderssales_details__["English"]["unit"] = "";
	$fieldLabelssales_details__["English"]["date"] = "Date";
	$fieldToolTipssales_details__["English"]["date"] = "";
	$placeHolderssales_details__["English"]["date"] = "";
	$fieldLabelssales_details__["English"]["date___time"] = "Date & Time";
	$fieldToolTipssales_details__["English"]["date___time"] = "";
	$placeHolderssales_details__["English"]["date___time"] = "";
	$fieldLabelssales_details__["English"]["outlet_code"] = "Outlet Code";
	$fieldToolTipssales_details__["English"]["outlet_code"] = "";
	$placeHolderssales_details__["English"]["outlet_code"] = "";
	$fieldLabelssales_details__["English"]["h"] = "H";
	$fieldToolTipssales_details__["English"]["h"] = "";
	$placeHolderssales_details__["English"]["h"] = "";
	$fieldLabelssales_details__["English"]["f"] = "F";
	$fieldToolTipssales_details__["English"]["f"] = "";
	$placeHolderssales_details__["English"]["f"] = "";
	$fieldLabelssales_details__["English"]["customer_name"] = "Customer Name";
	$fieldToolTipssales_details__["English"]["customer_name"] = "";
	$placeHolderssales_details__["English"]["customer_name"] = "";
	if (count($fieldToolTipssales_details__["English"]))
		$tdatasales_details__[".isUseToolTips"] = true;
}


	$tdatasales_details__[".NCSearch"] = true;



$tdatasales_details__[".shortTableName"] = "sales_details__";
$tdatasales_details__[".nSecOptions"] = 0;

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


$tdatasales_details__[".strOriginalTableName"] = "sales_details";

	



$tdatasales_details__[".showAddInPopup"] = false;

$tdatasales_details__[".showEditInPopup"] = false;

$tdatasales_details__[".showViewInPopup"] = false;

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


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

	$tdatasales_details__[".audit"] = true;

	$tdatasales_details__[".locking"] = false;


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

if( $pages[PAGE_EDIT] ) {
	$tdatasales_details__[".edit"] = true;
	$tdatasales_details__[".afterEditAction"] = 1;
	$tdatasales_details__[".closePopupAfterEdit"] = 1;
	$tdatasales_details__[".afterEditActionDetTable"] = "Detail tables not found!";
}

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

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



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




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

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

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

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



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

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

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

$tdatasales_details__[".isUseAjaxSuggest"] = true;

$tdatasales_details__[".rowHighlite"] = true;



								
																																																																																															

$tdatasales_details__[".ajaxCodeSnippetAdded"] = false;

$tdatasales_details__[".buttonsAdded"] = true;

$tdatasales_details__[".addPageEvents"] = true;

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


$tdatasales_details__[".badgeColor"] = "cd5c5c";


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

$tdatasales_details__[".googleLikeFields"] = array();
$tdatasales_details__[".googleLikeFields"][] = "id";
$tdatasales_details__[".googleLikeFields"][] = "bar_code";
$tdatasales_details__[".googleLikeFields"][] = "product";
$tdatasales_details__[".googleLikeFields"][] = "unit";
$tdatasales_details__[".googleLikeFields"][] = "quntity";
$tdatasales_details__[".googleLikeFields"][] = "price";
$tdatasales_details__[".googleLikeFields"][] = "m_id";
$tdatasales_details__[".googleLikeFields"][] = "sub_total";
$tdatasales_details__[".googleLikeFields"][] = "user";
$tdatasales_details__[".googleLikeFields"][] = "date";
$tdatasales_details__[".googleLikeFields"][] = "date_&_time";
$tdatasales_details__[".googleLikeFields"][] = "outlet_code";
$tdatasales_details__[".googleLikeFields"][] = "h";
$tdatasales_details__[".googleLikeFields"][] = "f";
$tdatasales_details__[".googleLikeFields"][] = "customer_name";



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

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

$tdatasales_details__[".nPrinterSplitRecords"] = 40;

$tdatasales_details__[".geocodingEnabled"] = false;










$tdatasales_details__[".pageSize"] = 500;

$tdatasales_details__[".warnLeavingPages"] = true;



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

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


$tdatasales_details__[".sqlHead"] = "SELECT sales_details.id,  sales_details.bar_code,  sales_details.product,  sales_details.unit,  sales_details.quntity,  sales_details.price,  sales_details.m_id,  sales_details.sub_total,  sales_details.`user`,  date(sales.`date_&_time`) as \"date\",  sales.`date_&_time`,  sales.outlet_code,  sales.h,  sales.f,  sales.customer_name";
$tdatasales_details__[".sqlFrom"] = "FROM sales_details  LEFT OUTER JOIN sales ON sales_details.m_id = sales.id";
$tdatasales_details__[".sqlWhereExpr"] = "(sales_details.sub_total !=\"\")";
$tdatasales_details__[".sqlTail"] = "";

//fill array of tabs for list page
$arrGridTabs = array();
$arrGridTabs[] = array(
	'tabId' => "",
	'name' => "All data",
	'nameType' => 'Text',
	'where' => "",
	'showRowCount' => 0,
	'hideEmpty' => 0,
);
$tdatasales_details__[".arrGridTabs"] = $arrGridTabs;









//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;
$tdatasales_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;
$tdatasales_details__[".arrGroupsPerPage"] = $arrGPP;

$tdatasales_details__[".highlightSearchResults"] = true;

$tableKeyssales_details__ = array();
$tableKeyssales_details__[] = "id";
$tdatasales_details__[".Keys"] = $tableKeyssales_details__;


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




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

	
		$fdata["AutoInc"] = true;

	
			

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

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


	$tdatasales_details__["id"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "id";
//	bar_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "bar_code";
	$fdata["GoodName"] = "bar_code";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","bar_code");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales_details.bar_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"] = "product";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"product", 'lookupF'=>"product_name");
	$edata["autoCompleteFields"][] = array('masterF'=>"unit", 'lookupF'=>"unit");
	$edata["LCType"] = 1;

	
		
	$edata["LinkField"] = "bar_code";
	$edata["LinkFieldType"] = 0;
	$edata["DisplayField"] = "bar_code";

	

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

	
	
		$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


	$tdatasales_details__["bar_code"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "bar_code";
//	product
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "product";
	$fdata["GoodName"] = "product";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","product");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales_details.product";

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


	
		$eventsData = array();
	$eventsData[] = array( "name" => "quntity_event", "type" => "click" );
	$eventsData[] = array( "name" => "quntity_event", "type" => "mouseover" );
	$eventsData[] = array( "name" => "quntity_event", "type" => "blur" );
	$edata["fieldEvents"] = $eventsData;


// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "product";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"bar_code", 'lookupF'=>"bar_code");
	$edata["autoCompleteFields"][] = array('masterF'=>"unit", 'lookupF'=>"unit");
	$edata["LCType"] = 0;

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

	

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

	
	
		$edata["AllowToAdd"] = true;
		
	

	
	
		$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


	$tdatasales_details__["product"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "product";
//	unit
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "unit";
	$fdata["GoodName"] = "unit";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","unit");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales_details.unit";

	
	
				$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


	$tdatasales_details__["unit"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "unit";
//	quntity
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "quntity";
	$fdata["GoodName"] = "quntity";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","quntity");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales_details.quntity";

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


	
		$eventsData = array();
	$eventsData[] = array( "name" => "quntity_event", "type" => "editing" );
	$edata["fieldEvents"] = $eventsData;




	
	
	
	
			$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();
	
		$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


	$tdatasales_details__["quntity"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "quntity";
//	price
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "price";
	$fdata["GoodName"] = "price";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","price");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales_details.price";

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


	
		$eventsData = array();
	$eventsData[] = array( "name" => "quntity_event", "type" => "editing" );
	$edata["fieldEvents"] = $eventsData;




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


	$tdatasales_details__["price"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "price";
//	m_id
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "m_id";
	$fdata["GoodName"] = "m_id";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","m_id");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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


	$tdatasales_details__["m_id"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "m_id";
//	sub_total
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "sub_total";
	$fdata["GoodName"] = "sub_total";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","sub_total");
	$fdata["FieldType"] = 14;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales_details.sub_total";

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasales_details__["sub_total"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "sub_total";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 9;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "sales_details";
	$fdata["Label"] = GetFieldLabel("sales_details__","user");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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


	$tdatasales_details__["user"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "user";
//	date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 10;
	$fdata["strName"] = "date";
	$fdata["GoodName"] = "date";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("sales_details__","date");
	$fdata["FieldType"] = 7;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "date(sales.`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" => "Date");

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
		$edata["DateEditType"] = 13;
	$edata["InitialYearFactor"] = 100;
	$edata["LastYearFactor"] = 10;

	
	
	
		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasales_details__["date"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "date";
//	date_&_time
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 11;
	$fdata["strName"] = "date_&_time";
	$fdata["GoodName"] = "date___time";
	$fdata["ownerTable"] = "sales";
	$fdata["Label"] = GetFieldLabel("sales_details__","date___time");
	$fdata["FieldType"] = 135;

	
	
	
			

		$fdata["strField"] = "date_&_time";

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

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


	
	



		$edata["IsRequired"] = true;

	
	
	
			$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();
						$edata["validateAs"]["basicValidate"][] = "IsRequired";
		
	
	//	End validation

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasales_details__["date_&_time"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "date_&_time";
//	outlet_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 12;
	$fdata["strName"] = "outlet_code";
	$fdata["GoodName"] = "outlet_code";
	$fdata["ownerTable"] = "sales";
	$fdata["Label"] = GetFieldLabel("sales_details__","outlet_code");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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


	$tdatasales_details__["outlet_code"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "outlet_code";
//	h
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 13;
	$fdata["strName"] = "h";
	$fdata["GoodName"] = "h";
	$fdata["ownerTable"] = "sales";
	$fdata["Label"] = GetFieldLabel("sales_details__","h");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales.h";

	
	
				$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


	$tdatasales_details__["h"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "h";
//	f
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 14;
	$fdata["strName"] = "f";
	$fdata["GoodName"] = "f";
	$fdata["ownerTable"] = "sales";
	$fdata["Label"] = GetFieldLabel("sales_details__","f");
	$fdata["FieldType"] = 3;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales.f";

	
	
				$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


	$tdatasales_details__["f"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "f";
//	customer_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 15;
	$fdata["strName"] = "customer_name";
	$fdata["GoodName"] = "customer_name";
	$fdata["ownerTable"] = "sales";
	$fdata["Label"] = GetFieldLabel("sales_details__","customer_name");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "sales.customer_name";

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

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

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

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatasales_details__["customer_name"] = $fdata;
		$tdatasales_details__[".searchableFields"][] = "customer_name";


$tables_data["sales_details.."]=&$tdatasales_details__;
$field_labels["sales_details__"] = &$fieldLabelssales_details__;
$fieldToolTips["sales_details__"] = &$fieldToolTipssales_details__;
$placeHolders["sales_details__"] = &$placeHolderssales_details__;
$page_titles["sales_details__"] = &$pageTitlessales_details__;

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

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



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


		
	$detailsTablesData["sales_details.."][$dIndex] = $detailsParam;

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

	$detailsTablesData["sales_details.."][$dIndex]["masterKeys"][]="m_id";

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

	$detailsTablesData["sales_details.."][$dIndex]["detailKeys"][]="id";

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



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

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



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











function createSqlQuery_sales_details__()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "sales_details.id,  sales_details.bar_code,  sales_details.product,  sales_details.unit,  sales_details.quntity,  sales_details.price,  sales_details.m_id,  sales_details.sub_total,  sales_details.`user`,  date(sales.`date_&_time`) as \"date\",  sales.`date_&_time`,  sales.outlet_code,  sales.h,  sales.f,  sales.customer_name";
$proto0["m_strFrom"] = "FROM sales_details  LEFT OUTER JOIN sales ON sales_details.m_id = sales.id";
$proto0["m_strWhere"] = "(sales_details.sub_total !=\"\")";
$proto0["m_strOrderBy"] = "";
	
		;
			$proto0["cipherer"] = null;
$proto2=array();
$proto2["m_sql"] = "sales_details.sub_total !=\"\"";
$proto2["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "sub_total",
	"m_strTable" => "sales_details",
	"m_srcTableName" => "sales_details.."
));

$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" => "sales_details",
	"m_srcTableName" => "sales_details.."
));

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

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

$proto8["m_sql"] = "sales_details.bar_code";
$proto8["m_srcTableName"] = "sales_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",
	"m_strTable" => "sales_details",
	"m_srcTableName" => "sales_details.."
));

$proto10["m_sql"] = "sales_details.product";
$proto10["m_srcTableName"] = "sales_details..";
$proto10["m_expr"]=$obj;
$proto10["m_alias"] = "";
$obj = new SQLFieldListItem($proto10);

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

$proto12["m_sql"] = "sales_details.unit";
$proto12["m_srcTableName"] = "sales_details..";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

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

$proto14["m_sql"] = "sales_details.quntity";
$proto14["m_srcTableName"] = "sales_details..";
$proto14["m_expr"]=$obj;
$proto14["m_alias"] = "";
$obj = new SQLFieldListItem($proto14);

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

$proto16["m_sql"] = "sales_details.price";
$proto16["m_srcTableName"] = "sales_details..";
$proto16["m_expr"]=$obj;
$proto16["m_alias"] = "";
$obj = new SQLFieldListItem($proto16);

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

$proto18["m_sql"] = "sales_details.m_id";
$proto18["m_srcTableName"] = "sales_details..";
$proto18["m_expr"]=$obj;
$proto18["m_alias"] = "";
$obj = new SQLFieldListItem($proto18);

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

$proto20["m_sql"] = "sales_details.sub_total";
$proto20["m_srcTableName"] = "sales_details..";
$proto20["m_expr"]=$obj;
$proto20["m_alias"] = "";
$obj = new SQLFieldListItem($proto20);

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

$proto22["m_sql"] = "sales_details.`user`";
$proto22["m_srcTableName"] = "sales_details..";
$proto22["m_expr"]=$obj;
$proto22["m_alias"] = "";
$obj = new SQLFieldListItem($proto22);

$proto0["m_fieldlist"][]=$obj;
						$proto24=array();
			$proto25=array();
$proto25["m_functiontype"] = "SQLF_CUSTOM";
$proto25["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "sales.`date_&_time`"
));

$proto25["m_arguments"][]=$obj;
$proto25["m_strFunctionName"] = "date";
$obj = new SQLFunctionCall($proto25);

$proto24["m_sql"] = "date(sales.`date_&_time`)";
$proto24["m_srcTableName"] = "sales_details..";
$proto24["m_expr"]=$obj;
$proto24["m_alias"] = "date";
$obj = new SQLFieldListItem($proto24);

$proto0["m_fieldlist"][]=$obj;
						$proto27=array();
			$obj = new SQLField(array(
	"m_strName" => "date_&_time",
	"m_strTable" => "sales",
	"m_srcTableName" => "sales_details.."
));

$proto27["m_sql"] = "sales.`date_&_time`";
$proto27["m_srcTableName"] = "sales_details..";
$proto27["m_expr"]=$obj;
$proto27["m_alias"] = "";
$obj = new SQLFieldListItem($proto27);

$proto0["m_fieldlist"][]=$obj;
						$proto29=array();
			$obj = new SQLField(array(
	"m_strName" => "outlet_code",
	"m_strTable" => "sales",
	"m_srcTableName" => "sales_details.."
));

$proto29["m_sql"] = "sales.outlet_code";
$proto29["m_srcTableName"] = "sales_details..";
$proto29["m_expr"]=$obj;
$proto29["m_alias"] = "";
$obj = new SQLFieldListItem($proto29);

$proto0["m_fieldlist"][]=$obj;
						$proto31=array();
			$obj = new SQLField(array(
	"m_strName" => "h",
	"m_strTable" => "sales",
	"m_srcTableName" => "sales_details.."
));

$proto31["m_sql"] = "sales.h";
$proto31["m_srcTableName"] = "sales_details..";
$proto31["m_expr"]=$obj;
$proto31["m_alias"] = "";
$obj = new SQLFieldListItem($proto31);

$proto0["m_fieldlist"][]=$obj;
						$proto33=array();
			$obj = new SQLField(array(
	"m_strName" => "f",
	"m_strTable" => "sales",
	"m_srcTableName" => "sales_details.."
));

$proto33["m_sql"] = "sales.f";
$proto33["m_srcTableName"] = "sales_details..";
$proto33["m_expr"]=$obj;
$proto33["m_alias"] = "";
$obj = new SQLFieldListItem($proto33);

$proto0["m_fieldlist"][]=$obj;
						$proto35=array();
			$obj = new SQLField(array(
	"m_strName" => "customer_name",
	"m_strTable" => "sales",
	"m_srcTableName" => "sales_details.."
));

$proto35["m_sql"] = "sales.customer_name";
$proto35["m_srcTableName"] = "sales_details..";
$proto35["m_expr"]=$obj;
$proto35["m_alias"] = "";
$obj = new SQLFieldListItem($proto35);

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto37=array();
$proto37["m_link"] = "SQLL_MAIN";
			$proto38=array();
$proto38["m_strName"] = "sales_details";
$proto38["m_srcTableName"] = "sales_details..";
$proto38["m_columns"] = array();
$proto38["m_columns"][] = "id";
$proto38["m_columns"][] = "bar_code";
$proto38["m_columns"][] = "product";
$proto38["m_columns"][] = "quntity";
$proto38["m_columns"][] = "price";
$proto38["m_columns"][] = "m_id";
$proto38["m_columns"][] = "sub_total";
$proto38["m_columns"][] = "user";
$proto38["m_columns"][] = "discount";
$proto38["m_columns"][] = "tax";
$proto38["m_columns"][] = "newp";
$proto38["m_columns"][] = "stk_tra";
$proto38["m_columns"][] = "unit";
$proto38["m_columns"][] = "stk_tra_status";
$proto38["m_columns"][] = "package_details";
$proto38["m_columns"][] = "date_time";
$proto38["m_columns"][] = "outlet_code";
$obj = new SQLTable($proto38);

$proto37["m_table"] = $obj;
$proto37["m_sql"] = "sales_details";
$proto37["m_alias"] = "";
$proto37["m_srcTableName"] = "sales_details..";
$proto39=array();
$proto39["m_sql"] = "";
$proto39["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto0["m_fromlist"][]=$obj;
												$proto41=array();
$proto41["m_link"] = "SQLL_LEFTJOIN";
			$proto42=array();
$proto42["m_strName"] = "sales";
$proto42["m_srcTableName"] = "sales_details..";
$proto42["m_columns"] = array();
$proto42["m_columns"][] = "id";
$proto42["m_columns"][] = "customer_name";
$proto42["m_columns"][] = "cash";
$proto42["m_columns"][] = "tt";
$proto42["m_columns"][] = "date_&_time";
$proto42["m_columns"][] = "branch_code";
$proto42["m_columns"][] = "user";
$proto42["m_columns"][] = "outlet_code";
$proto42["m_columns"][] = "h";
$proto42["m_columns"][] = "f";
$proto42["m_columns"][] = "advance_id";
$proto42["m_columns"][] = "amount";
$proto42["m_columns"][] = "left_advance";
$proto42["m_columns"][] = "details";
$proto42["m_columns"][] = "status";
$proto42["m_columns"][] = "customer_id";
$obj = new SQLTable($proto42);

$proto41["m_table"] = $obj;
$proto41["m_sql"] = "LEFT OUTER JOIN sales ON sales_details.m_id = sales.id";
$proto41["m_alias"] = "";
$proto41["m_srcTableName"] = "sales_details..";
$proto43=array();
$proto43["m_sql"] = "sales_details.m_id = sales.id";
$proto43["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "m_id",
	"m_strTable" => "sales_details",
	"m_srcTableName" => "sales_details.."
));

$proto43["m_column"]=$obj;
$proto43["m_contained"] = array();
$proto43["m_strCase"] = "= sales.id";
$proto43["m_havingmode"] = false;
$proto43["m_inBrackets"] = false;
$proto43["m_useAlias"] = false;
$obj = new SQLLogicalExpr($proto43);

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

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

	return $obj;
}
$queryData_sales_details__ = createSqlQuery_sales_details__();


	
		;

															

$tdatasales_details__[".sqlquery"] = $queryData_sales_details__;



$tableEvents["sales_details.."] = new eventsBase;
$tdatasales_details__[".hasEvents"] = false;

?>