@extends('layouts.app', ['pageTitle' => 'Finance Reports', 'pageSubtitle' => 'Trial balance, income statement and balance sheet summary'])
@section('content')
<div class="grid grid-4"><div class="card stat"><div class="label">Income</div><div class="value">₦{{ number_format($income,2) }}</div></div><div class="card stat"><div class="label">Expenses</div><div class="value">₦{{ number_format($expenses,2) }}</div></div><div class="card stat"><div class="label">Net Profit</div><div class="value">₦{{ number_format($profit,2) }}</div></div><div class="card stat"><div class="label">Balance Check</div><div class="value">₦{{ number_format($assets - ($liabilities + $equity + $profit),2) }}</div></div></div>
<div class="grid grid-2"><div class="card"><h3 class="section-title">Balance Sheet</h3><p>Assets: <strong>₦{{ number_format($assets,2) }}</strong></p><p>Liabilities: <strong>₦{{ number_format($liabilities,2) }}</strong></p><p>Equity: <strong>₦{{ number_format($equity,2) }}</strong></p><p>Current Profit: <strong>₦{{ number_format($profit,2) }}</strong></p></div><div class="card"><h3 class="section-title">Income Statement</h3><p>Revenue: <strong>₦{{ number_format($income,2) }}</strong></p><p>Expenses: <strong>₦{{ number_format($expenses,2) }}</strong></p><p>Net: <strong>₦{{ number_format($profit,2) }}</strong></p></div></div>
<div class="card"><h3 class="section-title">Trial Balance</h3><div class="table-wrap"><table><thead><tr><th>Code</th><th>Account</th><th>Type</th><th>Balance</th></tr></thead><tbody>@foreach($accounts as $a)<tr><td>{{ $a->code }}</td><td>{{ $a->name }}</td><td>{{ $a->type }}</td><td>₦{{ number_format($a->current_balance,2) }}</td></tr>@endforeach</tbody></table></div></div>
@endsection
