@foreach ($doubleEntryArray as $doubleEntry) @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