<?php
$tdataHO___Visit_Report=array();
	$tdataHO___Visit_Report[".NumberOfChars"]=80; 
	$tdataHO___Visit_Report[".ShortName"]="HO___Visit_Report";
	$tdataHO___Visit_Report[".OwnerID"]="";
	$tdataHO___Visit_Report[".OriginalTable"]="visit_register";


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


	
	$tdataHO___Visit_Report[".NCSearch"]=true;

	

$tdataHO___Visit_Report[".shortTableName"] = "HO___Visit_Report";
$tdataHO___Visit_Report[".nSecOptions"] = 0;
$tdataHO___Visit_Report[".recsPerRowList"] = 1;	
$tdataHO___Visit_Report[".tableGroupBy"] = "1";
$tdataHO___Visit_Report[".mainTableOwnerID"] = "";
$tdataHO___Visit_Report[".moveNext"] = 1;




$tdataHO___Visit_Report[".showAddInPopup"] = false;

$tdataHO___Visit_Report[".showEditInPopup"] = false;

$tdataHO___Visit_Report[".showViewInPopup"] = false;


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

$tdataHO___Visit_Report[".listAjax"] = false;

	$tdataHO___Visit_Report[".audit"] = false;

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

$tdataHO___Visit_Report[".exportTo"] = true;

$tdataHO___Visit_Report[".printFriendly"] = true;

$tdataHO___Visit_Report[".delete"] = true;

$tdataHO___Visit_Report[".showSimpleSearchOptions"] = false;

$tdataHO___Visit_Report[".showSearchPanel"] = true;


$tdataHO___Visit_Report[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdataHO___Visit_Report[".addPageEvents"] = false;


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

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

$tdataHO___Visit_Report[".isUseiBox"] = false;



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

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

$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Nos";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Employee Name";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Purpose Of Visit";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "MOM Summary";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Date";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Visit Status";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"]))
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Region";	
}


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

$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Date";	
}


$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Nos";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Employee Name";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Purpose Of Visit";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "MOM Summary";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Date";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Visit Status";	
}
$tdataHO___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", $tdataHO___Visit_Report[".allSearchFields"])) 
{
	$tdataHO___Visit_Report[".allSearchFields"][] = "Region";	
}

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

$tdataHO___Visit_Report[".reportGroupFields"] = true;

	

$tdataHO___Visit_Report[".isDisplayLoading"] = true;

$tdataHO___Visit_Report[".isResizeColumns"] = false;


$tdataHO___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;
$tdataHO___Visit_Report[".strOrderBy"] = $gstrOrderBy;
	
$tdataHO___Visit_Report[".orderindexes"] = array();
$tdataHO___Visit_Report[".orderindexes"][] = array(7, (0 ? "ASC" : "DESC"), "Date(visit_register.`Date Of Visit`)");

$tdataHO___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";
$tdataHO___Visit_Report[".sqlFrom"] = "FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$tdataHO___Visit_Report[".sqlWhereExpr"] = "";
$tdataHO___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;
$tdataHO___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;
$tdataHO___Visit_Report[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___Visit_Report["MOM Summary"]=$fdata;
//	Date
	$fdata = array();
	$fdata["strName"] = "Date";
	$fdata["ownerTable"] = "";
		
		
		
	$fdata["FieldType"]= 7;
	
		
			$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;
	
		
		
		
		
		
			$tdataHO___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;
	
		
		
		
		
		
			$tdataHO___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["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;
	
		
		
		
		
		
			$tdataHO___Visit_Report["Region"]=$fdata;

	
$tables_data["HO - Visit Report"]=&$tdataHO___Visit_Report;
$field_labels["HO___Visit_Report"] = &$fieldLabelsHO___Visit_Report;
$fieldToolTips["HO - Visit Report"] = &$fieldToolTipsHO___Visit_Report;

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

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

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

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










$proto36=array();
$proto36["m_strHead"] = "SELECT";
$proto36["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";
$proto36["m_strFrom"] = "FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$proto36["m_strWhere"] = "";
$proto36["m_strOrderBy"] = "ORDER BY Date(visit_register.`Date Of Visit`) DESC";
$proto36["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`";
$proto37=array();
$proto37["m_sql"] = "";
$proto37["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto36["m_having"] = $obj;
$proto36["m_fieldlist"] = array();
						$proto41=array();
			$proto42=array();
$proto42["m_functiontype"] = "SQLF_COUNT";
$proto42["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "idvisit_register",
	"m_strTable" => "visit_register"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$queryData_HO___Visit_Report = $obj;
$tdataHO___Visit_Report[".sqlquery"] = $queryData_HO___Visit_Report;

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

?>
