@extends('_version_02.commons.layouts.admin') @section('content') {!! Form::model($model, ['class'=>'form-horizontal']) !!} @include('_version_02.commons.layouts.partials._alert')
{{ App\Language::trans('Information') }}

{!! Form::label('status', App\Language::trans('Status'), ['class'=>'control-label col-md-4']) !!}
status ?? 1) == 1 ? 'checked' : '' }} class="custom-control-input">
status ?? 1) == 0 ? 'checked' : '' }} class="custom-control-input">
{!! $errors->first('status', '') !!}
{{--
{!! Form::label('is_sudsidy_distribute_directly', App\Language::trans('Is Distribute Complementary Directly For First Month ?'), ['class'=>'control-label col-md-12']) !!}
{!! $errors->first('is_sudsidy_distribute_directly', '') !!}
--}}
{!! Form::label('code', App\Language::trans('Code'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('code', null, ['class'=>'form-control']) !!} {!! $errors->first('code', '') !!}
{!! Form::label('text', App\Language::trans('Name'), ['class'=>'control-label col-md-4']) !!}
{!! Form::text('name', null, ['class'=>'form-control']) !!} {!! $errors->first('name', '') !!}
{!! Form::label('amount', App\Language::trans('Amount'), ['class'=>'control-label col-md-4']) !!}
{!! Form::number('amount', null, ['min'=>1,'max'=>9999,'step'=>'0.01','class'=>'form-control']) !!} {!! $errors->first('amount', '') !!}
{!! Form::label('implementation_date', App\Language::trans('Implementation Date'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('implementation_date', App\Setting::select_days_combobox(), null, ['class'=>'form-control']) !!} {!! $errors->first('implementation_date', '') !!}
@php $starting_date = $model->starting_date ? date('m-Y' , strtotime($model->starting_date)) : ''; $ending_date = $model->ending_date ? date('m-Y' , strtotime($model->ending_date)) : ''; echo ''; echo ''; @endphp
{!! Form::label('starting_date', App\Language::trans('From Month'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('starting_date', App\PowerMeterModel\MeterInvoice::previous_one_year_combobox(), null, ['class'=>'form-control','autofocus','id'=>'starting_date']) !!} {!! $errors->first('starting_date', '') !!}
{!! Form::label('ending_date', App\Language::trans('To Month'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('ending_date', App\PowerMeterModel\MeterInvoice::next_one_year_combobox(), null, ['class'=>'form-control','id'=>'ending_date']) !!} {!! $errors->first('ending_date', '') !!}
{{ App\Language::trans('Beneficial Selection') }}

{!! Form::label('room_type', App\Language::trans('Room Type'), ['class'=>'control-label col-md-4']) !!}
{!! Form::select('room_type', App\Setting::room_type_combobox(), null, ['class'=>'form-control','autofocus','onchange'=>'init_room_type_subsidize_handle(this)','id'=>'room_type']) !!} {!! $errors->first('room_type', '') !!}
@php $ids = strlen($model->subsidize_tenant_id ?? '') > 1 ? json_decode($model->subsidize_tenant_id,true) : null; @endphp
{!! Form::select( 'subsidize_tenant_id[]', App\Customer::combobox_from_leaf_by_room_type_member_id('single'), $ids, [ 'style' => 'width: 100%;', 'class' => 'form-control 3col active', 'id' => 'subsidize_tenant_id_single', 'multiple'=> 'multiple' ] ) !!}
{!! Form::select( 'subsidize_tenant_id[]', App\Customer::combobox_from_leaf_by_room_type_member_id('twin'), $ids, [ 'style' => 'width: 100%;', 'class' => 'form-control 3col active', 'id' => 'subsidize_tenant_id_twin', 'multiple'=> 'multiple' ] ) !!}
{!! Form::select( 'subsidize_tenant_id[]', App\Customer::combobox_from_leaf_by_room_type_member_id('quad'), $ids, [ 'style' => 'width: 100%;', 'class' => 'form-control 3col active', 'id' => 'subsidize_tenant_id_quad', 'multiple'=> 'multiple' ] ) !!}
{!! Form::label('remark', App\Language::trans('Remark'), ['class'=>'control-label col-md-12']) !!}
{!! Form::text('remark', null, ['class'=>'form-control']) !!} {!! $errors->first('remark', '') !!}
@include('_version_02.commons.layouts.partials._form_floaring_footer_standard') {!! Form::close() !!} @stop @section('script') @stop