details: https://code.openbravo.com/erp/devel/pi/rev/f5caad158261 changeset: 24706:f5caad158261 user: Augusto Mauch <augusto.mauch <at> openbravo.com> date: Fri Sep 26 15:55:41 2014 +0200 summary: Fixes issue 27053: Numbers are properly formatted with , as decimal separator
Decimal numbers were not being properly formatted if a comma was used as decimal separator. The problem was caused by using the OBPlainToOBMasked instead of JSToOBMasked to convert a javascript number to a formatted string. OBPlainToOBMasked does not expect a javascript number as an argument, but a non-formatted string representation of a number. The issue has been fixed by replacing OBPlainToOBMasked with JSToOBMasked. The issue that caused this regression [1] works the same as it worked when it was fixed. It works properly using the '.' as decimal separator, but not when using ',' [1] https://issues.openbravo.com/view.php?id=25517 diffstat: modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diffs (12 lines): diff -r 653cc6909012 -r f5caad158261 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 Thu Sep 25 17:06:26 2014 +0530 +++ b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js Fri Sep 26 15:55:41 2014 +0200 @@ -467,7 +467,7 @@ // first check if the number is valid if (!isc.isA.String(value)) { // format the value to be displayed. - value = OB.Utilities.Number.OBPlainToOBMasked(value, this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize); + value = OB.Utilities.Number.JSToOBMasked(value, this.typeInstance.maskNumeric, this.typeInstance.decSeparator, this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize); this.setElementValue(this.mapValueToDisplay(value)); } } ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Openbravo-commits mailing list Openbravo-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openbravo-commits