@extends('commons.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal','method'=>'get']) !!}

{{App\Language::trans('Filter By')}}

{!! Form::label('month_started', App\Language::trans('From Month'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('month_started', App\MeterInvoice::previous_one_year_combobox(), (old('month_started') ? old('month_started'):$model->three_month_pass()), ['class'=>'form-control','autofocus']) !!} {!!$errors->first('month_started', '')!!}
{!! Form::label('month_ended', App\Language::trans('To Month'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('month_ended', App\MeterInvoice::previous_one_year_combobox(), (old('month_ended') ? old('month_ended'):$model->last_month()), ['class'=>'form-control']) !!} {!!$errors->first('month_ended', '')!!}
{!! Form::label('leaf_house_id', App\Language::trans('House No.'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('leaf_house_id', App\PowerMeterModel\MeterRegister::houses_combobox(), null, ['class'=>'form-control','autofocus','onchange'=>'init_room_combobox(this)']) !!} {!!$errors->first('leaf_house_id', '')!!}
{!! Form::label('leaf_room_id', App\Language::trans('Room No.'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('leaf_room_id', App\PowerMeterModel\MeterRegister::rooms_combobox((old('leaf_house_id') ? old('leaf_house_id'):$model->leaf_house_id)), null, ['class'=>'form-control','onchange'=>'init_room_status(this)']) !!} {!!$errors->first('leaf_room_id', '')!!}
{!! Form::label('export_by', App\Language::trans('Export By'), ['class'=>'control-label col-md-4']) !!}
{!!$errors->first('export_by', '')!!}
{!! Form::close() !!} @if(count($listing))

{{App\Language::trans('Listing Information')}}

@php $x=0; $total_payable_amount = 0; @endphp @foreach($houses_detail as $house) @foreach($house['house_rooms'] as $room) @php $isMeterRegister = false; $isFirstRoomHeader = true; $rowNo =0; $room_subtotal =0; $total_payable_amount = 0; $room_subtotal_total_usage =0; @endphp @foreach($listing as $row) @if(!isset($room['meter']['id'])) @php break; @endphp @elseif($row->meter_register_id == $room['meter']['id']) @if($isFirstRoomHeader == true) @endif @php $payable_amount = App\Setting::calculate_utility_fee($row->total_usage); $isFirstRoomHeader = false; $isMeterRegister = true; $total += $row->total_usage; $room_subtotal += $payable_amount; $room_subtotal_total_usage += $row->total_usage; @endphp @endif @php $rowNo++; @endphp @endforeach @if(isset($room['meter']['id'])) @endif @php $x = $x + $room_subtotal; $isMeterRegister = false; @endphp @endforeach @endforeach
{{App\Language::trans('Month')}} {{App\Language::trans('Total Hours')}} {{App\Language::trans('Avg. kW')}} {{App\Language::trans('Max. kW')}} {{App\Language::trans('Min. kW')}} {{App\Language::trans('Total kWh')}} {{App\Language::trans('Total Charges (RM)')}}
{{App\Language::trans('House')}} : {{$house['house_unit']}}
{{App\Language::trans('Room')}} : {{$room['house_room_name']}} {{App\Language::trans(App\Setting::SUNWAY_NO_METER_FOUND_LABEL)}}
{{App\Language::trans('Room')}} : {{$room['house_room_name']}} {{App\Language::trans('Meter ID')}} : {{$listing[$rowNo]->meter_register_id}}
{{date('m-Y', strtotime($row->current_date))}} {{$row->total_hours}} {{number_format($row->average_usage,9)}} {{number_format($row->max_usage,9)}} {{number_format($row->min_usage,9)}} {{number_format($row->total_usage,9)}} {{number_format($payable_amount,2)}}
{{App\Language::trans('Room Subtotal')}} {{number_format($room_subtotal_total_usage, 9)}} {{number_format($room_subtotal, 2)}}
{{App\Language::trans('Total')}}: {{number_format($total, 9)}} {{number_format($x,2)}}
@elseif(count($listing) == 0 && $is_search_result == true) @include('commons.report_modules.no_data_found') @endif @stop @section('script') $(".input-daterange").datepicker({ format: "dd-mm-yyyy", }); @stop