@once @push('stylesheets') @endpush @endonce @php $pciIvEdit = canField('pc-forms', 'project_brief_descriptions', 'edit'); $pciIvDisplayMillion = fn (mixed $raw): string => app(\App\Services\PC\PcFormService::class)->formatPcIiiMillionForFormDisplay($raw, $pciIvEdit); $pciIvSrc = $pcForm ?? null; $pciIvFill = $pciCrudDraftFill ?? []; $pciIvPhysical = old('pc_iv_structural_physical_targets'); if (! is_array($pciIvPhysical)) { $pciIvPhysical = $pciIvSrc?->pc_iv_structural_physical_targets ?? ($pciIvFill['pc_iv_structural_physical_targets'] ?? []); if (! is_array($pciIvPhysical)) { $pciIvPhysical = []; } } $pciIvPhysicalRows = is_array($pciIvPhysical['rows'] ?? null) ? array_values($pciIvPhysical['rows']) : []; $pciIvItemwise = old('pc_iv_itemwise_expenditure'); if (! is_array($pciIvItemwise)) { $pciIvItemwise = $pciIvSrc?->pc_iv_itemwise_expenditure ?? ($pciIvFill['pc_iv_itemwise_expenditure'] ?? []); if (! is_array($pciIvItemwise)) { $pciIvItemwise = []; } } $pciIvItemwiseRows = is_array($pciIvItemwise['rows'] ?? null) ? array_values($pciIvItemwise['rows']) : []; if ($pciIvItemwiseRows === []) { $pciIvItemwiseRows = [[ 'description' => '', 'pci_total' => '', 'pci_local' => '', 'pci_fec' => '', 'actual_total' => '', 'actual_local' => '', 'actual_fec' => '', ]]; } $pciIvClimate = old('pc_iv_climate_co_benefit_expenditures'); if (! is_array($pciIvClimate)) { $pciIvClimate = $pciIvSrc?->pc_iv_climate_co_benefit_expenditures ?? ($pciIvFill['pc_iv_climate_co_benefit_expenditures'] ?? []); if (! is_array($pciIvClimate)) { $pciIvClimate = []; } } $pciIvClimateAdapt = is_array($pciIvClimate['adaptation'] ?? null) ? $pciIvClimate['adaptation'] : []; $pciIvClimateMit = is_array($pciIvClimate['mitigation'] ?? null) ? $pciIvClimate['mitigation'] : []; $pciIvDisplayQty = fn (mixed $raw): string => app(\App\Services\PC\PcFormService::class)->formatPcIiiQtyForFormDisplay($raw, $pciIvEdit); $pciIvPhysicalClimateWizardStep = (int) ($pciIvPhysicalClimateWizardStep ?? 8); $pciIvPhysicalClimateStepTitle = $pciIvPhysicalClimateStepTitle ?? '8. Physical Targets & Item-wise Planned & Actual Expenditure'; @endphp
{{-- 12. Physical Targets and Achievements --}}
@if($pciIvEdit)
@endif
@if($pciIvEdit)@endif @if(count($pciIvPhysicalRows) > 0) @foreach($pciIvPhysicalRows as $physIdx => $physRow) @php $physRow = is_array($physRow) ? $physRow : []; @endphp @if($pciIvEdit) @endif @endforeach @else @endif
S.No Items (as per PC-I) Unit Quantity Actual Achievements
{{ $physIdx + 1 }}
Select a scheme to load physical target rows from CSR Cost Estimate schedule lines, or add rows manually.
{{-- 13. Item-wise Planned & Actual Expenditure --}}
@if($pciIvEdit)
@endif
@if($pciIvEdit)@endif @foreach($pciIvItemwiseRows as $iwIdx => $iwRow) @php $iwRow = is_array($iwRow) ? $iwRow : []; @endphp @if($pciIvEdit) @endif @endforeach
S.No Items (As per PC-I) PC-I Estimates Actual Expenditure
Total Local FEC Total Local FEC
{{ $iwIdx + 1 }}

Climate adaptation / mitigation capital expenditures (extra detail) continue in the table below.

{{-- Climate co-benefit capital expenditures (extra; aligns with item 13 climate rows) --}}

Values scaled in PKR millions (2 decimal places).

@foreach([ 'adaptation' => 'Adaptation', 'mitigation' => 'Mitigation', ] as $clKey => $clLabel) @php $clSaved = $clKey === 'adaptation' ? $pciIvClimateAdapt : $pciIvClimateMit; @endphp @endforeach
Items (As per PC-I) PC-I Estimates Actual Expenditure
Local FEC Total Local FEC Total
{{ $clLabel }}