@if($gstEnabled ?? false)
<td class="col-hsn gst-col">
    <input type="text" name="line_items[{{ $idx }}][hsn_sac]" data-field="hsn_sac" class="form-control form-control-sm" value="{{ $line['hsn_sac'] ?? '' }}" placeholder="HSN">
</td>
<td class="col-gst-rate gst-col">
    <select name="line_items[{{ $idx }}][tax_rate]" data-field="tax_rate" class="form-select form-select-sm">
        <option value="0">Select Tax</option>
        @foreach($taxRates as $tax)
            <option value="{{ $tax->rate }}" data-tax-name="{{ $tax->name }}" @selected(abs((float) ($line['tax_rate'] ?? 0) - (float) $tax->rate) < 0.01)>{{ $tax->name }} ({{ $tax->rate }}%)</option>
        @endforeach
    </select>
</td>
<td class="col-cgst gst-col gst-col-intra">
    <input type="text" class="form-control form-control-sm text-center" data-field="cgst_rate" readonly tabindex="-1" value="0">
</td>
<td class="col-sgst gst-col gst-col-intra">
    <input type="text" class="form-control form-control-sm text-center" data-field="sgst_rate" readonly tabindex="-1" value="0">
</td>
<td class="col-igst gst-col gst-col-inter d-none">
    <input type="text" class="form-control form-control-sm text-center" data-field="igst_rate" readonly tabindex="-1" value="0">
</td>
@endif
