<?php
$tdataCall_Details=array();
	$tdataCall_Details[".NumberOfChars"]=80; 
	$tdataCall_Details[".ShortName"]="Call_Details";
	$tdataCall_Details[".OwnerID"]="Executive Name";
	$tdataCall_Details[".OriginalTable"]="calls";


	
//	field labels
$fieldLabelsCall_Details = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelsCall_Details["English"]=array();
	$fieldToolTipsCall_Details["English"]=array();
	$fieldLabelsCall_Details["English"]["idCalls"] = "Id Calls";
	$fieldToolTipsCall_Details["English"]["idCalls"] = "";
	$fieldLabelsCall_Details["English"]["Date"] = "Date";
	$fieldToolTipsCall_Details["English"]["Date"] = "";
	$fieldLabelsCall_Details["English"]["Call_Details"] = "Call Details";
	$fieldToolTipsCall_Details["English"]["Call Details"] = "";
	$fieldLabelsCall_Details["English"]["Executive_Name"] = "Executive Name";
	$fieldToolTipsCall_Details["English"]["Executive Name"] = "";
	$fieldLabelsCall_Details["English"]["Customer_Name"] = "Customer Name";
	$fieldToolTipsCall_Details["English"]["Customer Name"] = "";
	if (count($fieldToolTipsCall_Details["English"])){
		$tdataCall_Details[".isUseToolTips"]=true;
	}
}


	
	$tdataCall_Details[".NCSearch"]=true;

	

$tdataCall_Details[".shortTableName"] = "Call_Details";
$tdataCall_Details[".nSecOptions"] = 2;
$tdataCall_Details[".recsPerRowList"] = 1;	
$tdataCall_Details[".tableGroupBy"] = "0";
$tdataCall_Details[".mainTableOwnerID"] = "Executive Name";
$tdataCall_Details[".moveNext"] = 1;




$tdataCall_Details[".showAddInPopup"] = false;

$tdataCall_Details[".showEditInPopup"] = false;

$tdataCall_Details[".showViewInPopup"] = false;


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

$tdataCall_Details[".listAjax"] = false;

	$tdataCall_Details[".audit"] = false;

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




$tdataCall_Details[".showSimpleSearchOptions"] = false;

$tdataCall_Details[".showSearchPanel"] = true;


$tdataCall_Details[".isUseAjaxSuggest"] = true;

$tdataCall_Details[".rowHighlite"] = true;


// button handlers file names

$tdataCall_Details[".addPageEvents"] = false;

$tdataCall_Details[".arrKeyFields"][] = "idCalls";

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

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

$tdataCall_Details[".isUseiBox"] = false;



$tdataCall_Details[".isUseInlineAdd"] = true;

$tdataCall_Details[".isUseInlineEdit"] = true;
$tdataCall_Details[".isUseInlineJs"] = $tdataCall_Details[".isUseInlineAdd"] || $tdataCall_Details[".isUseInlineEdit"];

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



$tdataCall_Details[".googleLikeFields"][] = "Date";
$tdataCall_Details[".googleLikeFields"][] = "Call Details";
$tdataCall_Details[".googleLikeFields"][] = "Executive Name";
$tdataCall_Details[".googleLikeFields"][] = "idCalls";
$tdataCall_Details[".googleLikeFields"][] = "Customer Name";



$tdataCall_Details[".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", $tdataCall_Details[".allSearchFields"])) 
{
	$tdataCall_Details[".allSearchFields"][] = "Date";	
}
$tdataCall_Details[".advSearchFields"][] = "Call 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("Call Details", $tdataCall_Details[".allSearchFields"])) 
{
	$tdataCall_Details[".allSearchFields"][] = "Call Details";	
}
$tdataCall_Details[".advSearchFields"][] = "Executive 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("Executive Name", $tdataCall_Details[".allSearchFields"])) 
{
	$tdataCall_Details[".allSearchFields"][] = "Executive Name";	
}
$tdataCall_Details[".advSearchFields"][] = "idCalls";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("idCalls", $tdataCall_Details[".allSearchFields"])) 
{
	$tdataCall_Details[".allSearchFields"][] = "idCalls";	
}
$tdataCall_Details[".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", $tdataCall_Details[".allSearchFields"])) 
{
	$tdataCall_Details[".allSearchFields"][] = "Customer Name";	
}

$tdataCall_Details[".isTableType"] = "list";


	

$tdataCall_Details[".isDisplayLoading"] = true;

$tdataCall_Details[".isResizeColumns"] = false;





$tdataCall_Details[".pageSize"] = 5;

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

$tdataCall_Details[".sqlHead"] = "SELECT idCalls,  `Date`,  `Call Details`,  `Executive Name`,  `Customer Name`";
$tdataCall_Details[".sqlFrom"] = "FROM calls";
$tdataCall_Details[".sqlWhereExpr"] = "";
$tdataCall_Details[".sqlTail"] = "";




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

	$tableKeys = array();
	$tableKeys[] = "idCalls";
	$tdataCall_Details[".Keys"] = $tableKeys;

//	idCalls
	$fdata = array();
	$fdata["strName"] = "idCalls";
	$fdata["ownerTable"] = "calls";
		$fdata["Label"]="Id Calls"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "idCalls";
	
		$fdata["FullName"]= "idCalls";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataCall_Details["idCalls"]=$fdata;
//	Date
	$fdata = array();
	$fdata["strName"] = "Date";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 135;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Date";
	$fdata["ViewFormat"]= "Datetime";
	
		$fdata["ShowTime"]=true; 
	
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Date";
	
		$fdata["FullName"]= "`Date`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
		$fdata["DateEditType"] = 11; 
	$fdata["InitialYearFactor"] = 100; 
	$fdata["LastYearFactor"] = 10; 
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataCall_Details["Date"]=$fdata;
//	Call Details
	$fdata = array();
	$fdata["strName"] = "Call Details";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Call_Details";
	
		$fdata["FullName"]= "`Call Details`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 3;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataCall_Details["Call Details"]=$fdata;
//	Executive Name
	$fdata = array();
	$fdata["strName"] = "Executive Name";
	$fdata["ownerTable"] = "calls";
		
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "Executive_Name";
	
		$fdata["FullName"]= "`Executive Name`";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=45";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataCall_Details["Executive Name"]=$fdata;
//	Customer Name
	$fdata = array();
	$fdata["strName"] = "Customer Name";
	$fdata["ownerTable"] = "calls";
		
		
		
	$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"]= 5;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=100";
		
		
		$fdata["bAddPage"]=true; 
	
		
		
		
		$fdata["bViewPage"]=true; 
	
		
		
		
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdataCall_Details["Customer Name"]=$fdata;

	
$tables_data["Call-Details"]=&$tdataCall_Details;
$field_labels["Call_Details"] = &$fieldLabelsCall_Details;
$fieldToolTips["Call-Details"] = &$fieldToolTipsCall_Details;

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

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

$mIndex = 1-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["Call-Details"][$mIndex] = array(
		  "mDataSourceTable"=>"Active Customers"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Active_Customers"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 2
		, "previewOnAdd" => 0
		, "previewOnEdit" => 1
		, "previewOnView" => 1
	);	
		$masterTablesData["Call-Details"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["Call-Details"][$mIndex]["detailKeys"][]="Customer Name";

$mIndex = 2-1;
			$strOriginalDetailsTable="customer_list";
	$masterTablesData["Call-Details"][$mIndex] = array(
		  "mDataSourceTable"=>"Potential Customer List"
		, "mOriginalTable" => $strOriginalDetailsTable
		, "mShortTable" => "Potential_Customer_List"
		, "masterKeys" => array()
		, "detailKeys" => array()
		, "dispChildCount" => "1"
		, "hideChild" => "0"	
		, "dispInfo" => "1"								
		, "previewOnList" => 1
		, "previewOnAdd" => 0
		, "previewOnEdit" => 0
		, "previewOnView" => 1
	);	
		$masterTablesData["Call-Details"][$mIndex]["masterKeys"][]="Customer Name";
		$masterTablesData["Call-Details"][$mIndex]["detailKeys"][]="Customer Name";

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

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










$proto355=array();
$proto355["m_strHead"] = "SELECT";
$proto355["m_strFieldList"] = "idCalls,  `Date`,  `Call Details`,  `Executive Name`,  `Customer Name`";
$proto355["m_strFrom"] = "FROM calls";
$proto355["m_strWhere"] = "";
$proto355["m_strOrderBy"] = "ORDER BY idCalls DESC";
$proto355["m_strTail"] = "";
$proto356=array();
$proto356["m_sql"] = "";
$proto356["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

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

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

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

$proto355["m_having"] = $obj;
$proto355["m_fieldlist"] = array();
						$proto360=array();
			$obj = new SQLField(array(
	"m_strName" => "idCalls",
	"m_strTable" => "calls"
));

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

$proto355["m_fieldlist"][]=$obj;
						$proto362=array();
			$obj = new SQLField(array(
	"m_strName" => "Date",
	"m_strTable" => "calls"
));

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

$proto355["m_fieldlist"][]=$obj;
						$proto364=array();
			$obj = new SQLField(array(
	"m_strName" => "Call Details",
	"m_strTable" => "calls"
));

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

$proto355["m_fieldlist"][]=$obj;
						$proto366=array();
			$obj = new SQLField(array(
	"m_strName" => "Executive Name",
	"m_strTable" => "calls"
));

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

$proto355["m_fieldlist"][]=$obj;
						$proto368=array();
			$obj = new SQLField(array(
	"m_strName" => "Customer Name",
	"m_strTable" => "calls"
));

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

$proto355["m_fieldlist"][]=$obj;
$proto355["m_fromlist"] = array();
												$proto370=array();
$proto370["m_link"] = "SQLL_MAIN";
			$proto371=array();
$proto371["m_strName"] = "calls";
$proto371["m_columns"] = array();
$proto371["m_columns"][] = "idCalls";
$proto371["m_columns"][] = "Date";
$proto371["m_columns"][] = "Call Details";
$proto371["m_columns"][] = "Executive Name";
$proto371["m_columns"][] = "Customer Name";
$obj = new SQLTable($proto371);

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

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

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

$proto355["m_fromlist"][]=$obj;
$proto355["m_groupby"] = array();
$proto355["m_orderby"] = array();
												$proto374=array();
						$obj = new SQLField(array(
	"m_strName" => "idCalls",
	"m_strTable" => "calls"
));

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

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

$queryData_Call_Details = $obj;
$tdataCall_Details[".sqlquery"] = $queryData_Call_Details;

$tableEvents["Call-Details"] = new eventsBase;

?>
