{{-- Variance Analysis (cash collected vs target, by region) in the house PDF style. --}} @extends('layouts.PdfReportLayout') @section('doc_title', 'Variance Analysis') @section('doc_subtitle', $docSubtitle) @section('meta') Period {{ $periodLabel }} Financial Year {{ $fiscalLabel }} Covering {{ $periodRange }} Regions Shown {{ number_format(count($rows)) }} Region {{ $regionLabel }} Generated {{ $generatedAt }} Prepared By {{ $generatedBy }} @endsection @section('content')
Collections Against Target
@forelse($rows as $index => $row) {{-- mPDF paints no background behind an inline span, so above/below target is carried by the text colour on the cell itself. --}} @empty @endforelse @if(count($rows) > 0) @endif
# Region Collected Target Variance Variance %
{{ $index + 1 }} {{ $row['name'] }} {{ $money($row['collected']) }} {{ $money($row['target']) }} {{ $money($row['variance']) }} {{ $row['pct'] === null ? '-' : $money($row['pct']) . '%' }}
Nothing to compare for this selection.
Total {{ $money($totals['collected']) }} {{ $money($totals['target']) }} {{ $money($totals['variance']) }} {{ $totals['pct'] === null ? '-' : $money($totals['pct']) . '%' }}
{{-- Colours go inline: mPDF does not reliably apply the layout's descendant class selectors (.totals .t-pass) to these cells. --}}
Total Collected
{{ $money($totals['collected']) }}
Total Target
{{ $money($totals['target']) }}
Overall Variance
{{ $money($totals['variance']) }}
Basis: collected figures are real cash received in this period, on the date it arrived. The target is the actual target set for every month the period covers. Amounts are in Tanzanian Shillings; a variance percentage reads — where no target was set.
@endsection