mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
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:
parent
74a4ef7b83
commit
d5efa9f2f8
@ -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>
|
2013-10-10 Miguel de Dios <miguel.dedios@artica.es>
|
||||||
|
|
||||||
* include/functions_tags.php,
|
* include/functions_tags.php,
|
||||||
|
@ -633,24 +633,9 @@ function agents_get_next_contact($idAgent, $maxModules = false) {
|
|||||||
FROM tagente
|
FROM tagente
|
||||||
WHERE id_agente = " . $idAgent);
|
WHERE id_agente = " . $idAgent);
|
||||||
|
|
||||||
|
|
||||||
$difference = get_system_time () - strtotime ($agent["ultimo_contacto"]);
|
$difference = get_system_time () - strtotime ($agent["ultimo_contacto"]);
|
||||||
|
|
||||||
|
return round ($difference / ($agent["intervalo"] / 100));
|
||||||
$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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user