@php $balance = 0; @endphp @foreach($result as $row) @php $balance = ($row->amount > $balance)?($row->amount - $balance):($balance - $row->amount); @endphp @endforeach
TypeVch.NoDateDebitCreditBalance
{{$row->voucher_type}} {{$row->reference}} {{date('d-m-Y',strtotime($row->invoice_date))}} {{($row->transaction_type=='Dr')?$row->amount:''}} {{($row->transaction_type=='Cr')?$row->amount:''}}{{number_format($balance,2)}}
@if($balance > 0)Settle RV@endif