This discussion is archived
0 Replies Latest reply: Sep 19, 2010 5:13 AM by 807574 RSS

Webshop. first and last record in database shows wrong decimal format.

807574 Newbie
Currently Being Moderated
Hi. Thanks for taking the time.

When first or/and last product is added to the webshops cart it displays the wrong decimal format.( This is only on the website.)

ie. $ 1.7 instead of $ 1.73.

I don't even know were to start searching, and are hoping that this has happend to someone else here.

using qlassfish 3 and mysql.

code below works on every product except for first and last record in mysql database.
NumberFormat f = NumberFormat.getInstance(new Locale("sv_SE"));
code below is used to list cart product total cost / cost.
     // shows the total amount of this product
        ${} sek <- this one fails on first and last database record
     // shows the cost of this product
         <span class="smallText">( ${product.price} sek / unit )</span> <-- this one display the correct value.
Very thankful for any hint

EDIT: It does not matter in what order I add the products.

Edited by: ocean76 on Sep 19, 2010 5:11 AM