@php
$total_debet = 0;
$total_credit = 0;
$total_ending_balance = 0;
@endphp
@foreach($main_trial_balances as $main => $sub_trial_balance)
@php
$sub_total_debet = 0;
$sub_total_credit = 0;
$sub_total_ending_balance = 0;
@endphp
{{@$main_accounts[$main]}} - {{$main}}
|
@foreach ($sub_trial_balance as $trial_balance)
@php
$total_debet += $trial_balance['debet'];
$total_credit += $trial_balance['credit'];
$ending_balance = ($trial_balance['debet'] - $trial_balance['credit'] );
$total_ending_balance += $ending_balance;
$sub_total_debet += $trial_balance['debet'];
$sub_total_credit += $trial_balance['credit'];
$sub_total_ending_balance += $ending_balance;
@endphp
{{ $trial_balance['account_no'] }}
|
{{ $trial_balance['description'] }}
|
{{ number_format($trial_balance['debet'], 2) }}
|
{{ number_format($trial_balance['credit'], 2) }}
|
{{ number_format($ending_balance, 2) }}
|
@endforeach
SUB TOTAL |
{{ number_format($sub_total_debet, 2) }}
|
{{ number_format($sub_total_credit, 2) }}
|
{{ number_format($sub_total_ending_balance, 2) }} |
@endforeach
TOTAL |
{{ number_format($total_debet, 2) }}
|
{{ number_format($total_credit, 2) }}
|
{{ number_format($total_ending_balance, 2) }} |