@extends('layouts.backend') @section('content')

Reports — Revenue Ledger

Paid invoices only (status = paid). Each row is broken out into the five accounting classes: VAT, Duties, Excise, Tax, Services.

@php $cols = ['vat' => 'VAT', 'duties' => 'Duties', 'excise' => 'Excise', 'tax' => 'Tax', 'services' => 'Services']; $currencies = [1 => ['label' => 'GBP', 'symbol' => '£'], 2 => ['label' => 'EUR', 'symbol' => '€']]; @endphp @foreach($currencies as $cur => $curMeta)

{{ $curMeta['label'] }} ({{ $curMeta['symbol'] }})

{{-- Horizontal-scroll wrapper so narrow viewports can pan the ledger sideways instead of mashing columns into each other. The table itself enforces per-column min-widths via CSS so long numbers like "1,234,567.89" never overflow into a neighbour. --}}
@forelse($years as $y) @foreach($y->months as $m) @php $row = $m->ledger[$cur] ?? null; @endphp @if($row) @php $hasAny = ($row['vat'] + $row['duties'] + $row['excise'] + $row['tax'] + $row['services']) > 0; @endphp @if($hasAny) @endif @endif @endforeach @php $yt = $y->totals[$cur]; @endphp @empty @endforelse @php $g = $grandTotals[$cur]; @endphp
Year Month VAT Duties Excise Tax Services Total
{{ $y->year }} {{ $getThis->global()->monthName($m->month) }} {{ number_format($row['vat'], 2, '.', ',') }} {{ number_format($row['duties'], 2, '.', ',') }} {{ number_format($row['excise'], 2, '.', ',') }} {{ number_format($row['tax'], 2, '.', ',') }} {{ number_format($row['services'], 2, '.', ',') }} {{ number_format($row['total'], 2, '.', ',') }}
{{ $y->year }} Year total {{ number_format($yt['vat'], 2, '.', ',') }} {{ number_format($yt['duties'], 2, '.', ',') }} {{ number_format($yt['excise'], 2, '.', ',') }} {{ number_format($yt['tax'], 2, '.', ',') }} {{ number_format($yt['services'], 2, '.', ',') }} {{ number_format($yt['total'], 2, '.', ',') }}
No paid invoices in {{ $curMeta['label'] }} yet.
Grand Total {{ number_format($g['vat'], 2, '.', ',') }} {{ number_format($g['duties'], 2, '.', ',') }} {{ number_format($g['excise'], 2, '.', ',') }} {{ number_format($g['tax'], 2, '.', ',') }} {{ number_format($g['services'], 2, '.', ',') }} {{ number_format($g['total'], 2, '.', ',') }}
@endforeach

Generated {{ $generatedAt }} · Categorisation rules: items containing "EXCISE" → Excise · "DUTY"/"DUTIES" → Duties · "VAT" → VAT · "TAX" → Tax · everything else → Services.

@endsection