@extends('master.app') @section('title', 'Trial Balance') @section('body') @php $ok = abs((float)$totals['diff']) < 0.01; @endphp
{{-- HERO HEADER --}}
Trial Balance
Virtual Accounts from current modules • Base currency supported
Total Debit
Base
{{ number_format((float)$totals['debit'], 2) }}
Sum of all Debit balances
Total Credit
Base
{{ number_format((float)$totals['credit'], 2) }}
Sum of all Credit balances
Difference (Dr - Cr)
{{ $ok ? 'Balanced' : 'Not Balanced' }}
{{ number_format((float)$totals['diff'], 2) }}
If not balanced, check missing mappings or wrong ex_rate.
{{-- FILTER PANEL --}}
Filters
Tip: Click on group row to expand accounts
Reset
{{-- TABLE --}}
@php $lang = $filters['lang'] ?? 'en'; $name = function($r) use ($lang){ if($lang==='ps') return $r->title_ps ?: ($r->title_en ?: ''); if($lang==='dr') return $r->title_dr ?: ($r->title_en ?: ''); return $r->title_en ?: ($r->title_ps ?: ''); }; $badgeClass = function($type){ return match($type){ 'Asset' => 'asset', 'Liability' => 'liability', 'Equity' => 'equity', 'Income' => 'income', 'Expense' => 'expense', default => 'asset' }; }; $typeIcon = function($type){ return match($type){ 'Asset' => 'fa-building-columns', 'Liability' => 'fa-hand-holding-dollar', 'Equity' => 'fa-gem', 'Income' => 'fa-arrow-trend-up', 'Expense' => 'fa-receipt', default => 'fa-circle' }; }; @endphp @forelse($groups as $g) @foreach($g->items as $r) @endforeach @empty @endforelse
# Account Type Opening Period Dr Period Cr Trial Debit Trial Credit
{{ $g->type }} Group ({{ $g->items->count() }} accounts) {{ $g->type }} {{ number_format((float)$g->total_debit, 2) }} {{ number_format((float)$g->total_credit, 2) }}
No data found.
Grand Totals {{ number_format((float)$totals['debit'], 2) }} {{ number_format((float)$totals['credit'], 2) }}
@endsection