View Full Version : how to keep trailing zeros and Math.round?

10-07-2008, 03:51 PM
Am filling in for someone and don't know Javascript -- have looked for hours on boards but can only find an answer for a single variable.

Issue: 2 decimal points showing everywhere except when the output has .00 at the end. How do I get those zeros to show? Here is the math code:

for (var p in output_data) {

All of the source code is viewable here:


Folder is protected:
user = is
pass = michael11

Please see the Sony Projector section - the first item subtotal should be 3875.00 and comes out as just 3875 when you choose a Quantity of 1.

I am really stuck and would be very, very appreciate of any assistance. Thanks so much.

rnd me
10-07-2008, 05:10 PM
should be:

10-07-2008, 05:18 PM
Thanks so much for the response, but using that code turns all tax and subtotal fields to 0?