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


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

//	field labels
$fieldLabelsbuyers_advance = array();
$fieldToolTipsbuyers_advance = array();
$pageTitlesbuyers_advance = array();
$placeHoldersbuyers_advance = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsbuyers_advance["English"] = array();
	$fieldToolTipsbuyers_advance["English"] = array();
	$placeHoldersbuyers_advance["English"] = array();
	$pageTitlesbuyers_advance["English"] = array();
	$fieldLabelsbuyers_advance["English"]["id"] = "Id";
	$fieldToolTipsbuyers_advance["English"]["id"] = "";
	$placeHoldersbuyers_advance["English"]["id"] = "";
	$fieldLabelsbuyers_advance["English"]["buyer_id"] = "Buyer Id";
	$fieldToolTipsbuyers_advance["English"]["buyer_id"] = "";
	$placeHoldersbuyers_advance["English"]["buyer_id"] = "";
	$fieldLabelsbuyers_advance["English"]["buyer_name"] = "Buyer Name";
	$fieldToolTipsbuyers_advance["English"]["buyer_name"] = "";
	$placeHoldersbuyers_advance["English"]["buyer_name"] = "";
	$fieldLabelsbuyers_advance["English"]["date"] = "Date";
	$fieldToolTipsbuyers_advance["English"]["date"] = "";
	$placeHoldersbuyers_advance["English"]["date"] = "";
	$fieldLabelsbuyers_advance["English"]["advance_amount"] = "Advance Amount";
	$fieldToolTipsbuyers_advance["English"]["advance_amount"] = "";
	$placeHoldersbuyers_advance["English"]["advance_amount"] = "";
	$fieldLabelsbuyers_advance["English"]["details"] = "Details";
	$fieldToolTipsbuyers_advance["English"]["details"] = "";
	$placeHoldersbuyers_advance["English"]["details"] = "";
	$fieldLabelsbuyers_advance["English"]["user"] = "User";
	$fieldToolTipsbuyers_advance["English"]["user"] = "";
	$placeHoldersbuyers_advance["English"]["user"] = "";
	$pageTitlesbuyers_advance["English"]["edit"] = "Buyers Advance, Edit - {%id}";
	if (count($fieldToolTipsbuyers_advance["English"]))
		$tdatabuyers_advance[".isUseToolTips"] = true;
}


	$tdatabuyers_advance[".NCSearch"] = true;



$tdatabuyers_advance[".shortTableName"] = "buyers_advance";
$tdatabuyers_advance[".nSecOptions"] = 0;

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


$tdatabuyers_advance[".strOriginalTableName"] = "buyers_advance";

	



$tdatabuyers_advance[".showAddInPopup"] = false;

$tdatabuyers_advance[".showEditInPopup"] = false;

$tdatabuyers_advance[".showViewInPopup"] = false;

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


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

	$tdatabuyers_advance[".audit"] = true;

	$tdatabuyers_advance[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatabuyers_advance[".isUseAjaxSuggest"] = true;

$tdatabuyers_advance[".rowHighlite"] = true;



																																																			

$tdatabuyers_advance[".ajaxCodeSnippetAdded"] = false;

$tdatabuyers_advance[".buttonsAdded"] = false;

$tdatabuyers_advance[".addPageEvents"] = false;

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


$tdatabuyers_advance[".badgeColor"] = "BC8F8F";


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

$tdatabuyers_advance[".googleLikeFields"] = array();
$tdatabuyers_advance[".googleLikeFields"][] = "id";
$tdatabuyers_advance[".googleLikeFields"][] = "buyer_id";
$tdatabuyers_advance[".googleLikeFields"][] = "buyer_name";
$tdatabuyers_advance[".googleLikeFields"][] = "date";
$tdatabuyers_advance[".googleLikeFields"][] = "advance_amount";
$tdatabuyers_advance[".googleLikeFields"][] = "details";
$tdatabuyers_advance[".googleLikeFields"][] = "user";



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

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

$tdatabuyers_advance[".nPrinterSplitRecords"] = 40;

$tdatabuyers_advance[".geocodingEnabled"] = false;










$tdatabuyers_advance[".pageSize"] = 20;

$tdatabuyers_advance[".warnLeavingPages"] = true;



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

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


$tdatabuyers_advance[".sqlHead"] = "SELECT id,  	buyer_id,  	buyer_name,  	`date`,  	advance_amount,  	details,  	`user`";
$tdatabuyers_advance[".sqlFrom"] = "FROM buyers_advance";
$tdatabuyers_advance[".sqlWhereExpr"] = "";
$tdatabuyers_advance[".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;
$tdatabuyers_advance[".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;
$tdatabuyers_advance[".arrGroupsPerPage"] = $arrGPP;

$tdatabuyers_advance[".highlightSearchResults"] = true;

$tableKeysbuyers_advance = array();
$tableKeysbuyers_advance[] = "id";
$tdatabuyers_advance[".Keys"] = $tableKeysbuyers_advance;


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




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


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

	
	
	
			

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

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

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


	
	

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

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

	

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

	
	
	
	

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


	$tdatabuyers_advance["buyer_id"] = $fdata;
		$tdatabuyers_advance[".searchableFields"][] = "buyer_id";
//	buyer_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "buyer_name";
	$fdata["GoodName"] = "buyer_name";
	$fdata["ownerTable"] = "buyers_advance";
	$fdata["Label"] = GetFieldLabel("buyers_advance","buyer_name");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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


	
	

// Begin Lookup settings
				$edata["LookupType"] = 2;
	$edata["LookupTable"] = "buyers";
			$edata["autoCompleteFieldsOnEdit"] = 1;
	$edata["autoCompleteFields"] = array();
		$edata["autoCompleteFields"][] = array('masterF'=>"buyer_id", 'lookupF'=>"id");
	$edata["LCType"] = 1;

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

	

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

	
	
	
	

	
	
	
// End Lookup Settings


		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

	
			
	
	
	
	$fdata["EditFormats"]["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


	$tdatabuyers_advance["buyer_name"] = $fdata;
		$tdatabuyers_advance[".searchableFields"][] = "buyer_name";
//	date
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "date";
	$fdata["GoodName"] = "date";
	$fdata["ownerTable"] = "buyers_advance";
	$fdata["Label"] = GetFieldLabel("buyers_advance","date");
	$fdata["FieldType"] = 135;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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

	
	
	
		$edata["controlWidth"] = 200;

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

	
			
	
	
	
	$fdata["EditFormats"]["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


	$tdatabuyers_advance["date"] = $fdata;
		$tdatabuyers_advance[".searchableFields"][] = "date";
//	advance_amount
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "advance_amount";
	$fdata["GoodName"] = "advance_amount";
	$fdata["ownerTable"] = "buyers_advance";
	$fdata["Label"] = GetFieldLabel("buyers_advance","advance_amount");
	$fdata["FieldType"] = 14;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
		$vdata["DecimalDigits"] = 2;

	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



		$edata["IsRequired"] = true;

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

		$edata["maxNumberOfFiles"] = 1;

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


	$tdatabuyers_advance["advance_amount"] = $fdata;
		$tdatabuyers_advance[".searchableFields"][] = "advance_amount";
//	details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "details";
	$fdata["GoodName"] = "details";
	$fdata["ownerTable"] = "buyers_advance";
	$fdata["Label"] = GetFieldLabel("buyers_advance","details");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
				$edata["nRows"] = 100;
			$edata["nCols"] = 200;

	
	
		$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


	$tdatabuyers_advance["details"] = $fdata;
		$tdatabuyers_advance[".searchableFields"][] = "details";
//	user
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "user";
	$fdata["GoodName"] = "user";
	$fdata["ownerTable"] = "buyers_advance";
	$fdata["Label"] = GetFieldLabel("buyers_advance","user");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

	//	End validation

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


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


$tables_data["buyers_advance"]=&$tdatabuyers_advance;
$field_labels["buyers_advance"] = &$fieldLabelsbuyers_advance;
$fieldToolTips["buyers_advance"] = &$fieldToolTipsbuyers_advance;
$placeHolders["buyers_advance"] = &$placeHoldersbuyers_advance;
$page_titles["buyers_advance"] = &$pageTitlesbuyers_advance;

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

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



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



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











function createSqlQuery_buyers_advance()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	buyer_id,  	buyer_name,  	`date`,  	advance_amount,  	details,  	`user`";
$proto0["m_strFrom"] = "FROM buyers_advance";
$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" => "buyers_advance",
	"m_srcTableName" => "buyers_advance"
));

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

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

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

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

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

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

$proto12["m_sql"] = "`date`";
$proto12["m_srcTableName"] = "buyers_advance";
$proto12["m_expr"]=$obj;
$proto12["m_alias"] = "";
$obj = new SQLFieldListItem($proto12);

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

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

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

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

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto20=array();
$proto20["m_link"] = "SQLL_MAIN";
			$proto21=array();
$proto21["m_strName"] = "buyers_advance";
$proto21["m_srcTableName"] = "buyers_advance";
$proto21["m_columns"] = array();
$proto21["m_columns"][] = "id";
$proto21["m_columns"][] = "buyer_id";
$proto21["m_columns"][] = "buyer_name";
$proto21["m_columns"][] = "date";
$proto21["m_columns"][] = "advance_amount";
$proto21["m_columns"][] = "details";
$proto21["m_columns"][] = "user";
$obj = new SQLTable($proto21);

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

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

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

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

	return $obj;
}
$queryData_buyers_advance = createSqlQuery_buyers_advance();


	
		;

							

$tdatabuyers_advance[".sqlquery"] = $queryData_buyers_advance;



$tableEvents["buyers_advance"] = new eventsBase;
$tdatabuyers_advance[".hasEvents"] = false;

?>