
<form role="form" id="form-voucher">
    {!! csrf_field() !!}
    <div class="form-body">
        @if($room->hostel->type_rent == \App\Models\Hostel::TYPE_RENT_EVERY)
            <input type="hidden" value="{{$room->bed_id}}" name="bed_id">
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                        <label>Chọn người thuê trọ</label>
                        <select class="form-control" id="renter-voucher" data-room="{{ $room->id }}">
                            <option value=""> Vui lòng chọn</option>
                            @php
                                $renters = \App\Models\RenterRoom::where('room_id', $room->id)->get();
                            @endphp
                            @foreach($renters as $renter)
                                <option value="{{ $renter->user_id }}"> {{ $renter->account->name }}</option>
                            @endforeach
                        </select>
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                        <label>Tháng</label>
                        <input type="text" name="month" class="form-control monthpicker" id="month-voucher"
                               value="{{ \Carbon\Carbon::now()->format('m/Y') }}">
                    </div>
                </div>
            </div>
        @endif

        <div class="row">
            <div class="col-md-12">
                <!-- BEGIN Portlet PORTLET-->
                <div class="portlet box blue-hoki">
                    <div class="portlet-title">
                        <div class="caption">
                            Phòng {{ $room->name }}, {{ $room->hostel->name }}
                        </div>
                    </div>
                    <div class="portlet-body" id="voucher-body">

                    </div>
                </div>
                <!-- END Portlet PORTLET-->
            </div>
        </div>
    </div>


</form>