Fixes issue 22750: Number format works with decSeparator = ','
authorAugusto Mauch <augusto.mauch@openbravo.com>
Mon, 28 Jan 2013 16:29:49 +0100
changeset 19487 e035b2855377
parent 19486 3dff248e9297
child 19488 f8bfaf4760bf
Fixes issue 22750: Number format works with decSeparator = ','

Using the format file attached to the issue https://issues.openbravo.com/view.php?id=22750, when a number higher than 999 was entered in a numeric filter, only the last 3 digist remained (i.e., if 1234 was entered, only 234 remained).

This has been fixed by including the group separator and the default grouping size in the call to JSToOBMasked used to format a numeric value.
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
--- a/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Mon Jan 28 16:11:12 2013 +0100
+++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js	Mon Jan 28 16:29:49 2013 +0100
@@ -589,8 +589,7 @@
       value = parseFloat(value);
     }
     if (!isc.isA.String(value)) {
-      // on purpose no grouping symbol
-      return OB.Utilities.Number.JSToOBMasked(value, type.maskNumeric, type.decSeparator, null, type.groupInterval);
+      return OB.Utilities.Number.JSToOBMasked(value, type.maskNumeric, type.decSeparator, type.groupSeparator, OB.Format.defaultGroupingSize);
     }
     return value;
   },