<?php
$strTableName="Leads-Management";
$_SESSION["OwnerID"] = $_SESSION["_".$strTableName."_OwnerID"];

$strOriginalTableName="lead_table";

$gstrOrderBy="ORDER BY lead_table.`Approx Closure Date`, lead_table.`Lead Status`";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy="order by ".$gstrOrderBy;

$g_orderindexes=array();
$g_orderindexes[] = array(7, (1 ? "ASC" : "DESC"), "lead_table.`Approx Closure Date`");
$g_orderindexes[] = array(8, (1 ? "ASC" : "DESC"), "lead_table.`Lead Status`");
$gsqlHead="SELECT lead_table.Leadid,  lead_table.Region,  lead_table.`Customer Name`,  lead_table.`Contact Person`,  lead_table.`Lead Details`,  lead_table.`Employee Name`,  lead_table.`Approx Closure Date`,  lead_table.`Lead Status`,  lead_table.`Requirement Details`,  lead_table.`Approx Value`,  lead_table.`First Quote Remarks`,  lead_table.`Proposed Closure Date`,  lead_table.`Projected Closure QTR`,  lead_table.`Proposed Solution Details`,  lead_table.`Quoted Price`,  lead_table.`Final Quote Remarks`,  lead_table.`Discussion Highlights`,  lead_table.`WIN / Lost Analysis`,  lead_table.`Alligned Vendor`,  customer_list.Address,  customer_list.City,  customer_list.`State`,  customer_list.`Postal Code`";
$gsqlFrom="FROM lead_table  INNER JOIN customer_list ON lead_table.`Customer Name` = customer_list.`Customer Name`";
$gsqlWhereExpr="lead_table.`Lead Status` ='Suspect' OR lead_table.`Lead Status` ='prospect' OR lead_table.`Lead Status` ='Review' OR lead_table.`Lead Status` ='Hot' OR lead_table.`Lead Status` ='Commit'";
$gsqlTail="";

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

// alias for 'SQLQuery' object
$gQuery = &$queryData_Leads_Management;
$eventObj = &$tableEvents["Leads-Management"];

$reportCaseSensitiveGroupFields = false;

$gstrSQL = gSQLWhere("");


?>