<?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"));










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

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

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

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

$proto0["m_having"] = $obj;
$proto0["m_fieldlist"] = array();
						$proto5=array();
			$proto6=array();
$proto6["m_functiontype"] = "SQLF_COUNT";
$proto6["m_arguments"] = array();
						$obj = new SQLField(array(
	"m_strName" => "idvisit_register",
	"m_strTable" => "visit_register"
));

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

$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"] = "visit_register";
$proto26["m_columns"] = array();
$proto26["m_columns"][] = "idvisit_register";
$proto26["m_columns"][] = "Lead_ID";
$proto26["m_columns"][] = "Recorded Date";
$proto26["m_columns"][] = "Employee Name";
$proto26["m_columns"][] = "Customer Name";
$proto26["m_columns"][] = "Contact Person";
$proto26["m_columns"][] = "Purpose Of Visit";
$proto26["m_columns"][] = "MOM Summary";
$proto26["m_columns"][] = "Voucher Status";
$proto26["m_columns"][] = "Date Of Visit";
$proto26["m_columns"][] = "Mode Of Travel";
$proto26["m_columns"][] = "Travel Expense";
$proto26["m_columns"][] = "Expense Remarks";
$proto26["m_columns"][] = "Visit Status";
$proto26["m_columns"][] = "Reporting Manager";
$proto26["m_columns"][] = "Approved Expense";
$proto26["m_columns"][] = "Approved Date";
$proto26["m_columns"][] = "Voucher Processed Date";
$proto26["m_columns"][] = "Expense Claim Date";
$obj = new SQLTable($proto26);

$proto25["m_table"] = $obj;
$proto25["m_alias"] = "";
$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"] = "0";
$proto27["m_inBrackets"] = "0";
$proto27["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto27);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

?>
