<?php
$strTableName="Visit Performance";
$_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"];

$strOriginalTableName="visit_register";

$gstrOrderBy="ORDER BY Date(visit_register.`Date Of Visit`)";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy="order by ".$gstrOrderBy;

$g_orderindexes=array();
$g_orderindexes[] = array(2, (1 ? "ASC" : "DESC"), "Date(visit_register.`Date Of Visit`)");
$gsqlHead="SELECT COUNT(visit_register.idvisit_register) AS Nos,  Date(visit_register.`Date Of Visit`) AS `Date`,  visit_register.`Visit Status`";
$gsqlFrom="FROM visit_register  INNER JOIN customer_list ON visit_register.`Customer Name` = customer_list.`Customer Name`";
$gsqlWhereExpr="(visit_register.`Visit Status` ='completed')";
$gsqlTail="GROUP BY Date(visit_register.`Date Of Visit`), visit_register.`Visit Status`";

include(getabspath("include/Visit_Performance_settings.php"));

// alias for 'SQLQuery' object
$gQuery = &$queryData_Visit_Performance;
$eventObj = &$tableEvents["Visit Performance"];

$reportCaseSensitiveGroupFields = false;

$gstrSQL = gSQLWhere("");


?>