@php $summary = $summary ?? []; $boq = is_array($summary['boq'] ?? null) ? $summary['boq'] : []; $boqSummaries = is_array($boq['summaries'] ?? null) ? $boq['summaries'] : []; $boqSummaryRows = is_array($boq['summary_rows'] ?? null) ? $boq['summary_rows'] : []; $boqSchemeLabel = trim((string) ($boq['scheme_label'] ?? '')); $boqTotalCap = (string) ($boq['total_capital_million'] ?? '0.0000'); $empty = '—'; $estLabel = $summary['estimated_label'] ?? 'Estimated Cost as per Book'; @endphp

Read-only snapshot from the approved PC this revision is based on. Values below do not affect your current entries.

{{ $estLabel }}
{{ $summary['plan_estimated'] ?? $empty }}
PKR
Proposed Cost
{{ $summary['proposed_cost'] ?? $empty }}
PKR
Capital Cost
{{ $summary['plan_capital'] ?? $empty }}
PKR
Revenue Cost
{{ $summary['plan_revenue'] ?? $empty }}
PKR
Capital Local Cost{{ $summary['capital_stats']['local'] ?? '0' }} Total Cost{{ $summary['capital_stats']['total'] ?? '0' }}
@if(!empty($summary['capital_coa_html'])) {!! $summary['capital_coa_html'] !!} @else

{{ $empty }}

@endif
Revenue Local Cost{{ $summary['revenue_stats']['local'] ?? '0' }} Total Cost{{ $summary['revenue_stats']['total'] ?? '0' }}
@if(!empty($summary['revenue_coa_html'])) {!! $summary['revenue_coa_html'] !!} @else

{{ $empty }}

@endif
Cost Estimates
@if(count($boqSummaries))
@if($boqSchemeLabel !== '' && $boqSchemeLabel !== $empty)

Scheme: {{ $boqSchemeLabel }}

@endif
@foreach($boqSummaries as $entry) @php $rows = is_array($entry['summary_rows'] ?? null) ? $entry['summary_rows'] : []; $name = trim((string) ($entry['boq_name'] ?? '')); if ($name === '') { $name = 'Cost Estimate #'.(string) ($entry['boq_project_id'] ?? ''); } $viewUrl = trim((string) ($entry['view_boq_url'] ?? '')); @endphp
{{ $name }}
@if($viewUrl !== '') View Cost Estimate @endif
@include('pc-forms.partials.pci-boq-summary-rows', ['rows' => $rows])
@endforeach
Total Capital Cost (Million Rs.)
@elseif(count($boqSummaryRows))
@if($boqSchemeLabel !== '' && $boqSchemeLabel !== $empty)

Scheme: {{ $boqSchemeLabel }}

@endif
@include('pc-forms.partials.pci-boq-summary-rows', ['rows' => $boqSummaryRows])
Total Capital Cost (Million Rs.)
@else

{{ $empty }}

@endif