<?php
$tdataRO___Visit_Report=array();
	$tdataRO___Visit_Report[".NumberOfChars"]=80; 
	$tdataRO___Visit_Report[".ShortName"]="RO___Visit_Report";
	$tdataRO___Visit_Report[".OwnerID"]="Region";
	$tdataRO___Visit_Report[".OriginalTable"]="visit_register";


	
//	field labels
$fieldLabelsRO___Visit_Report = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsRO___Visit_Report["English"]=array();
	$fieldToolTipsRO___Visit_Report["English"]=array();
	$fieldLabelsRO___Visit_Report["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsRO___Visit_Report["English"]["Employee Name"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsRO___Visit_Report["English"]["Customer Name"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsRO___Visit_Report["English"]["Contact Person"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Purpose_Of_Visit"] = "Purpose Of Visit";
	$fieldToolTipsRO___Visit_Report["English"]["Purpose Of Visit"] = "";
	$fieldLabelsRO___Visit_Report["English"]["MOM_Summary"] = "MOM Summary";
	$fieldToolTipsRO___Visit_Report["English"]["MOM Summary"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Visit_Status"] = "Visit Status";
	$fieldToolTipsRO___Visit_Report["English"]["Visit Status"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Date"] = "Date";
	$fieldToolTipsRO___Visit_Report["English"]["Date"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Nos"] = "Nos";
	$fieldToolTipsRO___Visit_Report["English"]["Nos"] = "";
	$fieldLabelsRO___Visit_Report["English"]["Region"] = "Region";
	$fieldToolTipsRO___Visit_Report["English"]["Region"] = "";
	if (count($fieldToolTipsRO___Visit_Report["English"])){
		$tdataRO___Visit_Report[".isUseToolTips"]=true;
	}
}


	
	$tdataRO___Visit_Report[".NCSearch"]=true;

	

$tdataRO___Visit_Report[".shortTableName"] = "RO___Visit_Report";
$tdataRO___Visit_Report[".nSecOptions"] = 1;
$tdataRO___Visit_Report[".recsPerRowList"] = 1;	
$tdataRO___Visit_Report[".tableGroupBy"] = "1";
$tdataRO___Visit_Report[".mainTableOwnerID"] = "Region";
$tdataRO___Visit_Report[".moveNext"] = 1;




$tdataRO___Visit_Report[".showAddInPopup"] = false;

$tdataRO___Visit_Report[".showEditInPopup"] = false;

$tdataRO___Visit_Report[".showViewInPopup"] = false;


$tdataRO___Visit_Report[".fieldsForRegister"] = array();

$tdataRO___Visit_Report[".listAjax"] = false;

	$tdataRO___Visit_Report[".audit"] = false;

	$tdataRO___Visit_Report[".locking"] = false;
	
$tdataRO___Visit_Report[".listIcons"] = true;
$tdataRO___Visit_Report[".edit"] = true;
$tdataRO___Visit_Report[".inlineEdit"] = true;
$tdataRO___Visit_Report[".view"] = true;

$tdataRO___Visit_Report[".exportTo"] = true;

$tdataRO___Visit_Report[".printFriendly"] = true;

$tdataRO___Visit_Report[".delete"] = true;

$tdataRO___Visit_Report[".showSimpleSearchOptions"] = false;

$tdataRO___Visit_Report[".showSearchPanel"] = true;


$tdataRO___Visit_Report[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdataRO___Visit_Report[".addPageEvents"] = false;


// use datepicker for search panel
$tdataRO___Visit_Report[".isUseCalendarForSearch"] = true;

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

$tdataRO___Visit_Report[".isUseiBox"] = false;



$tdataRO___Visit_Report[".isUseInlineJs"] = $tdataRO___Visit_Report[".isUseInlineAdd"] || $tdataRO___Visit_Report[".isUseInlineEdit"];

$tdataRO___Visit_Report[".allSearchFields"] = array();

$tdataRO___Visit_Report[".globSearchFields"][] = "Nos";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Nos", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Nos";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Employee Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Employee Name", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Employee Name";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Purpose Of Visit";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Purpose Of Visit", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Purpose Of Visit";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "MOM Summary";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("MOM Summary", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "MOM Summary";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Date", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Date";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Visit Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Visit Status", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Visit Status";	
}
$tdataRO___Visit_Report[".globSearchFields"][] = "Region";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Region", $tdataRO___Visit_Report[".allSearchFields"]))
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Region";	
}


$tdataRO___Visit_Report[".googleLikeFields"][] = "Nos";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Employee Name";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Customer Name";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Contact Person";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Purpose Of Visit";
$tdataRO___Visit_Report[".googleLikeFields"][] = "MOM Summary";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Date";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Visit Status";
$tdataRO___Visit_Report[".googleLikeFields"][] = "Region";

$tdataRO___Visit_Report[".panelSearchFields"][] = "Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Date", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Date";	
}


$tdataRO___Visit_Report[".advSearchFields"][] = "Nos";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Nos", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Nos";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Employee Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Employee Name", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Employee Name";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Customer Name";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Customer Name", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Contact Person";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Contact Person", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Purpose Of Visit";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Purpose Of Visit", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Purpose Of Visit";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "MOM Summary";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("MOM Summary", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "MOM Summary";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Date";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Date", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Date";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Visit Status";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Visit Status", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Visit Status";	
}
$tdataRO___Visit_Report[".advSearchFields"][] = "Region";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Region", $tdataRO___Visit_Report[".allSearchFields"])) 
{
	$tdataRO___Visit_Report[".allSearchFields"][] = "Region";	
}

$tdataRO___Visit_Report[".isTableType"] = "report";

$tdataRO___Visit_Report[".reportGroupFields"] = true;

	

$tdataRO___Visit_Report[".isDisplayLoading"] = true;

$tdataRO___Visit_Report[".isResizeColumns"] = false;


$tdataRO___Visit_Report[".noRecordsFirstPage"] = true;




$gstrOrderBy = "ORDER BY Date(visit_register.`Date Of Visit`) DESC";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataRO___Visit_Report[".strOrderBy"] = $gstrOrderBy;
	
$tdataRO___Visit_Report[".orderindexes"] = array();
$tdataRO___Visit_Report[".orderindexes"][] = array(7, (0 ? "ASC" : "DESC"), "Date(visit_register.`Date Of Visit`)");

$tdataRO___Visit_Report[".sqlHead"] = "SELECT COUNT(visit_register.idvisit_register) AS Nos,  visit_register.`Employee Name`,  visit_register.`Customer Name`,  visit_register.`Contact Person`,  visit_register.`Purpose Of Visit`,  visit_register.`MOM Summary`,  Date(visit_register.`Date Of Visit`) AS `Date`,  visit_register.`Visit Status`,  customer_list.Region";
$tdataRO___Visit_Report[".sqlFrom"] = "FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$tdataRO___Visit_Report[".sqlWhereExpr"] = "";
$tdataRO___Visit_Report[".sqlTail"] = "GROUP BY visit_register.`Employee Name`, visit_register.`Customer Name`, visit_register.`Contact Person`, visit_register.`Purpose Of Visit`, visit_register.`MOM Summary`, Date(visit_register.`Date Of Visit`), visit_register.`Visit Status`";




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

	$tableKeys = array();
	$tdataRO___Visit_Report[".Keys"] = $tableKeys;

//	Nos
	$fdata = array();
	$fdata["strName"] = "Nos";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Nos";
	
		$fdata["FullName"]= "COUNT(visit_register.idvisit_register)";
	
		
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Nos"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "visit_register.`Employee Name`";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Employee Name"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "visit_register.`Customer Name`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "visit_register.`Contact Person`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Contact Person"]=$fdata;
//	Purpose Of Visit
	$fdata = array();
	$fdata["strName"] = "Purpose Of Visit";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Purpose_Of_Visit";
	
		$fdata["FullName"]= "visit_register.`Purpose Of Visit`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Purpose Of Visit"]=$fdata;
//	MOM Summary
	$fdata = array();
	$fdata["strName"] = "MOM Summary";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "MOM_Summary";
	
		$fdata["FullName"]= "visit_register.`MOM Summary`";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=250";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["MOM Summary"]=$fdata;
//	Date
	$fdata = array();
	$fdata["strName"] = "Date";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 135;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Short Date";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Date";
	
		$fdata["FullName"]= "Date(visit_register.`Date Of Visit`)";
	
		
		
		
		
		
				$fdata["Index"]= 7;
		$fdata["DateEditType"] = 13; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Date"]=$fdata;
//	Visit Status
	$fdata = array();
	$fdata["strName"] = "Visit Status";
	$fdata["ownerTable"] = "visit_register";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Visit_Status";
	
		$fdata["FullName"]= "visit_register.`Visit Status`";
	
		
		
		
		
		
				$fdata["Index"]= 8;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataRO___Visit_Report["Visit Status"]=$fdata;
//	Region
	$fdata = array();
	$fdata["strName"] = "Region";
	$fdata["ownerTable"] = "customer_list";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Region";
	
		$fdata["FullName"]= "customer_list.Region";
	
		
		
		
		
		
				$fdata["Index"]= 9;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				
		
		
		
		
		
			$tdataRO___Visit_Report["Region"]=$fdata;

	
$tables_data["RO - Visit Report"]=&$tdataRO___Visit_Report;
$field_labels["RO___Visit_Report"] = &$fieldLabelsRO___Visit_Report;
$fieldToolTips["RO - Visit Report"] = &$fieldToolTipsRO___Visit_Report;

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

	
// tables which are master tables for current table (detail)
$masterTablesData["RO - Visit Report"] = array();

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

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










$proto129=array();
$proto129["m_strHead"] = "SELECT";
$proto129["m_strFieldList"] = "COUNT(visit_register.idvisit_register) AS Nos,  visit_register.`Employee Name`,  visit_register.`Customer Name`,  visit_register.`Contact Person`,  visit_register.`Purpose Of Visit`,  visit_register.`MOM Summary`,  Date(visit_register.`Date Of Visit`) AS `Date`,  visit_register.`Visit Status`,  customer_list.Region";
$proto129["m_strFrom"] = "FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$proto129["m_strWhere"] = "";
$proto129["m_strOrderBy"] = "ORDER BY Date(visit_register.`Date Of Visit`) DESC";
$proto129["m_strTail"] = "GROUP BY visit_register.`Employee Name`, visit_register.`Customer Name`, visit_register.`Contact Person`, visit_register.`Purpose Of Visit`, visit_register.`MOM Summary`, Date(visit_register.`Date Of Visit`), visit_register.`Visit Status`";
$proto130=array();
$proto130["m_sql"] = "";
$proto130["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto129["m_where"] = $obj;
$proto132=array();
$proto132["m_sql"] = "";
$proto132["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

$proto129["m_having"] = $obj;
$proto129["m_fieldlist"] = array();
						$proto134=array();
			$proto135=array();
$proto135["m_functiontype"] = "SQLF_COUNT";
$proto135["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "idvisit_register",
	"m_strTable" => "visit_register"
));

$proto135["m_arguments"][]=$obj;
$proto135["m_strFunctionName"] = "COUNT";
$obj = new SQLFunctionCall($proto135);

$proto134["m_expr"]=$obj;
$proto134["m_alias"] = "Nos";
$obj = new SQLFieldListItem($proto134);

$proto129["m_fieldlist"][]=$obj;
						$proto137=array();
			$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "visit_register"
));

$proto137["m_expr"]=$obj;
$proto137["m_alias"] = "";
$obj = new SQLFieldListItem($proto137);

$proto129["m_fieldlist"][]=$obj;
						$proto139=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "visit_register"
));

$proto139["m_expr"]=$obj;
$proto139["m_alias"] = "";
$obj = new SQLFieldListItem($proto139);

$proto129["m_fieldlist"][]=$obj;
						$proto141=array();
			$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "visit_register"
));

$proto141["m_expr"]=$obj;
$proto141["m_alias"] = "";
$obj = new SQLFieldListItem($proto141);

$proto129["m_fieldlist"][]=$obj;
						$proto143=array();
			$obj = new SQLField(array(
	"m_strName" => "Purpose Of Visit",
	"m_strTable" => "visit_register"
));

$proto143["m_expr"]=$obj;
$proto143["m_alias"] = "";
$obj = new SQLFieldListItem($proto143);

$proto129["m_fieldlist"][]=$obj;
						$proto145=array();
			$obj = new SQLField(array(
	"m_strName" => "MOM Summary",
	"m_strTable" => "visit_register"
));

$proto145["m_expr"]=$obj;
$proto145["m_alias"] = "";
$obj = new SQLFieldListItem($proto145);

$proto129["m_fieldlist"][]=$obj;
						$proto147=array();
			$proto148=array();
$proto148["m_functiontype"] = "SQLF_CUSTOM";
$proto148["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "visit_register.`Date Of Visit`"
));

$proto148["m_arguments"][]=$obj;
$proto148["m_strFunctionName"] = "Date";
$obj = new SQLFunctionCall($proto148);

$proto147["m_expr"]=$obj;
$proto147["m_alias"] = "Date";
$obj = new SQLFieldListItem($proto147);

$proto129["m_fieldlist"][]=$obj;
						$proto150=array();
			$obj = new SQLField(array(
	"m_strName" => "Visit Status",
	"m_strTable" => "visit_register"
));

$proto150["m_expr"]=$obj;
$proto150["m_alias"] = "";
$obj = new SQLFieldListItem($proto150);

$proto129["m_fieldlist"][]=$obj;
						$proto152=array();
			$obj = new SQLField(array(
	"m_strName" => "Region",
	"m_strTable" => "customer_list"
));

$proto152["m_expr"]=$obj;
$proto152["m_alias"] = "";
$obj = new SQLFieldListItem($proto152);

$proto129["m_fieldlist"][]=$obj;
$proto129["m_fromlist"] = array();
												$proto154=array();
$proto154["m_link"] = "SQLL_MAIN";
			$proto155=array();
$proto155["m_strName"] = "visit_register";
$proto155["m_columns"] = array();
$proto155["m_columns"][] = "idvisit_register";
$proto155["m_columns"][] = "Lead_ID";
$proto155["m_columns"][] = "Recorded Date";
$proto155["m_columns"][] = "Employee Name";
$proto155["m_columns"][] = "Customer Name";
$proto155["m_columns"][] = "Contact Person";
$proto155["m_columns"][] = "Purpose Of Visit";
$proto155["m_columns"][] = "MOM Summary";
$proto155["m_columns"][] = "Voucher Status";
$proto155["m_columns"][] = "Date Of Visit";
$proto155["m_columns"][] = "Mode Of Travel";
$proto155["m_columns"][] = "Travel Expense";
$proto155["m_columns"][] = "Expense Remarks";
$proto155["m_columns"][] = "Visit Status";
$proto155["m_columns"][] = "Reporting Manager";
$proto155["m_columns"][] = "Approved Expense";
$proto155["m_columns"][] = "Approved Date";
$proto155["m_columns"][] = "Voucher Processed Date";
$proto155["m_columns"][] = "Expense Claim Date";
$obj = new SQLTable($proto155);

$proto154["m_table"] = $obj;
$proto154["m_alias"] = "";
$proto156=array();
$proto156["m_sql"] = "";
$proto156["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

$proto129["m_fromlist"][]=$obj;
												$proto158=array();
$proto158["m_link"] = "SQLL_INNERJOIN";
			$proto159=array();
$proto159["m_strName"] = "customer_list";
$proto159["m_columns"] = array();
$proto159["m_columns"][] = "idCL";
$proto159["m_columns"][] = "Created on";
$proto159["m_columns"][] = "Region";
$proto159["m_columns"][] = "Customer Name";
$proto159["m_columns"][] = "Address";
$proto159["m_columns"][] = "City";
$proto159["m_columns"][] = "State";
$proto159["m_columns"][] = "Country";
$proto159["m_columns"][] = "Postal Code";
$proto159["m_columns"][] = "Web address";
$proto159["m_columns"][] = "Area";
$proto159["m_columns"][] = "Customer_Category";
$proto159["m_columns"][] = "Breif About the Company";
$proto159["m_columns"][] = "Existing Setup";
$proto159["m_columns"][] = "Interaction Summary";
$proto159["m_columns"][] = "Commercial Summary";
$proto159["m_columns"][] = "Customer Status";
$proto159["m_columns"][] = "Assigned Executive";
$proto159["m_columns"][] = "Assigned Date";
$proto159["m_columns"][] = "Last Updated on";
$obj = new SQLTable($proto159);

$proto158["m_table"] = $obj;
$proto158["m_alias"] = "";
$proto160=array();
$proto160["m_sql"] = "visit_register.`Customer Name` = customer_list.`Customer Name`";
$proto160["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "visit_register"
));

$proto160["m_column"]=$obj;
$proto160["m_contained"] = array();
$proto160["m_strCase"] = "= customer_list.`Customer Name`";
$proto160["m_havingmode"] = "0";
$proto160["m_inBrackets"] = "0";
$proto160["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto160);

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

$proto129["m_fromlist"][]=$obj;
$proto129["m_groupby"] = array();
												$proto162=array();
						$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "visit_register"
));

$proto162["m_column"]=$obj;
$obj = new SQLGroupByItem($proto162);

$proto129["m_groupby"][]=$obj;
												$proto164=array();
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "visit_register"
));

$proto164["m_column"]=$obj;
$obj = new SQLGroupByItem($proto164);

$proto129["m_groupby"][]=$obj;
												$proto166=array();
						$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "visit_register"
));

$proto166["m_column"]=$obj;
$obj = new SQLGroupByItem($proto166);

$proto129["m_groupby"][]=$obj;
												$proto168=array();
						$obj = new SQLField(array(
	"m_strName" => "Purpose Of Visit",
	"m_strTable" => "visit_register"
));

$proto168["m_column"]=$obj;
$obj = new SQLGroupByItem($proto168);

$proto129["m_groupby"][]=$obj;
												$proto170=array();
						$obj = new SQLField(array(
	"m_strName" => "MOM Summary",
	"m_strTable" => "visit_register"
));

$proto170["m_column"]=$obj;
$obj = new SQLGroupByItem($proto170);

$proto129["m_groupby"][]=$obj;
												$proto172=array();
						$proto173=array();
$proto173["m_functiontype"] = "SQLF_CUSTOM";
$proto173["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "visit_register.`Date Of Visit`"
));

$proto173["m_arguments"][]=$obj;
$proto173["m_strFunctionName"] = "Date";
$obj = new SQLFunctionCall($proto173);

$proto172["m_column"]=$obj;
$obj = new SQLGroupByItem($proto172);

$proto129["m_groupby"][]=$obj;
												$proto175=array();
						$obj = new SQLField(array(
	"m_strName" => "Visit Status",
	"m_strTable" => "visit_register"
));

$proto175["m_column"]=$obj;
$obj = new SQLGroupByItem($proto175);

$proto129["m_groupby"][]=$obj;
$proto129["m_orderby"] = array();
												$proto177=array();
						$proto178=array();
$proto178["m_functiontype"] = "SQLF_CUSTOM";
$proto178["m_arguments"] = array();
						$obj = new SQLNonParsed(array(
	"m_sql" => "visit_register.`Date Of Visit`"
));

$proto178["m_arguments"][]=$obj;
$proto178["m_strFunctionName"] = "Date";
$obj = new SQLFunctionCall($proto178);

$proto177["m_column"]=$obj;
$proto177["m_bAsc"] = 0;
$proto177["m_nColumn"] = 0;
$obj = new SQLOrderByItem($proto177);

$proto129["m_orderby"][]=$obj;					
$obj = new SQLQuery($proto129);

$queryData_RO___Visit_Report = $obj;
$tdataRO___Visit_Report[".sqlquery"] = $queryData_RO___Visit_Report;

$tableEvents["RO - Visit Report"] = new eventsBase;

?>
