Cost Control Monthly Data Entry Cost Control
@csrf
Month Year Company

@csrf {{-- --}} {{-- @php $rowSpanData = []; @endphp @forelse ($cost_controls as $key => $cost_control) @php $previousCostControl = isset($cost_controls[$key - 1]) ? $cost_controls[$key - 1] : null; $nextCostControl = isset($cost_controls[$key + 1]) ? $cost_controls[$key + 1] : null; $sameGroup = $previousCostControl && ($previousCostControl->department_id === $cost_control->department_id) && ($previousCostControl->kra_id === $cost_control->kra_id) && ($previousCostControl->kpi_id === $cost_control->kpi_id) && ($previousCostControl->units === $cost_control->units) && ($previousCostControl->sources_of_informations === $cost_control->sources_of_informations); @endphp @if ($sameGroup) @php $rowSpanData[$key]['rowspan'] = $rowSpanData[$key - 1]['rowspan'] + 1; @endphp @else @php $rowSpanData[$key]['rowspan'] = 1; @endphp @endif @if ($rowSpanData[$key]['rowspan'] === 1) @endif @empty @endforelse --}} @php $previousKraId = []; $previousKpiId = []; @endphp @forelse ($cost_controls as $cost_control) @if (!in_array($cost_control->kra_id, $previousKraId)) @else @endif @if (!in_array($cost_control->kra_id, $previousKraId)) @php array_push($previousKraId, $cost_control->kra_id); @endphp @else @endif @if (!in_array($cost_control->kpi_id, $previousKpiId)) @php array_push($previousKpiId, $cost_control->kpi_id); @endphp @else @endif {{-- --}} @empty @endforelse
Cost Control Monthly Data Entry
Department KRA KPIBenchmark / Target UnitSource Buyers Amount / Values %
{{ $cost_control->department->name }} {{ $cost_control->kra->name }} {{ $cost_control->kpi->name }} {{ $cost_control->bench_mark_target }} {{ $cost_control->units }} {{ $cost_control->sources_of_informations }} {{ $cost_control->buyer->name }}
No data found
{{ $cost_control->department->name }} {{ $cost_control->kra->name }} {{ $cost_control->kpi->name }} {{ $cost_control->bench_mark_target }} {{ $cost_control->units }} {{ $cost_control->sources_of_informations }} {{ $cost_control->buyer->name }}
No data found
Save