@foreach ($doubleEntryArray as $doubleEntry) {{-- @php dd($doubleEntry['arr']); @endphp @if ($priority == '' || $priority != $doubleEntry['arr'][0]->priority) @php $priority = $doubleEntry['arr'][0]->priority; $priorityRow = 1; if ($priorityRow == 1) { $priorityRow = 0; $mainAccName=$doubleEntry['arr'][0]->account_type; echo "

$mainAccName

"; } @endphp @endif --}}

{{ $doubleEntry['acc_code'] }}

{{ $doubleEntry['account_name'] }}


@php $count = 1; $debitTotal = 0; $creatidTotal = 0; $priority = ''; $priorityRow = 0; @endphp @foreach ($doubleEntry['arr'] as $value) @php $debitTotal += $value->debit; $creatidTotal += $value->credit; @endphp @endforeach
# Date Voucher No Description Debit Credit
Beginning Balance for period - -
{{ $count++ }} {{ $value->date }} {{ $value->voucher_no }} {{ $value->description }} {{ $value->debit != 0 ? number_format($value->debit, 2, '.', ',') : '' }} {{ $value->credit != 0 ? number_format($value->credit, 2, '.', ',') : '' }}
Total for Period {{ number_format($debitTotal, 2, '.', ',') }} {{ number_format($creatidTotal, 2, '.', ',') }}
Ending Balance for period {{ $debitTotal - $creatidTotal > 0 ? number_format($debitTotal - $creatidTotal, 2, '.', ',') : '' }} {{ $creatidTotal - $debitTotal > 0 ? number_format($creatidTotal - $debitTotal, 2, '.', ',') : ($creatidTotal - $debitTotal == 0 ?'0.00':'') }}


@endforeach