STATEMENT OF ACCOUNT
CLIENT: {{$client->name}}
ADDRESS: {{$client->address}} {{$client->region}} PHONE: {{$client->phone}}
DATE FROM: {{\Carbon\Carbon::parse($date[0])->toFormattedDateString()}} DATE TO: {{\Carbon\Carbon::parse($date[1])->toFormattedDateString()}}
OPEN BALANCE({{$open_balance['currency']}}): {{number_format($open_balance['amount'],2)}} CLOSE BALANCE({{$close_balance['currency']}}): {{number_format($close_balance['amount'],2)}}
{{--*/ $balance_t = $open_balance['amount'] /*--}} @if($open_balance['amount'] >=0) @else @endif @foreach($transactions as $transaction) @if($transaction['type'] =="DEBITED") {{--*/ $debit = 0 /*--}} {{--*/ $credit = $transaction['amount'] /*--}} @elseif($transaction['type'] =="CREDITED") {{--*/ $debit = $transaction['amount'] /*--}} {{--*/ $credit = 0 /*--}} @endif {{--*/ $balance_t = $balance_t - $debit + $credit /*--}} @endforeach
DATE DESCRIPTION REF. No Dr Cr BALANCE
{{\Carbon\Carbon::parse($open_balance['date'])->toFormattedDateString()}} OPEN BALANCE{{number_format($open_balance['amount'],2)}} {{number_format($open_balance['amount'],2)}} {{number_format($open_balance['amount']*-1,2)}} ({{number_format($open_balance['amount']*-1,2)}})
{{\Carbon\Carbon::parse($transaction['date'])->toFormattedDateString()}} {{$transaction['description']}} {{$transaction['document']}} {{$transaction['document_number']}}{{number_format($transaction['amount'],2)}} {{number_format($transaction['amount'],2)}} @if($balance_t<0) ( {{number_format(($balance_t*-1),2)}} ) @else {{number_format($balance_t,2)}} @endif