@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
{{-- {{ config('custom.main_account_coa')[$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'] }}
|
{{ ($trial_balance['debet']) }}
|
{{ ($trial_balance['credit']) }}
|
{{ ($ending_balance) }}
|
@endforeach
SUB TOTAL |
{{ ($sub_total_debet) }}
|
{{ ($sub_total_credit) }}
|
{{ ($sub_total_ending_balance) }} |
@endforeach
TOTAL |
{{ ($total_debet) }}
|
{{ ($total_credit) }}
|
{{ ($total_ending_balance) }} |