<form class="row g-3 auto-width" action="{{ route('biling-interval.update', $data->id)}}" method="post" enctype='multipart/form-data'>
    @csrf
    @method('PUT')
     <!-- biling interval -->
     <div class="col-md-12">
        <label class="form-label">Billing Interval <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control"  name="biling_interval" aria-describedby="inputGroupPrepend" required value="{{$data->biling_interval}}" placeholder="Billing Interval">
        @if ($errors->has('biling_interval'))
        <span class="text-danger">{{ $errors->first('biling_interval') }}</span>
        @endif
        <span class="text-danger error_biling_interval" style="display: none;">This field is required.</span>
    </div>

     <!-- Code -->
     <div class="col-md-12">
        <label class="form-label">Code <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control"  name="code" aria-describedby="inputGroupPrepend" required placeholder="Code" value="{{$data->code}}">
        @if ($errors->has('code'))
        <span class="text-danger">{{ $errors->first('code') }}</span>
        @endif
        <span class="text-danger error_code" style="display: none;">This field is required.</span>
    </div>
    <!-- per_year -->
    <div class="col-md-12">
        <label for="per_year" class="form-label">Per Year </label>
        <input type="number" class="form-control" name="per_year" aria-describedby="inputGroupPrepend" value="{{$data->per_year}}" placeholder="Per Year">
        <span class="text-danger error_per_year" style="display:none;">This field is required.</span>
    </div>
    <!-- days -->
    <div class="col-md-12">
        <label for="days" class="form-label">Days </label>
        <input type="number" class="form-control" name="days" aria-describedby="inputGroupPrepend" required value="{{$data->days}}" placeholder="Days">
        <span class="text-danger error_days" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-9" >
        <label  class="form-label">Billing Type </label><br>
        <select class="form-select" name="billing_type">
            <option value="single_billing" {!! matchSelected('single_billing', $data->billing_type) !!}>Single Billing</option>
            <option value="recurring_billing" {!! matchSelected('recurring_billing', $data->billing_type) !!}>Recurring Billing</option>
        </select>
        <span class="text-danger error_lifetime" style="display: none;">This field is required.</span>
    </div>
     <!-- LifeTime-->
     <div class="col-md-3" >
        <label  class="form-label">Life Time </label><br>
        <input name="lifetime" class="form-check-inputFeatured btn-lg lifetime" type="checkbox" id="lifetime"
        value="1" {!! ($data->lifetime == 1) ? 'checked' : '' !!}>
        <span class="text-danger error_lifetime" style="display: none;">This field is required.</span>
    </div>

</form>
