@extends('master.app') @section('title','Tax Summary') @section('body') @php $fmt = fn($n)=> number_format((float)$n,2); @endphp @push('styles') @endpush
Tax Summary {{ $filters['mode'] ?? 'monthly' }} • {{ $filters['year'] }} Currency: {{ $filters['currency_id'] ?: 'All' }}
Source: texes table (amount * ex_rate for base)
Records
{{ (int)($totals['count'] ?? 0) }}
Total Amount
{{ $fmt($totals['amount'] ?? 0) }}
Total Base
{{ $fmt($totals['base'] ?? 0) }}
{{-- Filters --}}
Filters
Monthly or Annual
Only affects data filter, not annual mode.
{{-- Summary Table --}}
Summary
Rows: {{ $rows->count() }}
@forelse($rows as $r) @php $cur = $currencyLookup[$r['currency_id']] ?? null; $curName = $cur->title_en ?? $cur->title_ps ?? ('CUR #'.$r['currency_id']); @endphp @empty @endforelse @if($rows->count()) @endif
Period Currency Count Total Amount Total Base
{{ $r['period'] }} {{ $curName }} {{ $r['count'] }} {{ $fmt($r['total_amount']) }} {{ $fmt($r['total_base']) }}
No data found.
Totals {{ (int)($totals['count']??0) }} {{ $fmt($totals['amount']??0) }} {{ $fmt($totals['base']??0) }}
{{-- Detail List --}} @if(($filters['detail']??0)==1)
Detail
{{ $detail->count() }} rows
@forelse($detail as $d) @php $cur = $currencyLookup[$d->currency_id] ?? null; $curName = $cur->title_en ?? $cur->title_ps ?? ('CUR #'.$d->currency_id); $ex = (float)($d->ex_rate ?: 1); $base = (float)$d->amount * $ex; @endphp @empty @endforelse
Date Title Currency Amount Ex Rate Base Status
{{ $d->date }} {{ $d->title }} {{ $curName }} {{ $fmt($d->amount) }} {{ $fmt($ex) }} {{ $fmt($base) }} {{ $d->status }}
No detail rows.
@endif
@endsection