@extends('layouts.app') @section('title', 'Trial Balance') @section('content') {{-- ✅ Header Section --}}

Trial Balance

View and export the trial balance for a specific period.

{{-- ✅ Success Alert --}} @if (session('success')) @endif {{-- ✅ Filter & Export Bar --}}
{{-- From Date --}}
{{-- To Date --}}
{{-- Action Buttons --}}
Filter
PDF Excel
{{-- ✅ Table Card --}}
@forelse($rows as $row) {{-- ✅ Debit Amount (Red) --}} {{-- ✅ Credit Amount (Green) --}} @empty @endforelse {{-- ✅ Footer (Total Row) --}} @if (count($rows) > 0) @endif
Code Account Name Debit Credit
{{ $row['code'] }} {{ $row['name'] }} {{ $row['debit'] > 0 ? number_format($row['debit'], 2) : '—' }} {{ $row['credit'] > 0 ? number_format($row['credit'], 2) : '—' }}
No posted entries found

There are no transactions in the selected period.

Total {{ number_format($total_debit, 2) }} {{ number_format($total_credit, 2) }}
{{-- ✅ Balance Status (Modern Alert) --}}
@if ($balanced)
Balanced Debit and Credit totals match perfectly.
@else
Out of Balance Investigate immediately! Total debit and credit do not match.
@endif
@endsection