@if(count($main_trial_balances) > 0)
@if($cetak) @else {{-- --}} @endif

{{$title}}

Closing Period: {{ date('F d, Y', strtotime($startdate)) }} - {{ date('F d, Y', strtotime($enddate)) }}

Transaction Journal Vouchers

@if($cetak) {{--
Journal Entry:{{ date('d-m-y', strtotime($draft->journal_entry)) }}
Reference No:{{ $draft->reference_no }}
Description:{{ $draft->description }}
--}} @endif @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 @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 @endforeach @endforeach
Account-No Description Debet Credit Ending Balance
{{@$main_accounts[$main]}} - {{$main}}
{{ $trial_balance['account_no'] }} {{ $trial_balance['description'] }} {{ number_format($trial_balance['debet'], 2) }} {{ number_format($trial_balance['credit'], 2) }} {{ number_format($ending_balance, 2) }}
SUB TOTAL {{ number_format($sub_total_debet, 2) }} {{ number_format($sub_total_credit, 2) }} {{ number_format($sub_total_ending_balance, 2) }}
TOTAL {{ number_format($total_debet, 2) }} {{ number_format($total_credit, 2) }} {{ number_format($total_ending_balance, 2) }}
@else

NO DATA

@endif