@extends('layouts.admin') @section('title', 'Trial Balance') @section('page-title', 'Trial Balance') @section('header-actions') download Export CSV @endsection @section('content')

Trial Balance

Period: {{ \Carbon\Carbon::parse($dateFrom)->format('M d, Y') }} to {{ \Carbon\Carbon::parse($dateTo)->format('M d, Y') }}

@php $totalDebit = 0; $totalCredit = 0; @endphp @foreach($trialBalance as $item) @php $totalDebit += $item['debit']; $totalCredit += $item['credit']; @endphp @endforeach
Account Code Account Name Type Debit Credit Balance
{{ $item['account']->code }} {{ $item['account']->name }} {{ ucfirst($item['account']->type) }} {{ number_format($item['debit'], 2) }} {{ number_format($item['credit'], 2) }} {{ number_format($item['balance'], 2) }}
Total {{ number_format($totalDebit, 2) }} {{ number_format($totalCredit, 2) }}
@endsection