@php
ini_set('max_execution_time', 0);
$total = 0;
$sub_total = 0;
$grand_total = 0;
$total_payable_amount = 0 ;
$setting = new App\Setting();
@endphp
@foreach($houses_detail as $house)
@php $total = 0; @endphp
| {{App\Language::trans('Unit')}} : {{$house['house_unit']}} |
@foreach($house['house_rooms'] as $room)
@if($leaf_room_id !=0)
@if($room['id_house_room'] != $leaf_room_id)
@php
continue;
@endphp
@endif
@endif
@php
$sub_total = 0;
$isMeterRegister = false;
$isFirstRoomHeader = true;
$rowNo = 0;
$index = 0;
$reading_data = isset($listing[$room['meter']['id']]) ? $listing[$room['meter']['id']] : array();
@endphp
@foreach($reading_data as $row)
@if($row->meter_register_id == $room['meter']['id'])
@if($isFirstRoomHeader == true)
| {{App\Language::trans('Room') . ' : ' . $room['house_room_name']}} |
{{App\Language::trans('Meter Id').' : '.$room['meter']['id']}} |
@endif
@php
$payable_amount = App\Setting::calculate_utility_fee($row->total_usage);
$isFirstRoomHeader = false;
$isMeterRegister = true;
$total_payable_amount += $payable_amount;
@endphp
| {{($index + 1)}} |
{{$setting->convert_encoding($setting->getDate($row->current_date))}} |
{{$setting->convert_encoding($row->time_started)}} |
{{$setting->convert_encoding($row->time_ended)}} |
{{$setting->convert_encoding($row->last_meter_reading)}} |
{{$setting->convert_encoding($row->current_meter_reading)}} |
{{$setting->convert_encoding($row->current_usage)}} |
@php
$total += $row->current_usage;
$sub_total += $row->current_usage;
$grand_total += $row->current_usage;
$index++;
@endphp
@endif
@endforeach
@if($isMeterRegister == false)
| {{App\Language::trans('Room') . " " . $room['house_room_name']}} |
{{App\Language::trans(App\Setting::SUNWAY_NO_METER_FOUND_LABEL)}} |
@else
| {{$setting->convert_encoding(App\Language::trans('Sub-total')) . ' : '}} |
{{$setting->convert_encoding($setting->getDouble($sub_total))}} |
|
@endif
@php
$isMeterRegister = false;
@endphp
@endforeach
@endforeach