From: Janusz Dobrowolski Date: Tue, 7 Sep 2010 06:33:48 +0000 (+0000) Subject: Ugly bug in javascript number entry formatting code. X-Git-Tag: v2.4.2~19^2~634 X-Git-Url: https://delta.frontaccounting.com/gitweb/?a=commitdiff_plain;h=f9d1525420a9257a58100a7905190609b7b17b4c;hp=a8b1d5c9c416ae3d1863d0625d0cd42d39107b92;p=fa-stable.git Ugly bug in javascript number entry formatting code. --- diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 4909b54f..880dddc3 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -19,11 +19,15 @@ Legend: ! -> Note $ -> Affected files +07-Sep-2010 Janusz Dobrowolski +# Ugly bug in formating numbers +$ /js/utils.js + 07-Sep-2010 Joe Hunt/Chaitanya ! Removed all decimal roundings in cost price calculations $ /purchasing/includes/db/grn_db.inc /manufacturing/includes/db/work_orders_db.inc - + 06-Sep-2010 Janusz Dobrowolski # Fixed error on new contact add. $ /includes/ui/contacts_view.inc diff --git a/js/utils.js b/js/utils.js index 9b1b1ac4..0474ae23 100644 --- a/js/utils.js +++ b/js/utils.js @@ -219,12 +219,11 @@ function price_format(post, num, dec, label, color) { num = Math.floor(num*decsize+0.50000000001); cents = num%decsize; num = Math.floor(num/decsize).toString(); + for( i=cents.toString().length; i