add: all
This commit is contained in:
parent
a15319c4d1
commit
eebf859afa
39 changed files with 2742 additions and 937 deletions
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\CsvController\CsvCostCalc;
|
||||
|
||||
class CsvTotalCostCalc
|
||||
{
|
||||
private $CsvMinuteCostCalc;
|
||||
public function __construct()
|
||||
{
|
||||
|
||||
$this->CsvMinuteCostCalc = new CsvMinuteCostCalc();
|
||||
}
|
||||
|
||||
function total_time_cost(array $array, int $total_time)
|
||||
{
|
||||
$minute_cost = $this->CsvMinuteCostCalc->select_correct_cost($array['Request By'], $array['Priority']);
|
||||
$total_cost = $total_time / 60 * $minute_cost;
|
||||
$array['Tempo totale'] = gmdate('H:i:s', $total_time);
|
||||
$array['Costo totale'] = $total_cost;
|
||||
return $array;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue