{{--*/ $charges = 0 /*--}} {{--*/ $penalty = 0 /*--}} {{--*/ $total = 0 /*--}} @foreach($traffic_offences as $index=>$traffic_offence) {{--*/ $charges += $traffic_offence->charges /*--}} {{--*/ $penalty += $traffic_offence->penalty /*--}} {{--*/ $total += $traffic_offence->penalty+$traffic_offence->charges /*--}} @endforeach
S/N Reference # Date Truck Driver Licence # Traffic Offence Charges Penalty Total
{{++$index}} {{$traffic_offence->reference_number}} {{\Carbon\Carbon::parse($traffic_offence->issued_date)->format('d-m-Y')}} {{$traffic_offence->truck}} {{$traffic_offence->driver}} {{$traffic_offence->driver_licence}} {{$traffic_offence->traffic_offence}} {{number_format($traffic_offence->charges)}} {{number_format($traffic_offence->penalty)}} {{number_format($traffic_offence->charges+$traffic_offence->penalty)}}
TOTAL {{number_format($charges,2)}} {{number_format($penalty,2)}} {{number_format($total,2)}}