<div class="table-responsive">
    <table class="table table-bordered-print w-100" id="quotation_products">
    <form action="{{ route('sale-return-item-selected-to-cart') }}" id="addToCartForm" method="POST">
    @csrf
    <input type="hidden" class="sale_invoice_detail_id" name="sale_invoice_id" value="{!! $sale_invoice->id !!}">
        <thead>
            <tr>
                <th>Sl.No</th>
                <th>ITEM NAME & DETAILS </th>
                <th class="text-end">MRP</th>
                <th class="text-end">QTY</th>
                <th class="">Return QTY</th>
                <th class="text-end">Dis(%)</th>
                <th class="text-end">PRICE</th>
                <th class="text-end">TOTAL</th>
            </tr>
        </thead>
        <tbody>

            @php
            $total_gst_amount = 0;
            $IGST = $CGST = $SGST = 0;
            @endphp
            @foreach($sale_invoice->getSaleInvoiceDetails as $key => $value)
            <tr>
                <td>{!! $key + 1 !!}</td>
                <td>{!! $value->getProduct->name ?? '' !!}
                    <input type="hidden" class="sale_invoice_detail_id" name="sale_invoice_detail_id[]" value="{!! $value->id !!}">
                </td>
               
                <td style="text-align: right !important;">
                    {!! isset($value->getProduct->getProductPrice->mrp) ? convertDecimelPoint($value->getProduct->getProductPrice->mrp) : '' !!}</td>
                <td style="text-align: right !important;">
                    {!! isset($value->main_qty) ? convertDecimelPoint($value->main_qty) : '' !!}
                </td>
                <td><input type="text" class="form-control return_qty" name="return_qty[]" value="0"></td>
                <td style="text-align: right !important;">
                    {!! isset($value->discount_amount) ? convertDecimelPoint($value->discount_amount) : '' !!} ({!! $value->discount_percentage ?? '' !!})
                </td>
                <td style="text-align: right !important;">
                    {!! isset($value->price) ? convertDecimelPoint($value->price) : '' !!} </td>
                <td style="text-align: right !important;">
                    {!! convertDecimelPoint($value->total_amount) ?? '' !!}
                </td>
            </tr>
            @endforeach
        </tbody>
    </form>
    </table>
</div>