
@can('st-stock-adjustment-create')
<form id="form-ajuster-stock" class="text-left">
    <div class="col-lg-12 text-center form-group">
        <span class="border-left fs-12">
            <span>{{$stock->produit->fullName}}</span><br>
            <span>{{__('Lot')}} : {{$stock->id_lot}} , </span>
            <span>{{__('Expired At')}} : {{$stock->date_peremtion}}</span><br>
            <span class="text-success fs-13">{{__('Qty')}} : {{format_amount($stock->qty)}}</span>
        </span>
    </div>
    <div class="col-lg-12">
        <div class="row">

            <input type="hidden" name="id_stock" value="{{$id_stock}}">
            <input type="hidden" name="type_stock" value="{{$type_stock}}">
            <div class="col-lg-7 col-md-6 mb-2">
                {!! FormAdmin::number("qty_adjusted",__('Adjusted Qty'),["id"=>"input-qte",'required'=>true]) !!}
            </div>

            <div class="col-lg-5 col-md-6 form-group">
                <div class="row">
                    <div class="col-lg-12 mb-0">
                        <label>{{__('Opération')}} : </label>
                    </div>
                    <div class="col-lg-12">
                        @foreach($operations as $operation)
                            <label class="custom-control custom-radio custom-control-inline"
                                   data-toggle="tooltip" data-placement="top"
                                   data-original-title="{{__($operation->description)}}"
                                   title="{{__($operation->description)}}">
                                <input type="radio" name="id_operation"
                                       {{ ($loop->first) ? "checked":''}}
                                       value="{{$operation->id}}"
                                       class="custom-control-input">
                                <span class="custom-control-label">
{{--                           <strong class="fs-16">--}}
{{--                               <span class="{{$operation->icon}} text-{{$operation->color}}"></span>--}}
{{--                           </strong>--}}
                            {{$operation->libelle}}
                        </span>
                            </label>
                        @endforeach
                    </div>
                </div>

            </div>
            <div class="col-lg-12">
                {!! FormAdmin::select("id_type_ajustement",__("Adjustement Type"),null,$types,
                ['required'=>true ,'data-plugin-multiselect',
                              "data-plugin-options" => "{ &quot;enableCaseInsensitiveFiltering&quot;: true ,}"]) !!}
            </div>
            <div class="col-lg-12">
                {!! FormAdmin::textarea("commentaire",__('Comment'),
                ["id"=>"input-commentaire",'required'=>true,'rows'=>4,'resize'=>true]) !!}
            </div>
        </div>
    </div>

</form>
@elsecan
    <h4 class="text-danger">{{__("You Can't Adjust this stock")}}</h4>
@endcan

<script>
    $(function () {
        $('[data-toggle="tooltip"]').tooltip();
        init_bsMultiselect();
        //alert("ddd")
    })
</script>
