@extends('printlayout') @section('content') @php $runningDebit = 0; $runningCredit = 0; $runningBalance = 0; // Function for formatting accounting values if (!function_exists('formatAccounting')) { function formatAccounting($amount) { return $amount < 0 ? '(' . number_format(abs($amount), 2) . ')' : number_format($amount, 2); } } @endphp

{{ __('sitelabel.TrialBalanceReport') }}

Year : {{ $YearNo }} Month : {{ $MonthName }}
@foreach ($ledgerentries as $item) @if (!isset($item->ChildAccounts) || $item->ChildAccounts->isEmpty()) @php $runningDebit += $item->TotalDebit; $runningCredit += $item->TotalCredit; $runningBalance += ($item->TotalDebit - $item->TotalCredit); @endphp @endif @endforeach
{{ __('sitelabel.Account') }} {{ __('sitelabel.TotalDebit') }} {{ __('sitelabel.TotalCredit') }} {{ __('sitelabel.TotalBalance') }}
{{ $item->Name }} {{ formatAccounting($item->TotalDebit) }} {{ formatAccounting($item->TotalCredit) }} {{ formatAccounting($runningBalance) }}
{{ __('sitelabel.GrandTotal') }} {{ formatAccounting($runningDebit) }} {{ formatAccounting($runningCredit) }} {{ formatAccounting($runningBalance) }}
@include('sign-subview.signandbuttons') @endsection @section('script') @endsection