<table class="table" id="payment_summary">
    <tbody>
        <tr>
            <td colspan="4"><b>TRANSACTION SUMMARY</b></td>
        </tr>
        <tr>
            <td width="3%"><b>SL.NO</b></td>
            <td width="30%"><b>Receipt No</b></td>
            <!-- <td width="30%"><b>Date</b></td> -->
            {{--<td class="text-start"><b>Mode</b> </td>--}}
            <td width="5%" class="text-start"><b>Mode</b> </td>
            <td width="5%" style="text-align: right;"><b>Amount</b></td>
        </tr>
        @php $totalReceivedAmount = 0; @endphp
        @foreach($transactionHistory as $key => $list)
        <tr>
            <td>{!! $key+1 !!}</td>
            <td>{!! $list['mr_number']??'' !!}<br>
                {!! $list['transactionDate'] !!}
            </td>
            <!-- <td style="text-align: left;">{!! $list['transactionDate'] !!}</td> -->
            {{--<td>
                {!! $list['transactionMode'] !!} 
               
            </td>--}}
            <td>
                {!! $list['paymentMode']??'' !!}   
                @if($list['advanceReceived']=='Yes')
                (Advance)
                @endif
            </td>
            <td class="text-right text-end">
                @php $totalReceivedAmount+=$list['amount'] @endphp
                {!! $list['amount'] !!}
            </td>
        </tr>

        @endforeach
        <tr>
            <td colspan="3" class="text-start"><b>Total Received</b></td>
            <td class="text-end"><b>{!! convertDecimelPoint($totalReceivedAmount) !!}</b></td>
        </tr>
        <tr>
            <td colspan="3" class="text-start"><b>Balance Amount</b></td>
            <td class="text-end"><b>{!! isset($transactionSummery['dueAmount']) && $transactionSummery['dueAmount']>0 ? convertDecimelPoint($transactionSummery['dueAmount']-$transactionSummery['discountAmount']-$totalReturnAmount) : '' !!}</b></td>
        </tr>
    </tbody>
</table>