<?php
$tdatacustomer1 = array();
$tdatacustomer1[".searchableFields"] = array();
$tdatacustomer1[".ShortName"] = "customer1";
$tdatacustomer1[".OwnerID"] = "";
$tdatacustomer1[".OriginalTable"] = "customer";


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

//	field labels
$fieldLabelscustomer1 = array();
$fieldToolTipscustomer1 = array();
$pageTitlescustomer1 = array();
$placeHolderscustomer1 = array();

if(mlang_getcurrentlang()=="English")
{
	$fieldLabelscustomer1["English"] = array();
	$fieldToolTipscustomer1["English"] = array();
	$placeHolderscustomer1["English"] = array();
	$pageTitlescustomer1["English"] = array();
	$fieldLabelscustomer1["English"]["id"] = "Id";
	$fieldToolTipscustomer1["English"]["id"] = "";
	$placeHolderscustomer1["English"]["id"] = "";
	$fieldLabelscustomer1["English"]["address"] = "Address";
	$fieldToolTipscustomer1["English"]["address"] = "";
	$placeHolderscustomer1["English"]["address"] = "";
	$fieldLabelscustomer1["English"]["whatsapp"] = "Whatsapp";
	$fieldToolTipscustomer1["English"]["whatsapp"] = "";
	$placeHolderscustomer1["English"]["whatsapp"] = "";
	$fieldLabelscustomer1["English"]["photo"] = "Photo";
	$fieldToolTipscustomer1["English"]["photo"] = "";
	$placeHolderscustomer1["English"]["photo"] = "";
	$fieldLabelscustomer1["English"]["branch_code"] = "Branch Code";
	$fieldToolTipscustomer1["English"]["branch_code"] = "";
	$placeHolderscustomer1["English"]["branch_code"] = "";
	$fieldLabelscustomer1["English"]["details"] = "Details";
	$fieldToolTipscustomer1["English"]["details"] = "";
	$placeHolderscustomer1["English"]["details"] = "";
	$fieldLabelscustomer1["English"]["phone_number"] = "Phone Number";
	$fieldToolTipscustomer1["English"]["phone_number"] = "";
	$placeHolderscustomer1["English"]["phone_number"] = "";
	$fieldLabelscustomer1["English"]["customer_name"] = "Customer Name";
	$fieldToolTipscustomer1["English"]["customer_name"] = "";
	$placeHolderscustomer1["English"]["customer_name"] = "";
	if (count($fieldToolTipscustomer1["English"]))
		$tdatacustomer1[".isUseToolTips"] = true;
}


	$tdatacustomer1[".NCSearch"] = true;



$tdatacustomer1[".shortTableName"] = "customer1";
$tdatacustomer1[".nSecOptions"] = 0;

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


$tdatacustomer1[".strOriginalTableName"] = "customer";

	



$tdatacustomer1[".showAddInPopup"] = false;

$tdatacustomer1[".showEditInPopup"] = false;

$tdatacustomer1[".showViewInPopup"] = false;

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


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

	$tdatacustomer1[".audit"] = true;

	$tdatacustomer1[".locking"] = false;


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

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

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

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



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




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

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

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

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



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

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

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

$tdatacustomer1[".isUseAjaxSuggest"] = true;

$tdatacustomer1[".rowHighlite"] = true;



																																																			

$tdatacustomer1[".ajaxCodeSnippetAdded"] = false;

$tdatacustomer1[".buttonsAdded"] = false;

$tdatacustomer1[".addPageEvents"] = false;

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


$tdatacustomer1[".badgeColor"] = "D2AF80";


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

$tdatacustomer1[".googleLikeFields"] = array();
$tdatacustomer1[".googleLikeFields"][] = "id";
$tdatacustomer1[".googleLikeFields"][] = "details";
$tdatacustomer1[".googleLikeFields"][] = "phone_number";
$tdatacustomer1[".googleLikeFields"][] = "customer_name";
$tdatacustomer1[".googleLikeFields"][] = "address";
$tdatacustomer1[".googleLikeFields"][] = "whatsapp";
$tdatacustomer1[".googleLikeFields"][] = "photo";
$tdatacustomer1[".googleLikeFields"][] = "branch_code";



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

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

$tdatacustomer1[".nPrinterSplitRecords"] = 40;

$tdatacustomer1[".geocodingEnabled"] = false;










$tdatacustomer1[".pageSize"] = 20;

$tdatacustomer1[".warnLeavingPages"] = true;



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

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


$tdatacustomer1[".sqlHead"] = "SELECT id,  	CONCAT(phone_number,\" - \",customer_name) as details ,  phone_number,customer_name,  	address,  	whatsapp,  	photo,  	branch_code";
$tdatacustomer1[".sqlFrom"] = "FROM customer";
$tdatacustomer1[".sqlWhereExpr"] = "";
$tdatacustomer1[".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;
$tdatacustomer1[".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;
$tdatacustomer1[".arrGroupsPerPage"] = $arrGPP;

$tdatacustomer1[".highlightSearchResults"] = true;

$tableKeyscustomer1 = array();
$tableKeyscustomer1[] = "id";
$tdatacustomer1[".Keys"] = $tableKeyscustomer1;


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




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


	$tdatacustomer1["id"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "id";
//	details
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 2;
	$fdata["strName"] = "details";
	$fdata["GoodName"] = "details";
	$fdata["ownerTable"] = "";
	$fdata["Label"] = GetFieldLabel("customer1","details");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "CONCAT(phone_number,\" - \",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


	$tdatacustomer1["details"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "details";
//	phone_number
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 3;
	$fdata["strName"] = "phone_number";
	$fdata["GoodName"] = "phone_number";
	$fdata["ownerTable"] = "customer";
	$fdata["Label"] = GetFieldLabel("customer1","phone_number");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

	$edata = array("EditFormat" => "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";
			$edata["validateAs"]["basicValidate"][] = "DenyDuplicated";
	$edata["validateAs"]["customMessages"]["DenyDuplicated"] = array("message" => "Phone number %value% already exists", "messageType" => "Text");

	
	//	End validation

	
			
	
		$edata["denyDuplicates"] = true;

	
	$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


	$tdatacustomer1["phone_number"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "phone_number";
//	customer_name
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 4;
	$fdata["strName"] = "customer_name";
	$fdata["GoodName"] = "customer_name";
	$fdata["ownerTable"] = "customer";
	$fdata["Label"] = GetFieldLabel("customer1","customer_name");
	$fdata["FieldType"] = 200;

	
	
	
			

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

	
		$fdata["isSQLExpression"] = true;
	$fdata["FullName"] = "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;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["list"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

	$fdata["ViewFormats"]["print"] = $vdata;
	$vdata = array("ViewFormat" => "");

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

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

		$edata["controlWidth"] = 200;

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

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

		$edata["controlWidth"] = 200;

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

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


	$fdata["isSeparate"] = true;




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


	$tdatacustomer1["customer_name"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "customer_name";
//	address
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 5;
	$fdata["strName"] = "address";
	$fdata["GoodName"] = "address";
	$fdata["ownerTable"] = "customer";
	$fdata["Label"] = GetFieldLabel("customer1","address");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

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

		$edata["EditParams"] = "";
			$edata["EditParams"].= " maxlength=150";

		$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


	$tdatacustomer1["address"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "address";
//	whatsapp
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 6;
	$fdata["strName"] = "whatsapp";
	$fdata["GoodName"] = "whatsapp";
	$fdata["ownerTable"] = "customer";
	$fdata["Label"] = GetFieldLabel("customer1","whatsapp");
	$fdata["FieldType"] = 3;

	
	
	
			

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

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

	
	
				$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


	$tdatacustomer1["whatsapp"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "whatsapp";
//	photo
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 7;
	$fdata["strName"] = "photo";
	$fdata["GoodName"] = "photo";
	$fdata["ownerTable"] = "customer";
	$fdata["Label"] = GetFieldLabel("customer1","photo");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

		$fdata["DeleteAssociatedFile"] = true;

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

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

	$vdata = array("ViewFormat" => "File-based Image");

	
	
				$vdata["ShowThumbnail"] = true;
	$vdata["ThumbWidth"] = 100;
	$vdata["ThumbHeight"] = 75;
	$vdata["ImageWidth"] = 500;
	$vdata["ImageHeight"] = 500;

			$vdata["multipleImgMode"] = 2;
	$vdata["maxImages"] = 1;

			$vdata["showGallery"] = true;
	$vdata["galleryMode"] = 1;
	$vdata["captionMode"] = 3;
	$vdata["captionField"] = "customer_name";

	$vdata["imageBorder"] = 1;
	$vdata["imageFullWidth"] = 1;


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

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

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

	$edata = array("EditFormat" => "Document upload");

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


	
	



	
	
	
	
							$edata["acceptFileTypes"] = "bmp";
			$edata["acceptFileTypesHtml"] = ".bmp";
						$edata["acceptFileTypes"] .= "|gif";
			$edata["acceptFileTypesHtml"] .= ",.gif";
						$edata["acceptFileTypes"] .= "|jpg";
			$edata["acceptFileTypesHtml"] .= ",.jpg";
						$edata["acceptFileTypes"] .= "|png";
			$edata["acceptFileTypesHtml"] .= ",.png";
		$edata["acceptFileTypes"] = "(".$edata["acceptFileTypes"].")$";

		$edata["maxNumberOfFiles"] = 1;

		$edata["maxFileSize"] = 1000;

		$edata["maxTotalFilesSize"] = 1000;

	
	
	
	
		$edata["controlWidth"] = 200;

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

		$edata["CreateThumbnail"] = true;
	$edata["StrThumbnail"] = "th";
			$edata["ThumbnailSize"] = 100;

				$edata["ResizeImage"] = true;
				$edata["NewSize"] = 500;

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


	$fdata["isSeparate"] = false;


	$fdata["Absolute"] = true;


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


	$tdatacustomer1["photo"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "photo";
//	branch_code
//	Custom field settings
	$fdata = array();
	$fdata["Index"] = 8;
	$fdata["strName"] = "branch_code";
	$fdata["GoodName"] = "branch_code";
	$fdata["ownerTable"] = "customer";
	$fdata["Label"] = GetFieldLabel("customer1","branch_code");
	$fdata["FieldType"] = 200;

	
	
	
			

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

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

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

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

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

	
	
	
	
	
	
	
	
	
	
	
		
	
		$vdata["NeedEncode"] = true;

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

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

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

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

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


	
	



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

		$edata["maxNumberOfFiles"] = 1;

	
	
	
	
	
	
		$edata["controlWidth"] = 200;

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

	//	End validation

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


	$fdata["isSeparate"] = false;




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

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


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

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

		$fdata["filterBy"] = 0;

	

	
	
//end of Filters settings


	$tdatacustomer1["branch_code"] = $fdata;
		$tdatacustomer1[".searchableFields"][] = "branch_code";


$tables_data["customer1"]=&$tdatacustomer1;
$field_labels["customer1"] = &$fieldLabelscustomer1;
$fieldToolTips["customer1"] = &$fieldToolTipscustomer1;
$placeHolders["customer1"] = &$placeHolderscustomer1;
$page_titles["customer1"] = &$pageTitlescustomer1;

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

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



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



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











function createSqlQuery_customer1()
{
$proto0=array();
$proto0["m_strHead"] = "SELECT";
$proto0["m_strFieldList"] = "id,  	CONCAT(phone_number,\" - \",customer_name) as details ,  phone_number,customer_name,  	address,  	whatsapp,  	photo,  	branch_code";
$proto0["m_strFrom"] = "FROM customer";
$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" => "customer",
	"m_srcTableName" => "customer1"
));

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

$proto0["m_fieldlist"][]=$obj;
						$proto8=array();
			$proto9=array();
$proto9["m_functiontype"] = "SQLF_CUSTOM";
$proto9["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "phone_number"
));

$proto9["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "\" - \""
));

$proto9["m_arguments"][]=$obj;
						$obj = new SQLNonParsed(array(
	"m_sql" => "customer_name"
));

$proto9["m_arguments"][]=$obj;
$proto9["m_strFunctionName"] = "CONCAT";
$obj = new SQLFunctionCall($proto9);

$proto8["m_sql"] = "CONCAT(phone_number,\" - \",customer_name)";
$proto8["m_srcTableName"] = "customer1";
$proto8["m_expr"]=$obj;
$proto8["m_alias"] = "details";
$obj = new SQLFieldListItem($proto8);

$proto0["m_fieldlist"][]=$obj;
						$proto13=array();
			$obj = new SQLField(array(
	"m_strName" => "phone_number",
	"m_strTable" => "customer",
	"m_srcTableName" => "customer1"
));

$proto13["m_sql"] = "phone_number";
$proto13["m_srcTableName"] = "customer1";
$proto13["m_expr"]=$obj;
$proto13["m_alias"] = "";
$obj = new SQLFieldListItem($proto13);

$proto0["m_fieldlist"][]=$obj;
						$proto15=array();
			$obj = new SQLField(array(
	"m_strName" => "customer_name",
	"m_strTable" => "customer",
	"m_srcTableName" => "customer1"
));

$proto15["m_sql"] = "customer_name";
$proto15["m_srcTableName"] = "customer1";
$proto15["m_expr"]=$obj;
$proto15["m_alias"] = "";
$obj = new SQLFieldListItem($proto15);

$proto0["m_fieldlist"][]=$obj;
						$proto17=array();
			$obj = new SQLField(array(
	"m_strName" => "address",
	"m_strTable" => "customer",
	"m_srcTableName" => "customer1"
));

$proto17["m_sql"] = "address";
$proto17["m_srcTableName"] = "customer1";
$proto17["m_expr"]=$obj;
$proto17["m_alias"] = "";
$obj = new SQLFieldListItem($proto17);

$proto0["m_fieldlist"][]=$obj;
						$proto19=array();
			$obj = new SQLField(array(
	"m_strName" => "whatsapp",
	"m_strTable" => "customer",
	"m_srcTableName" => "customer1"
));

$proto19["m_sql"] = "whatsapp";
$proto19["m_srcTableName"] = "customer1";
$proto19["m_expr"]=$obj;
$proto19["m_alias"] = "";
$obj = new SQLFieldListItem($proto19);

$proto0["m_fieldlist"][]=$obj;
						$proto21=array();
			$obj = new SQLField(array(
	"m_strName" => "photo",
	"m_strTable" => "customer",
	"m_srcTableName" => "customer1"
));

$proto21["m_sql"] = "photo";
$proto21["m_srcTableName"] = "customer1";
$proto21["m_expr"]=$obj;
$proto21["m_alias"] = "";
$obj = new SQLFieldListItem($proto21);

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

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

$proto0["m_fieldlist"][]=$obj;
$proto0["m_fromlist"] = array();
												$proto25=array();
$proto25["m_link"] = "SQLL_MAIN";
			$proto26=array();
$proto26["m_strName"] = "customer";
$proto26["m_srcTableName"] = "customer1";
$proto26["m_columns"] = array();
$proto26["m_columns"][] = "id";
$proto26["m_columns"][] = "customer_name";
$proto26["m_columns"][] = "phone_number";
$proto26["m_columns"][] = "address";
$proto26["m_columns"][] = "whatsapp";
$proto26["m_columns"][] = "photo";
$proto26["m_columns"][] = "branch_code";
$obj = new SQLTable($proto26);

$proto25["m_table"] = $obj;
$proto25["m_sql"] = "customer";
$proto25["m_alias"] = "";
$proto25["m_srcTableName"] = "customer1";
$proto27=array();
$proto27["m_sql"] = "";
$proto27["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

	return $obj;
}
$queryData_customer1 = createSqlQuery_customer1();


	
		;

								

$tdatacustomer1[".sqlquery"] = $queryData_customer1;



include_once(getabspath("include/customer1_events.php"));
$tableEvents["customer1"] = new eventclass_customer1;
$tdatacustomer1[".hasEvents"] = true;

?>