@foreach($data as $key => $value)

{{ $value['site']['fullname'] }}

{{ $value['service_config_details']['description'] }} ( @if (count($value['previous_consumptions']) > 0) {{ date('d/m/Y', strtotime($value['previous_consumptions'][0]['survey_start_date'])) }} - {{ date('d/m/Y', strtotime($value['survey_start_date'])) }} @else {{ date('d/m/Y', strtotime($value['lot']['last_reading_date'])) }} - {{ date('d/m/Y', strtotime($value['survey_start_date'])) }} @endif )

Document Number Lot Number Date
{{ $value['id'] }} {{ $value['lot']['lot_no'] }} {{ date('d/m/Y', strtotime($value['survey_end_date'])) }}
Lot Owner: {{ $value['lot']['lot_owner']['name'] }}
Address: {{ $value['lot']['lot_owner']['address'] }}

Meter Reading Data

Previous Current Consumption
Date @if(count($value['previous_consumptions']) > 0) {{ date("d/m/Y", strtotime($value['previous_consumptions'][0]['survey_start_date'])) }} @else {{ date("d/m/Y", strtotime($value['lot']['last_reading_date'])) }} @endif {{ date("d/m/Y", strtotime($value['survey_start_date'])) }}
Meter Reading {{ $value['previous_unit'] }} @if($value['service_type_id'] == 1) m3 @elseif($value['service_type_id'] == 2) kWh @elseif($value['service_type_id'] == 3) m3 @else units @endif {{ $value['current_unit'] }} @if($value['service_type_id'] == 1) m3 @elseif($value['service_type_id'] == 2) kWh @elseif($value['service_type_id'] == 3) m3 @else units @endif {{-- {{ $value['current_unit'] - $value['previous_unit'] }} --}} {{-- {{ $value['units_consumed'] }} --}} {{ (float)number_format($value['units_consumed'], 2, '.', '') }} @if($value['service_type_id'] == 1) m3 @elseif($value['service_type_id'] == 2) kWh @elseif($value['service_type_id'] == 3) KG @else units @endif
Last 3 Consumptions: @foreach ($value['previous_consumptions'] as $session) {{ date("d/m/Y", strtotime($session['survey_end_date'])) }} - {{ number_format((float)$session['units_consumed'], 3, '.', '') }} @if($value['service_type_id'] == 1) m3 @elseif($value['service_type_id'] == 2) kWh @elseif($value['service_type_id'] == 3) m3 @else units @endif | @endforeach {{-- Nov,18 - 45 | Dec,18 - 45 | Jan,18 - 45 --}}

Notes

{!! nl2br( e($value['service_config_details']['custom_message'])) !!}
Generated with Snap & Bill — www.snapnbill.com
@if(count($data) > 1)
@endif @endforeach