I'm working on a proyect for a shopping cart, the problem is the coding is not taking the thousands in the sum for the grand total e.g.:
Sub total: 4,175.50
G.S.T.: 250.53
P.S.T: 334.04
Shipping: 8.95
Handling: 4.00
Grand Total:601.52
and it should be: 4,760.07
I've tried everything with the formatnumber, I want to know if there is a way to remove the comma for the thousands, or make the grand total to get the thousands format.
This is the parseFloat I have:
}
document.frmCar t.shipping_cost .value = sngCurrShip.toF ixed(2)
document.frmCar t.shipping_show .value = (sngCurrShip - 4).toFixed(2)
document.frmCar t.handling_show .value = (handleFee).toF ixed(2)
sngGrandTot = parseFloat(docu ment.frmCart.sn gSubTotal.value ) + parseFloat(docu ment.frmCart.ps t.value) + parseFloat(docu ment.frmCart.gs t.value) + parseFloat(docu ment.frmCart.sh ipping_cost.val ue)
document.frmCar t.GrandTotal.va lue = sngGrandTot.toF ixed(2)
document.frmCar t.charge_total. value = sngGrandTot.toF ixed(2)
return ;
}
THANK YOU
Sub total: 4,175.50
G.S.T.: 250.53
P.S.T: 334.04
Shipping: 8.95
Handling: 4.00
Grand Total:601.52
and it should be: 4,760.07
I've tried everything with the formatnumber, I want to know if there is a way to remove the comma for the thousands, or make the grand total to get the thousands format.
This is the parseFloat I have:
}
document.frmCar t.shipping_cost .value = sngCurrShip.toF ixed(2)
document.frmCar t.shipping_show .value = (sngCurrShip - 4).toFixed(2)
document.frmCar t.handling_show .value = (handleFee).toF ixed(2)
sngGrandTot = parseFloat(docu ment.frmCart.sn gSubTotal.value ) + parseFloat(docu ment.frmCart.ps t.value) + parseFloat(docu ment.frmCart.gs t.value) + parseFloat(docu ment.frmCart.sh ipping_cost.val ue)
document.frmCar t.GrandTotal.va lue = sngGrandTot.toF ixed(2)
document.frmCar t.charge_total. value = sngGrandTot.toF ixed(2)
return ;
}
THANK YOU
Comment