@extends('layouts.admin')

@section('content')

<?php $cust_id = Request::segment('3'); 

//dd($cust_id)
?>


        <!-- Content Wrapper. Contains categories content -->
        <div class="content-wrapper" style="margin-left:10px !important;">
            <!-- Content Header (categories header) -->
            <section class="content-header">
                <div class="container-fluid">
                    <div class="row mb-2">
                        <div class="col-sm-6">
                            <h1> اضافة مبلغ </h1>
                        </div>
                        <div class="col-sm-6">
                            <ol class="breadcrumb float-sm-right">
                                <li class="breadcrumb-item"><a href="#">Home</a></li>
                                <li class="breadcrumb-item active">CMS</li>
                            </ol>
                        </div>
                    </div>
                </div><!-- /.container-fluid -->
            </section>









            <!-- Main content -->
            <section class="content">
                <div class="row">
                    <div class="col-md-12">
                        <div class="success">
                            @if(session()->has('success'))
                                <div class="alert alert-success">
                                    {{ session()->get('success') }}
                                </div>
                            @endif



                        <form action="{{url('/customers/paid')}}" method="post" enctype="multipart/form-data">
                            @csrf
                        <div class="form-group">
                            <label for="title">الاسم </label>
                            <input type="title" readonly name="title" class="form-control" id="title" placeholder="Enter title" 
                            value="<?php echo \App\Models\Customer::where('id',$cust_id)->first()->first_name; ?> <?php echo \App\Models\Customer::where('id',$cust_id)->first()->last_name; ?>
                            ">
                            @error('title') {{ $message }} @enderror

                        </div>

                        <input type="hidden" value="<?php echo $cust_id; ?> " name="id">

                        <div class="form-group">
                            <label for="paid">المبلغ المدفوع</label>
                            <input type="number" name="paid" class="form-control" id="paid" placeholder="enter paid amount">
                            @error('title') {{ $message }} @enderror

                        </div>

                        <div class="form-group">
                            <label for="payment_method"> طريقة الدفع  </label>
                            
                            <select name="payment_method" class="form-control">
                                <option value="bankak">Bankak | بنكك </option>
                                <option value="cash">Cash | كاش  </option>
                                <option value="shake"> شيك  </option>
                            </select>

                        </div>


                        <div class="form-group">
                            <label for="notes"> ملاحظات   </label>
                                
                                <textarea name="notes" class="form-control"></textarea>
                        
                        </div>



                        <div class="card-footer">
                        <button class="btn btn-primary"> اضافة </button>
                        </div>


                        </form>


                    </div>
                    <!-- /.col-->
                </div>
                <!-- ./row -->
            </section>
            <!-- /.content -->
        </div>
        <!-- /.content-wrapper -->





@endsection
