$service = new AutoPlannogrammaService();
//$goals = $service->calculateFullGoalChain($filters);
//$forecast = $service->calculateFullForecastForWeek($filters);
- //$noHistoryProductData = $service->calculateSpeciesForecastForProductsWithoutHistory($filters['plan_date'], $filters);
-
$monthCategoryShare = $service->getMonthCategoryShareOrWriteOff($filters['plan_date'], $filters);
-
$monthCategoryGoal = $service->getMonthCategoryGoal($monthCategoryShare, $filters['plan_date']);
-
$monthSubcategoryShare = $service->getMonthSubcategoryShareOrWriteOff($filters['plan_date'], $filters);
-
$monthSubcategoryGoal = $service->getMonthSubcategoryGoal($monthSubcategoryShare, $monthCategoryGoal);
$monthSpeciesShare = $service->getMonthSpeciesShareOrWriteOff($filters['plan_date'], $filters);
$goals = $service->getMonthSpeciesGoalDirty($monthSpeciesShare, $monthSubcategoryGoal);
}
if ($sumPercent < 1.0) {
- $diff = 1.0 - round($sumPercent, 4);
+ $diff = 1.0 - round($sumPercent, 4);
$count = count($indices);
- $add = round($diff / $count, 4);
+ $add = round($diff / $count, 4);
foreach ($indices as $i) {
$result[$i]['share'] = round($result[$i]['share'] + $add, 6);
}