@extends('yonetim.yonetim_master')

@section('main')
    <section class="section">
        <div class="section-body">
            <div class="row">
                <div class="col-12 col-md-9 col-lg-10">


                    <div class="card">



                        <form action="{{route('kupon.veriupdateson',$veriler->id)}}" method="post">
                            @csrf
                            <div class="card-body">


                                <div class="col-lg-12 mx-auto">

                                    <a href="{{route('kupon.all')}}" class="btn-sm btn btn-success float-right"><i class="fa fa-backward"></i> Geri Dön</a>
                                    <br>

                                    <div class="form-group">
                                        <label>Kupon Kodu</label>
                                        <input disabled name="kupon_sifre" required type="text" class="form-control" value="{{$veriler->kupon_sifre}}">
                                    </div>



                                    @if(!$veriler->indirim_miktar=="")

                                        <div class="form-group">
                                            <label>İndirim Miktarı</label>
                                            <input name="indirim_miktar" type="number" class="form-control" value="{{$veriler->indirim_miktar}}">
                                        </div>
                                    @else

                                        <input name="indirim_miktar" type="hidden" class="form-control" value="{{$veriler->indirim_miktar}}">

                                        <div class="form-group">
                                            <label>İndirim Oranı</label>
                                            <select class="form-control" name="indirim_orani">
                                                <option value="{{$veriler->indirim_orani}}">Seçiniz-Mevcut %{{100*$veriler->indirim_orani}}</option>
                                                <option value="0.03">%3</option>
                                                <option value="0.05">%5</option>
                                                <option value="0.07">%7</option>
                                                <option value="0.10">%10</option>
                                                <option value="0.15">%15</option>
                                                <option value="0.20">%20</option>
                                                <option value="0.30">%30</option>
                                                <option value="0.40">%40</option>
                                                <option value="0.40">%50</option>
                                                <option value="0.70">%70</option>
                                            </select>
                                        </div>

                                    @endif

                                    <div class="form-group">
                                        <label>Kupon Durum</label>
                                        <select name="durum" class="form-control">
                                            @if($veriler->durum==1)
                                                <option value="1">Aktif</option>
                                                <option value="0">Pasif</option>
                                            @else
                                                <option value="0">Pasif</option>
                                                <option value="1">Aktif</option>
                                            @endif
                                        </select>
                                    </div>




                                    <div class="card-footer text-right">
                                        <button type="submit" name="genelayarkaydet" class="btn btn-primary">Güncelle</button>



                                    </div>


                                </div>
                            </div>
                        </form>


                    </div>





                </div>

            </div>

        </div>
    </section>
@endsection
