<form class="row g-3 auto-width tax_master" action="{{ route('tax-masters.store') }}" method="post" enctype='multipart/form-data'
    id="tax_master">
    @csrf
    <div class="col-md-6">
        <label for="name" class="form-label">Tax Slab Name <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="name" name="name" aria-describedby="inputGroupPrepend" placeholder="18% GST"
            required>
        <span class="text-danger error_name" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <label for="code" class="form-label">Tax Slab code <span class="text-danger"><b>*</b></span></label>
        <input type="text" class="form-control" id="code" name="code" aria-describedby="inputGroupPrepend" placeholder="18% GST"
            required>
        <span class="text-danger error_code" style="display:none;">This field is required.</span>
    </div>

    {{-- <div class="col-md-6">
        <label for="tax_category_id" class="form-label">Tax Category <span class="text-danger"><b>*</b></span></label>
        <select class="form-control" name="tax_category_id">
            @foreach ($category as $list)
                <option value="{{ $list->id }}">{{ $list->name }}</option>
            @endforeach
        </select>
        <span class="text-danger error_tax_category_id" style="display:none;">This field is required.</span>
    </div> --}}
    <div class="col-md-6">
        <label for="total_percentage" class="form-label">Total Percentage (%) <span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" id="total_percentage" name="total_percentage" placeholder="6"
            aria-describedby="inputGroupPrepend" required>
        <span class="text-danger error_total_percentage" style="display:none;">This field is required.</span>
    </div>
    <div class="col-md-6">
        <div>
            <label for="tax_category_id" class="form-label">Tax Category <span class="text-danger"><b>*</b></span></label>
        </div>
        <div class="input-group">
            <select class="form-control" name="tax_category_id">
                @foreach($category as $list)
                <option value="{{ $list->id }}">{{ $list->name }}</option>
                @endforeach
            </select>
            <div class="input-group-append" style="margin: auto 10px;">
                <button class="btn btn-success add_btn" id="create_tax_category" type="button"> + </button>
            </div>
        </div>
        <span class="text-danger error_tax_category_id" style="display: none;">This field is required.</span>
    </div>

    <div class="col-md-6">
        <label for="calculation" class="form-label" >Calculation <span class="text-danger"><b>*</b></span></label>
        <select class="form-select" aria-label="calculation" name="calculation">
            <option value="ON-BASIC">ON BASIC</option>
            <option value="ON-TOTAL">ON TOTAL</option>
          </select>
        <span class="text-danger error_calculation" style="display:none;">This field is required.</span>
    </div>



    <div class="col-md-6">
        <label for="priority" class="form-label">Priority <span class="text-danger"><b>*</b></span></label>
        <input type="number" class="form-control" name="priority" aria-describedby="inputGroupPrepend" required value="{!! $priority + 1 !!}">
        <span class="text-danger error_priority" style="display:none;">This field is required.</span>
    </div>


    <div class="col-md-6">
        <label for="description" class="form-label">Description</label>
        <textarea class="form-control" max=100 id="description" name="description"></textarea>
    </div>
</form>
