Date : {!! date('d/m/Y') !!}

Driver Loss Statements - {{$driver->driver}}

{{----}} {{--*/ $dr_amount = 0 /*--}} {{--*/ $cr_amount = 0 /*--}} {{--*/ $dr_total = 0 /*--}} {{--*/ $cr_total = 0 /*--}} {{--*/ $total_quantity = 0 /*--}} @foreach($transactions as $transaction) @if($transaction->type == 'DEBITED') {{--*/ $dr_amount = $transaction->amount /*--}} {{--*/ $dr_total += $transaction->amount /*--}} {{--*/ $cr_amount = 0 /*--}} @elseif($transaction->type == 'CREDITED') {{--*/ $cr_amount = $transaction->amount /*--}} {{--*/ $cr_total += $transaction->amount /*--}} {{--*/ $dr_amount = 0 /*--}} @endif {{--*/ $total_quantity += $cr_amount - $dr_amount /*--}} {{----}} @if($total_quantity >= 1) @else @endif @endforeach
 Date Ref# Narration Dr Cr Total
 {{\Carbon\Carbon::parse($transaction->date)->day}}/{{\Carbon\Carbon::parse($transaction->date)->month}}/{{\Carbon\Carbon::parse($transaction->date)->year}} {{$transaction->document_number}} {{$transaction->description}} {{number_format($dr_amount)}} {{number_format($cr_amount)}}{{number_format($total_quantity)}}({{number_format(-1*$total_quantity)}})