add: more tests
This commit is contained in:
parent
ce7f620984
commit
fcd76cf130
11 changed files with 232 additions and 15 deletions
|
@ -34,10 +34,9 @@ class CsvAgentCost
|
|||
|
||||
function calculate_agents_cost(array $array, array $agents_time, float $minute_cost)
|
||||
{
|
||||
$minute_cost = utils::round_up_to_two_decimals($minute_cost);
|
||||
foreach ($agents_time as $name => $agent_time) {
|
||||
//Identify agents involved in the issue
|
||||
$agent_cost = utils::round_up_to_two_decimals($agent_time / 60 * $minute_cost);
|
||||
$agent_cost = utils::round_up_to_two_decimals($agent_time * $minute_cost / 60);
|
||||
$array[$name] = gmdate('H:i:s', $agent_time);
|
||||
$array[$name . ' costo'] = $agent_cost;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue