@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 )

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

Meter Reading Data

Previous Current
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
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 --}}

Amount Due

@if ($value['wma_rate']) @endif @if ($value['load_rate']) @endif @if ($value['service_config_details']['meter_rental']) @endif @if ($value['service_config_details']['service_charge']) @endif
Item Rate Total
{{-- {{ $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) m3 @else units @endif Consumed @if ($value['rate_details']['method'] == 'variable_rate') {{ $value['rate_details']['name'] }} @else Rs {{ $value['per_unit_rate'] }} per @if ($value['service_type_id'] == 1) m3 @elseif($value['service_type_id'] == 2) kWh @elseif($value['service_type_id'] == 3) KG @else units @endif @endif {{ money_format_new('%!i', $value['bill_rate']) }}
WMA Charge {{ $value['wma_rate'] ? money_format_new('%!i', $value['wma_rate']) : '-' }}
Load Charge {{ $value['load_rate'] ? money_format_new('%!i', $value['load_rate']) : '-' }}
Meter Rental {{ money_format_new('%!i', $value['service_config_details']['meter_rental']) }}
Service Charge {{ money_format_new('%!i', $value['service_config_details']['service_charge']) }}
Total {{ money_format_new('%!i', $value['net_bill_value']) }}

Tariff Details

{{ $value['rate_details']['details'] }}

Notes

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