details: https://code.openbravo.com/erp/devel/pi/rev/79617a539b53
changeset: 25775:79617a539b53
user: Augusto Mauch <augusto.mauch <at> openbravo.com>
date: Thu Jan 29 23:14:48 2015 +0100
summary: Fixes issue 28747: Numeric field textual value is also rounded
The problem was that even though the value of the field was being properly
rounded, its textual value - sent as the propertyName_textualValue - was being
kept unrounded. To fix it, now when the value of a numeric field is entered
using a formula both its numeric and its textual value are updated.
diffstat:
modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
| 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diffs (14 lines):
diff -r cba032bafcb0 -r 79617a539b53
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 Jan 29 19:04:28 2015 +0100
+++
b/modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
Thu Jan 29 23:14:48 2015 +0100
@@ -470,6 +470,10 @@
if (isFormula) {
// the formula is evaluated in the validate function, so until then it
is not possible to round it, do it now
value = this.roundJsNumberUsingTypeInstance(value, this.typeInstance);
+ if (this.form.setTextualValue) {
+ textRoundedValue = OB.Utilities.Number.JSToOBMasked(value,
this.typeInstance.maskNumeric, this.typeInstance.decSeparator,
this.typeInstance.groupSeparator, OB.Format.defaultGroupingSize);
+ this.form.setTextualValue(this.name, textRoundedValue,
this.typeInstance);
+ }
this.setValue(value);
}
// first check if the number is valid
------------------------------------------------------------------------------
Dive into the World of Parallel Programming. The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Openbravo-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openbravo-commits