STATEMENTS OF ACCOUNTS
FROM {{\Carbon\Carbon::parse($date[0])->toFormattedDateString()}} TO {{\Carbon\Carbon::parse($date[1])->toFormattedDateString()}}
{{--*/ $balance_t = $open_balance['amount'] /*--}} @foreach($transactions as $transaction) @if($transaction['type'] =="CREDITED") {{--*/ $debit = 0 /*--}} {{--*/ $credit = $transaction['amount'] /*--}} @elseif($transaction['type'] =="DEBITED") {{--*/ $debit = $transaction['amount'] /*--}} {{--*/ $credit = 0 /*--}} @endif {{--*/ $balance_t = $balance_t - $debit + $credit /*--}} @endforeach
Date Description Ref. No Dr Cr Balance
OPEN BALANCE BEFORE {{$open_balance['date']}} {{number_format($open_balance['amount'],2)}}
{{\Carbon\Carbon::parse($transaction['date'])->toFormattedDateString()}} {{$transaction['document_number']}} {{number_format($transaction['amount'],2)}}{{number_format($transaction['amount'],2)}} @if($balance_t<0) ( {{number_format((-$balance_t),2)}} ) @else {{number_format($balance_t,2)}} @endif