<div class="col-4">
    <table class="table tr mb-1" id="billing_summary">
        <tbody>
            <tr>
                <td colspan="2"><b>VOUCHER SUMMARY</b></td>
            </tr>
            <tr>
                <td>BASIC
                    AMOUNT</td>
                <td class="text-right text-end">
                    {!! isset($transactionSummery['totalBilling']) ? convertDecimelPoint($transactionSummery['totalBilling']) : '' !!}</td>
            </tr>
            @php
            $gst_amount = $gst_amount ?? 0;
            @endphp
            @if($gst_amount>0)
            <tr>
                <td>TOTAL TAX
                </td>
                <td class="text-right text-end">
                    {!! convertDecimelPoint($gst_amount) ?? '' !!}</td>
            </tr>
            @endif
            <tr>
                <td>
                    SUBTOTAL
                </td>
                <td class="text-right text-end">
                    {!! convertDecimelPoint($transactionSummery['totalBilling'] + $gst_amount) ?? '' !!}</td>
            </tr>
            @if($transactionSummery['discountAmount']>0)
            <tr>
                <td>SPECIAL
                    DISCOUNT</td>
                <td class="text-right text-end">
                    {!! convertDecimelPoint($transactionSummery['discountAmount']) ?? '' !!}</td>
            </tr>
            @endif
            @php
            $grand_total =
            $transactionSummery['totalBilling'] +
            $gst_amount -
            (Integer)$transactionSummery['discountAmount'] ??
            0;
            @endphp
            @if($transactionSummery['roundOffAmount']!=0)
            <tr>
                <td>Round OFF</td>
                <td class="text-right text-end">
                    <b>{!! abs($transactionSummery['roundOffAmount']) !!}</b>
                </td>
            </tr>
            @endif
            <tr>
                <td><b>GRAND
                        TOTAL</b></td>

                <td class="text-right text-end">
                @if($transactionSummery['roundOffAmount']!=0)
                    <b>{!! convertDecimelPoint(round($grand_total)) !!}</b>
                @else
                    <b>{!! convertDecimelPoint($grand_total) !!}</b>
                @endif
                   
                </td>
            </tr>

        </tbody>
    </table>
    {{--<p class="text-right text-end mt-1" style="font-size: 9px;"> In words :
                                                        {!! convertAmountToWords($grand_total) !!}
                                                        </p>--}}
</div>
