@extends('layouts.fixed')
@section('title','Convert Item report')
@section('css')
    <style>
        body {
            overflow-y: hidden;
            /*font-family: "Times New Roman";*/
            color: #000000;
        }
        .table-bordered td, .table-bordered th {
            border: 0.1rem solid rgba(8, 8, 8, 0.33) !important;
        !important;
        }

        h5.heading-title {
            text-transform: initial;
            font-weight: bold;
            letter-spacing: 1px;
        }

        tr th, tr td {
            line-height: 1.0;
            font-size: 15px;
            padding: 7px !important;

        }

        tr th, span strong, div span {
            text-transform: initial;
            font-weight: bold;
        }

        @media print {
            @page {
                size: A4 landscape;
                padding: 0 !important;
                margin: 0 !important;
            }
            .table-bordered td, .table-bordered th {
                border: 0.1rem solid rgba(8, 8, 8, 0.50) !important;
            }

            body{
                overflow: hidden !important;
                color: #000000;
            }

            div.card-body{
                margin: auto 20px;
            }

            div.card-body{
                padding-top: 0;
            }
            .table .thead-dark th {
                color: #000 !important;
                background-color: #dadada !important;
                /*border-color: #32383e !important;*/
            }
            /*body {*/
            /*-webkit-print-color-adjust: exact;*/
            /*}*/

        }
    </style>
@stop
@section('content')

    <!-- Content Header (Page header) -->
    <section class="content-header">
        <div class="container-fluid">
            <div class="row mb-2">
                <div class="col-sm-6">
                    <h1>Convert Item</h1>
                </div>
                <div class="col-sm-6">
                    <ol class="breadcrumb float-sm-right">
                        <li class="breadcrumb-item"><a href="#">Report</a></li>
                        <li class="breadcrumb-item active">Convert Item</li>
                    </ol>
                </div>
            </div>
        </div><!-- /.container-fluid -->
    </section>

    <section class="content no-print">
        <div class="container-fluid">
            {{--start --}}
            <div class="col-lg-12 col-sm-8 col-md-6 col-xs-12">
                <div class="card card-primary card-outline">
                    <div class="card-body " style="padding-bottom:0">
                        {{ Form::open(['route'=>'convert-item','method'=>'post']) }}

                        <div class="form-row">
                            
                            <div class="form-group col-md-5" >
                                <label>From Item</label>
                                <select name="from_item_id[]" required multiple class="select2 form-control" id="from_item_id">
                                    @foreach($items as $key =>$item)
                                        <option value="{{ $item->id }}">{{ $item->item_code }} {{ $item->name }}</option>
                                    @endforeach
                                </select>
                                {{-- {{ Form::select('from_item_id[]',$items,null,['id'=>'from_item_id','class'=>'select2 form-control','multiple'=>'multiple','required'=>'required']) }} --}}
                            </div>
                            <div class="form-group col-md-5" >
                                <label>To Item</label>
                                <select name="to_item_id" required class="select2 form-control" id="to_item_id">
                                    <option value="">Selete Item</option>
                                    @foreach($items as $key =>$item)
                                        <option value="{{ $item->id }}">{{ $item->item_code }} {{ $item->name }}</option>
                                    @endforeach
                                </select>
                                {{-- {{ Form::select('to_item_id',$items,null,['id'=>'to_item_id','class'=>'select2 form-control','placeholder'=>'Select Item','required'=>'required']) }} --}}
                            </div>
                            <div class="form-group col-md-2" style="margin-top: 30px">
                                <button type="submit" class="btn btn-info btn-md btn-block"><i class="fa fa-exchange"></i> Convert</button>
                            </div>

                        </div>
                        {{  Form::close() }}
                    </div>
                </div>
                <!-- /.card -->
            </div>
        </div>{{--end --}}
    </section>
@stop

@section('style')

@stop


@section('plugin')
    <!-- DataTables -->
    <script src="{{ asset('plugins/datatables/jquery.dataTables.js') }}"></script>
    <script src="{{ asset('plugins/datatables/dataTables.bootstrap4.js') }}"></script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.3/js/select2.min.js'></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-confirm/3.3.4/jquery-confirm.min.js"></script>
@stop

@section('script')
    <!-- page script -->
    <script type="text/javascript">
        $('.select2').select2()
    </script>
@stop
