Skip to content Search or jump to… Pull requests Issues Marketplace Explore @kyGohX Sign out Watch 2 Star 0 Fork 0 LeafSmart/leaf_webview Private Code Issues 0 Pull requests 0 Projects 1 Wiki Insights Tree: 5f0358b191 Find file Copy path leaf_webview/resources/views/utility_charges/reports/monthly_usages.blade.php 5f0358b on Aug 1 @kyGohX kyGohX Sunway power meter update 1 contributor RawBlameHistory 202 lines (173 sloc) 7.57 KB @extends('billings.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('Unit 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 $total_payable_amount = 0; @endphp @foreach($houses_detail as $house) @foreach($house['house_rooms'] as $room) @php $isMeterRegister = false; $isFirstRoomHeader = true; $rowNo =0 ; @endphp @foreach($listing as $row) @if($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; $total_payable_amount += $payable_amount; @endphp @endif @php $rowNo++; @endphp @endforeach @if($isMeterRegister == false) @endif @php $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('Meter Status')}} : {{$listing[$rowNo]->meter_register_id}}
{{date('m-Y', strtotime($row->current_date))}} {{$row->total_hours}} {{$row->average_usage}} {{$row->max_usage}} {{$row->min_usage}} {{$row->total_usage}} {{$payable_amount}}
{{App\Language::trans('Room')}} : {{$room['house_room_name']}} {{App\Language::trans('Meter is no yet registered in database or room')}}
{{App\Language::trans('Total')}}: {{number_format($total, 2)}} {{number_format($total_payable_amount, 2)}}
@endif @stop @section('script') $(".input-daterange").datepicker({ format: "dd-mm-yyyy", }); @stop © 2018 GitHub, Inc. Terms Privacy Security Status Help Contact GitHub Pricing API Training Blog About Press h to open a hovercard with more details.