<?php
$tdataOpen_Leads_Report=array();
	$tdataOpen_Leads_Report[".NumberOfChars"]=80; 
	$tdataOpen_Leads_Report[".ShortName"]="Open_Leads_Report";
	$tdataOpen_Leads_Report[".OwnerID"]="";
	$tdataOpen_Leads_Report[".OriginalTable"]="lead_table";


	
//	field labels
$fieldLabelsOpen_Leads_Report = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsOpen_Leads_Report["English"]=array();
	$fieldToolTipsOpen_Leads_Report["English"]=array();
	$fieldLabelsOpen_Leads_Report["English"]["Leadid"] = "Leadid";
	$fieldToolTipsOpen_Leads_Report["English"]["Leadid"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsOpen_Leads_Report["English"]["Customer Name"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Contact_Person"] = "Contact Person";
	$fieldToolTipsOpen_Leads_Report["English"]["Contact Person"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Lead_Details"] = "Lead Details";
	$fieldToolTipsOpen_Leads_Report["English"]["Lead Details"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Employee_Name"] = "Employee Name";
	$fieldToolTipsOpen_Leads_Report["English"]["Employee Name"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Approx_Closure_Date"] = "Approx Closure Date";
	$fieldToolTipsOpen_Leads_Report["English"]["Approx Closure Date"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["Lead_Status"] = "Lead Status";
	$fieldToolTipsOpen_Leads_Report["English"]["Lead Status"] = "";
	$fieldLabelsOpen_Leads_Report["English"]["WIN___Lost_Analysis"] = "WIN / Lost Analysis";
	$fieldToolTipsOpen_Leads_Report["English"]["WIN / Lost Analysis"] = "";
	if (count($fieldToolTipsOpen_Leads_Report["English"])){
		$tdataOpen_Leads_Report[".isUseToolTips"]=true;
	}
}


	
	$tdataOpen_Leads_Report[".NCSearch"]=true;

	

$tdataOpen_Leads_Report[".shortTableName"] = "Open_Leads_Report";
$tdataOpen_Leads_Report[".nSecOptions"] = 0;
$tdataOpen_Leads_Report[".recsPerRowList"] = 1;	
$tdataOpen_Leads_Report[".tableGroupBy"] = "1";
$tdataOpen_Leads_Report[".mainTableOwnerID"] = "";
$tdataOpen_Leads_Report[".moveNext"] = 1;




$tdataOpen_Leads_Report[".showAddInPopup"] = false;

$tdataOpen_Leads_Report[".showEditInPopup"] = false;

$tdataOpen_Leads_Report[".showViewInPopup"] = false;


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

$tdataOpen_Leads_Report[".listAjax"] = false;

	$tdataOpen_Leads_Report[".audit"] = false;

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

$tdataOpen_Leads_Report[".exportTo"] = true;

$tdataOpen_Leads_Report[".printFriendly"] = true;

$tdataOpen_Leads_Report[".delete"] = true;

$tdataOpen_Leads_Report[".showSimpleSearchOptions"] = false;

$tdataOpen_Leads_Report[".showSearchPanel"] = true;


$tdataOpen_Leads_Report[".isUseAjaxSuggest"] = true;



// button handlers file names

$tdataOpen_Leads_Report[".addPageEvents"] = false;

$tdataOpen_Leads_Report[".arrKeyFields"][] = "Leadid";

// use datepicker for search panel
$tdataOpen_Leads_Report[".isUseCalendarForSearch"] = false;

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

$tdataOpen_Leads_Report[".isUseiBox"] = false;



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

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

$tdataOpen_Leads_Report[".globSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Leadid";	
}
$tdataOpen_Leads_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", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataOpen_Leads_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", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Lead Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Details", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Details";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Approx Closure 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("Approx Closure Date", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "Lead 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("Lead Status", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Status";	
}
$tdataOpen_Leads_Report[".globSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "WIN / Lost Analysis";	
}
$tdataOpen_Leads_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", $tdataOpen_Leads_Report[".allSearchFields"]))
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Employee Name";	
}


$tdataOpen_Leads_Report[".googleLikeFields"][] = "Leadid";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Customer Name";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Contact Person";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Lead Details";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Approx Closure Date";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Lead Status";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "WIN / Lost Analysis";
$tdataOpen_Leads_Report[".googleLikeFields"][] = "Employee Name";



$tdataOpen_Leads_Report[".advSearchFields"][] = "Leadid";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Leadid", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Leadid";	
}
$tdataOpen_Leads_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", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Customer Name";	
}
$tdataOpen_Leads_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", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Contact Person";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Lead Details";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("Lead Details", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Details";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Approx Closure 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("Approx Closure Date", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Approx Closure Date";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "Lead 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("Lead Status", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Lead Status";	
}
$tdataOpen_Leads_Report[".advSearchFields"][] = "WIN / Lost Analysis";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("WIN / Lost Analysis", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "WIN / Lost Analysis";	
}
$tdataOpen_Leads_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", $tdataOpen_Leads_Report[".allSearchFields"])) 
{
	$tdataOpen_Leads_Report[".allSearchFields"][] = "Employee Name";	
}

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

$tdataOpen_Leads_Report[".reportGroupFields"] = true;

	

$tdataOpen_Leads_Report[".isDisplayLoading"] = true;

$tdataOpen_Leads_Report[".isResizeColumns"] = false;






$gstrOrderBy = "ORDER BY `Lead Status`";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdataOpen_Leads_Report[".strOrderBy"] = $gstrOrderBy;
	
$tdataOpen_Leads_Report[".orderindexes"] = array();
$tdataOpen_Leads_Report[".orderindexes"][] = array(6, (1 ? "ASC" : "DESC"), "`Lead Status`");

$tdataOpen_Leads_Report[".sqlHead"] = "SELECT Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Approx Closure Date`,  `Lead Status`,  `WIN / Lost Analysis`,  `Employee Name`";
$tdataOpen_Leads_Report[".sqlFrom"] = "FROM lead_table";
$tdataOpen_Leads_Report[".sqlWhereExpr"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$tdataOpen_Leads_Report[".sqlTail"] = "GROUP BY Leadid, `Customer Name`, `Contact Person`, `Lead Details`, `Approx Closure Date`, `Lead Status`, `WIN / Lost Analysis`, `Employee Name`";




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

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

//	Leadid
	$fdata = array();
	$fdata["strName"] = "Leadid";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Leadid";
	
		$fdata["FullName"]= "Leadid";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$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();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Leadid"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Customer_Name";
	
		$fdata["FullName"]= "`Customer Name`";
	
		
		
		
		
		
				$fdata["Index"]= 2;
				$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Customer Name"]=$fdata;
//	Contact Person
	$fdata = array();
	$fdata["strName"] = "Contact Person";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Contact_Person";
	
		$fdata["FullName"]= "`Contact Person`";
	
		
		
		
		
		
				$fdata["Index"]= 3;
				$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Contact Person"]=$fdata;
//	Lead Details
	$fdata = array();
	$fdata["strName"] = "Lead Details";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Details";
	
		$fdata["FullName"]= "`Lead Details`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Lead Details"]=$fdata;
//	Approx Closure Date
	$fdata = array();
	$fdata["strName"] = "Approx Closure Date";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Approx_Closure_Date";
	
		$fdata["FullName"]= "`Approx Closure Date`";
	
		
		
		
		
		
				$fdata["Index"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=20";
		
		$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Approx Closure Date"]=$fdata;
//	Lead Status
	$fdata = array();
	$fdata["strName"] = "Lead Status";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Lead_Status";
	
		$fdata["FullName"]= "`Lead Status`";
	
		
		
		
		
		
				$fdata["Index"]= 6;
				$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Lead Status"]=$fdata;
//	WIN / Lost Analysis
	$fdata = array();
	$fdata["strName"] = "WIN / Lost Analysis";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "WIN___Lost_Analysis";
	
		$fdata["FullName"]= "`WIN / Lost Analysis`";
	
		
		
		
		
		
				$fdata["Index"]= 7;
				$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["WIN / Lost Analysis"]=$fdata;
//	Employee Name
	$fdata = array();
	$fdata["strName"] = "Employee Name";
	$fdata["ownerTable"] = "lead_table";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Employee_Name";
	
		$fdata["FullName"]= "`Employee Name`";
	
		
		
		
		
		
				$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;
	
		
		
		
		
		
			$tdataOpen_Leads_Report["Employee Name"]=$fdata;

	
$tables_data["Open Leads Report"]=&$tdataOpen_Leads_Report;
$field_labels["Open_Leads_Report"] = &$fieldLabelsOpen_Leads_Report;
$fieldToolTips["Open Leads Report"] = &$fieldToolTipsOpen_Leads_Report;

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

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

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

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










$proto51=array();
$proto51["m_strHead"] = "SELECT";
$proto51["m_strFieldList"] = "Leadid,  `Customer Name`,  `Contact Person`,  `Lead Details`,  `Approx Closure Date`,  `Lead Status`,  `WIN / Lost Analysis`,  `Employee Name`";
$proto51["m_strFrom"] = "FROM lead_table";
$proto51["m_strWhere"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$proto51["m_strOrderBy"] = "ORDER BY `Lead Status`";
$proto51["m_strTail"] = "GROUP BY Leadid, `Customer Name`, `Contact Person`, `Lead Details`, `Approx Closure Date`, `Lead Status`, `WIN / Lost Analysis`, `Employee Name`";
$proto52=array();
$proto52["m_sql"] = "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\"";
$proto52["m_uniontype"] = "SQLL_OR";
	$obj = new SQLNonParsed(array(
	"m_sql" => "`Lead Status` = \"Suspect\" OR `Lead Status` =\"Prospect\" OR `Lead Status` =\"review\" OR `Lead Status` =\"Hot\" OR `Lead Status` =\"Commit\""
));

$proto52["m_column"]=$obj;
$proto52["m_contained"] = array();
						$proto54=array();
$proto54["m_sql"] = "`Lead Status` = \"Suspect\"";
$proto54["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto52["m_contained"][]=$obj;
						$proto56=array();
$proto56["m_sql"] = "`Lead Status` =\"Prospect\"";
$proto56["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto52["m_contained"][]=$obj;
						$proto58=array();
$proto58["m_sql"] = "`Lead Status` =\"review\"";
$proto58["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto52["m_contained"][]=$obj;
						$proto60=array();
$proto60["m_sql"] = "`Lead Status` =\"Hot\"";
$proto60["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

			$proto52["m_contained"][]=$obj;
						$proto62=array();
$proto62["m_sql"] = "`Lead Status` =\"Commit\"";
$proto62["m_uniontype"] = "SQLL_UNKNOWN";
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

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

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

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

$proto51["m_having"] = $obj;
$proto51["m_fieldlist"] = array();
						$proto66=array();
			$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto68=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto70=array();
			$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto72=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto74=array();
			$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto76=array();
			$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto78=array();
			$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
						$proto80=array();
			$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

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

$proto51["m_fieldlist"][]=$obj;
$proto51["m_fromlist"] = array();
												$proto82=array();
$proto82["m_link"] = "SQLL_MAIN";
			$proto83=array();
$proto83["m_strName"] = "lead_table";
$proto83["m_columns"] = array();
$proto83["m_columns"][] = "Leadid";
$proto83["m_columns"][] = "Region";
$proto83["m_columns"][] = "Customer Name";
$proto83["m_columns"][] = "Contact Person";
$proto83["m_columns"][] = "Lead Details";
$proto83["m_columns"][] = "Employee Name";
$proto83["m_columns"][] = "Approx Closure Date";
$proto83["m_columns"][] = "Lead Status";
$proto83["m_columns"][] = "Manager Name";
$proto83["m_columns"][] = "Manager Remarks";
$proto83["m_columns"][] = "Sales Call Status";
$proto83["m_columns"][] = "Lead Level";
$proto83["m_columns"][] = "Requirement Details";
$proto83["m_columns"][] = "Approx Value";
$proto83["m_columns"][] = "First Quote Remarks";
$proto83["m_columns"][] = "Proposed Closure Date";
$proto83["m_columns"][] = "Projected Closure QTR";
$proto83["m_columns"][] = "Proposed Solution Details";
$proto83["m_columns"][] = "Quoted Price";
$proto83["m_columns"][] = "Final Quote Remarks";
$proto83["m_columns"][] = "Discussion Highlights";
$proto83["m_columns"][] = "WIN / Lost Analysis";
$obj = new SQLTable($proto83);

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

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

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

$proto51["m_fromlist"][]=$obj;
$proto51["m_groupby"] = array();
												$proto86=array();
						$obj = new SQLField(array(
	"m_strName" => "Leadid",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto88=array();
						$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto90=array();
						$obj = new SQLField(array(
	"m_strName" => "Contact Person",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto92=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Details",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto94=array();
						$obj = new SQLField(array(
	"m_strName" => "Approx Closure Date",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto96=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto98=array();
						$obj = new SQLField(array(
	"m_strName" => "WIN / Lost Analysis",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
												$proto100=array();
						$obj = new SQLField(array(
	"m_strName" => "Employee Name",
	"m_strTable" => "lead_table"
));

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

$proto51["m_groupby"][]=$obj;
$proto51["m_orderby"] = array();
												$proto102=array();
						$obj = new SQLField(array(
	"m_strName" => "Lead Status",
	"m_strTable" => "lead_table"
));

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

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

$queryData_Open_Leads_Report = $obj;
$tdataOpen_Leads_Report[".sqlquery"] = $queryData_Open_Leads_Report;

$tableEvents["Open Leads Report"] = new eventsBase;

?>
