32 lines
977 B
PHP
32 lines
977 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\CsvController\CsvCostCalc;
|
|
|
|
class CsvCostCalc
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->internal_percentage_to_deduct = getenv('PRICE_INTERNAL_PERCENTAGE_TO_DEDUCT');
|
|
$this->partner_organitation = strtolower(getenv('GITEA_PARTNER_ORGANIZATION'));
|
|
$this->CsvAgentCost = new CsvAgentCost();
|
|
$this->CsvTotalCostCalc = new CsvTotalCostCalc();
|
|
$this->CsvSumTotalsCalc = new CsvSumTotalsCalc();
|
|
}
|
|
|
|
|
|
function total_time_cost(array $array, int $total_time)
|
|
{
|
|
return $this->CsvTotalCostCalc->total_time_cost($array, $total_time);
|
|
}
|
|
|
|
function agent_cost_calc(array $array, array $company_agents, array $agents_time)
|
|
{
|
|
return $this->CsvAgentCost->agent_cost_calc($array, $company_agents, $agents_time);
|
|
}
|
|
|
|
function sum_costs(array $data, array $company_agents = [])
|
|
{
|
|
return $this->CsvSumTotalsCalc->sum_costs($data, $company_agents);
|
|
}
|
|
}
|