@extends('layouts.app') @section('title', 'Trial balance') @section('content')

Trial balance

All posted and reversed entries up to {{ $to->format('d M Y') }}.

Ledger
@include('components.kpi', ['label' => 'Total debits', 'value' => money($totalDebit), 'variant' => 'info']) @include('components.kpi', ['label' => 'Total credits', 'value' => money($totalCredit), 'variant' => 'info']) @include('components.kpi', [ 'label' => 'In balance', 'value' => abs($totalDebit - $totalCredit) < 0.005 ? 'Yes' : 'No', 'variant' => abs($totalDebit - $totalCredit) < 0.005 ? 'good' : 'bad', ])

Accounts with movement

@if ($rows->isEmpty()) @include('components.empty-state', [ 'icon' => '⚖', 'title' => 'Nothing to balance', 'message' => 'No posted entries on or before the selected date.', ]) @else @foreach ($rows as $row) @endforeach
CodeAccountType DebitCredit
{{ $row['account']->code }} {{ $row['account']->name }} {{ title_case_words($row['account']->type) }} {{ $row['debit'] > 0 ? money($row['debit']) : '' }} {{ $row['credit'] > 0 ? money($row['credit']) : '' }}
Totals {{ money($totalDebit) }} {{ money($totalCredit) }}
@endif
@endsection