How to perform rounding and then minus

Hi there,

To summarize my problem:
For example:
Sales : $ 5 (id=sales)
Discount: 11% (id=disc)
Total Discount: $ 0.55 (id=disc)
Rounded Discount: $ 0.6 (1 decimal) (id=rounded)
Net Sales: $ 4.40 (id=net_sales)

document.getElementById(“net_sales”).value = sales - disc.toFixed(1);

Net Sales: $

I tried the above, it is working in the browser. However, it cannot be written into MYSQL (with PHP). What is wrong with my Javascript?

Thanks.

How do you send net_sales from the users browser (javascript) to the server (php)?

Sponsor our Newsletter | Privacy Policy | Terms of Service