@extends('layouts.app') @section('content')

Trial Balance

@csrf
@csrf
@foreach($rows as $r) @endforeach
Account Code Account Name Debit Total Credit Total Balance
{{ $r['code'] }} {{ $r['name'] }} {{ number_format($r['debit'], 2) }} {{ number_format($r['credit'], 2) }} {{ number_format($r['balance'], 2) }}
Grand Totals {{ number_format($totals['debit'], 2) }} {{ number_format($totals['credit'], 2) }}
@if(!$balanced)
Warning: Debits and Credits do not match.
@endif
@endsection