id)->whereIsarchived(1)->orderBy('budget_date', 'desc')->get(); ?> @foreach ($projectMonthBudgets as $projectMonthBudget) getAllMonthCost($projectMonthBudget->budget_date); $cellBgColor = ''; $divergence = round(($projectMonthBudget->month_plan/100 - $projectMonthCost), 2); if($divergence > 0){ $cellBgColor = '#99FFCC;'; }elseif ($divergence < 0) { $cellBgColor = '#FF6666;'; }else{ $cellBgColor = '#CCCCCC;'; } ?> @endforeach
Дата формирования: {{ date('d.m.Y') }}
Помесячный контроль план-факта
Месяц План Факт Отклонение
аб., руб.
Отклонение
относ., %
{{ $workProject->getMonthName($projectMonthBudget->budget_date) }} {{ $projectMonthBudget->month_plan/100 }} {{ round($projectMonthCost, 2) }} {{ $divergence }} {{ ($projectMonthBudget->month_plan)? round( 100*$divergence/($projectMonthBudget->month_plan/100), 2 ):0 }}