2013-10-10 Sergio Martin <sergio.martin@artica.es>

* include/functions_agents.php: Change the way of 
	calculate next contact in main agent view to real
	next contact using only agent interval.



git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@8886 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
zarzuelo 2013-10-10 14:44:53 +00:00
parent 9b6f00a1ff
commit 8c7a0b1ae8
2 changed files with 7 additions and 16 deletions

View File

@ -1,3 +1,9 @@
2013-10-10 Sergio Martin <sergio.martin@artica.es>
* include/functions_agents.php: Change the way of
calculate next contact in main agent view to real
next contact using only agent interval.
2013-10-10 Miguel de Dios <miguel.dedios@artica.es>
* include/functions_tags.php,

View File

@ -633,24 +633,9 @@ function agents_get_next_contact($idAgent, $maxModules = false) {
FROM tagente
WHERE id_agente = " . $idAgent);
$difference = get_system_time () - strtotime ($agent["ultimo_contacto"]);
$max = $agent["intervalo"];
if ($maxModules) {
$sql = sprintf ("SELECT MAX(module_interval)
FROM tagente_modulo
WHERE id_agente = %d", $id_agente);
$maxModules = (int) db_get_sql ($sql);
if ($maxModules > 0)
$max = $maxModules;
}
if ($max > 0)
return round ($difference / (($max * 2) / 100));
else
return false;
return round ($difference / ($agent["intervalo"] / 100));
}
/**