I need to display a pound currency symbol before the amount that is calculated

Below is the code I currently have

<th class="text-right py-1 px-2 grand-total">0</th>

function calc(){

        var grand_total = 0;

        $('table#list tbody input[name="total[]"]').each(function(){

            grand_total += parseFloat($(this).val())

        })

        $('table#list tfoot .grand-total').text(parseFloat(grand_total).toLocaleString('en-gb', {style:'decimal',maximumFractionDigit:2}))

        $('[name="amount"]').val(parseFloat(grand_total))
    }

I'm not sure where to add it within that code, can anyone help please

Yes, but you might want to also add currency: 'GBP', as so:

$('table#list tfoot .grand-total').text(parseFloat(grand_total).toLocaleString('en-gb', { style:'currency', currency: 'GBP', maximumFractionDigit:2 }))
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.