@extends('layouts.app') @section('title', 'Trial Balance') @include('inventory.accounting.partials.styles') @section('content')

Trial Balance

{{ \Carbon\Carbon::parse($from)->format('M j') }} – {{ \Carbon\Carbon::parse($to)->format('M j, Y') }}

@include('inventory.accounting.partials.sub-nav')
@forelse($trial['rows'] as $r) @empty @endforelse
CodeNameTypeDebitCredit
{{ $r['code'] }} {{ $r['name'] }} {{ str_replace('_',' ', $r['type']) }} {{ $r['debit'] > 0 ? number_format($r['debit'], 2) : '' }} {{ $r['credit'] > 0 ? number_format($r['credit'], 2) : '' }}
No activity in this period.
Totals {{ number_format($trial['total_debit'], 2) }} {{ number_format($trial['total_credit'], 2) }}
@if(abs($trial['total_debit'] - $trial['total_credit']) > 0.01)
Out of balance by {{ number_format(abs($trial['total_debit'] - $trial['total_credit']), 2) }}
@else
Balanced ✓
@endif
@endsection