@extends('layouts.app') @section('title', 'Trial Balance') @section('page-title', 'Trial Balance') @section('content')
Download PDF

Trial Balance

As of {{ now()->format('d M Y') }} | FY {{ auth()->user()->tenant->profile?->current_financial_year }}

@if($data['is_balanced']) ✓ Balanced @else ⚠ Not Balanced @endif
@php $lastType = ''; @endphp @foreach($data['rows'] as $row) @if($row['type'] !== $lastType) @php $lastType = $row['type']; @endphp @endif @endforeach
Code Account Name Type Debit (₹) Credit (₹)
{{ ucfirst($row['type']) }}
{{ $row['code'] }} {{ $row['name'] }} {{ $row['type'] }} {{ $row['debit'] > 0 ? number_format($row['debit'], 2) : '—' }} {{ $row['credit'] > 0 ? number_format($row['credit'], 2) : '—' }}
TOTAL ₹{{ number_format($data['total_debit'], 2) }} ₹{{ number_format($data['total_credit'], 2) }}
@if(!$data['is_balanced'])

⚠ Trial balance is off by ₹{{ number_format(abs($data['total_debit'] - $data['total_credit']), 2) }}. This may indicate missing journal entries.

@endif
@endsection