Openbravo Issue Tracking System - Openbravo ERP |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0028747 | Openbravo ERP | A. Platform | public | 2015-01-23 12:09 | 2015-02-11 08:36 |
|
Reporter | AugustoMauch | |
Assigned To | AugustoMauch | |
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | fixed | |
Platform | | OS | 5 | OS Version | |
Product Version | | |
Target Version | | Fixed in Version | 3.0PR15Q2 | |
Merge Request Status | |
Review Assigned To | alostale |
OBNetwork customer | |
Web browser | |
Modules | Core |
Support ticket | |
Regression level | Production - Confirmed Stable |
Regression date | 2014-03-05 |
Regression introduced in release | 3.0PR14Q2 |
Regression introduced by commit | https://code.openbravo.com/erp/devel/pi/rev/381047f42270513a9fbfae0c09866e77f835061b [^] |
Triggers an Emergency Pack | No |
|
Summary | 0028747: If a numeric value is entered using a formula, it is saved without being rounded |
Description | When a user enters a number manually, it is rounded before being stored (i.e. if the user enters 1.2345 and the number format is configured to show only 2 decimals the stored number will be 1.23).
The problem is that if the user enters a formula in a numeric field, the stored value is not rounded. |
Steps To Reproduce | - Open the Sales Order window
- Create a new header
- Create a new line. Select any product. Set the Ordered Quantity to 1000 and save.
- Change the Unit price to 0.33 and save. Check that the Line Net Amount is 330.00 (OK)
- Change the Unit price to 0.33333333 and save. Check that the Line Net Amount is 330.00 (OK)
- Change the Unit price to =1/3 and save. Check that the Line Net Amount is 333.33 (WRONG) |
Proposed Solution | |
Additional Information | |
Tags | No tags attached. |
Relationships | caused by | defect | 0025517 | 3.0PR14Q3 | closed | shankarb | Wrong calculations on numeric field depending on the formula | related to | defect | 0028427 | 3.0PR15Q2 | closed | AugustoMauch | Price is not rounded to calculate the line net amount in Create Lines process of Purchase Order | related to | defect | 0028765 | | acknowledged | Triage Platform Base | It is not possible to use formula inputs if ',' is used as decimal separator |
|
Attached Files | |
|
Issue History |
Date Modified | Username | Field | Change |
2015-01-23 12:09 | AugustoMauch | New Issue | |
2015-01-23 12:09 | AugustoMauch | Assigned To | => AugustoMauch |
2015-01-23 12:09 | AugustoMauch | Modules | => Core |
2015-01-23 12:09 | AugustoMauch | Triggers an Emergency Pack | => No |
2015-01-23 12:11 | AugustoMauch | Regression level | => Production - Confirmed Stable |
2015-01-23 12:11 | AugustoMauch | Regression date | => 2014-03-05 |
2015-01-23 12:11 | AugustoMauch | Regression introduced in release | => 3.0PR14Q2 |
2015-01-23 12:11 | AugustoMauch | Regression introduced by commit | => https://code.openbravo.com/erp/devel/pi/rev/381047f42270513a9fbfae0c09866e77f835061b [^] |
2015-01-23 14:21 | AugustoMauch | Relationship added | caused by 0025517 |
2015-01-26 12:41 | AugustoMauch | Relationship added | related to 0028427 |
2015-01-26 12:42 | AugustoMauch | Issue Monitored: alostale | |
2015-01-26 12:42 | AugustoMauch | Review Assigned To | => alostale |
2015-01-26 12:42 | hgbot | Checkin | |
2015-01-26 12:42 | hgbot | Note Added: 0073770 | |
2015-01-26 12:42 | hgbot | Status | new => resolved |
2015-01-26 12:42 | hgbot | Resolution | open => fixed |
2015-01-26 12:42 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/39b9171de017afa00b4331275c111d66251c4cb4 [^] |
2015-01-26 12:47 | AugustoMauch | Relationship added | related to 0028765 |
2015-01-26 15:29 | AugustoMauch | Steps to Reproduce Updated | bug_revision_view_page.php?rev_id=7537#r7537 |
2015-01-29 17:42 | alostale | Note Added: 0073911 | |
2015-01-29 17:42 | alostale | Status | resolved => new |
2015-01-29 17:42 | alostale | Resolution | fixed => open |
2015-01-29 17:54 | alostale | Note Edited: 0073911 | bug_revision_view_page.php?bugnote_id=0073911#r7559 |
2015-01-29 23:18 | hgbot | Checkin | |
2015-01-29 23:18 | hgbot | Note Added: 0073923 | |
2015-01-29 23:18 | hgbot | Status | new => resolved |
2015-01-29 23:18 | hgbot | Resolution | open => fixed |
2015-01-29 23:18 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/devel/pi/rev/39b9171de017afa00b4331275c111d66251c4cb4 [^] => http://code.openbravo.com/erp/devel/pi/rev/79617a539b534107622ee34fdf7b43e9b5329b15 [^] |
2015-01-30 09:41 | alostale | Note Added: 0073930 | |
2015-01-30 09:41 | alostale | Status | resolved => closed |
2015-01-30 09:41 | alostale | Fixed in Version | => 3.0PR15Q2 |
2015-02-04 20:34 | hudsonbot | Checkin | |
2015-02-04 20:34 | hudsonbot | Note Added: 0074180 | |
2015-02-04 20:34 | hudsonbot | Checkin | |
2015-02-04 20:34 | hudsonbot | Note Added: 0074200 | |
2015-02-11 08:36 | alostale | Note Added: 0074345 | |
2015-02-11 08:36 | alostale | Note Edited: 0074345 | bug_revision_view_page.php?bugnote_id=0074345#r7659 |
Notes |
|
(0073770)
|
hgbot
|
2015-01-26 12:42
|
|
Repository: erp/devel/pi
Changeset: 39b9171de017afa00b4331275c111d66251c4cb4
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Mon Jan 26 12:39:25 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/39b9171de017afa00b4331275c111d66251c4cb4 [^]
Fixes bug 28747,related with bug 28427: Number entered with formula is rounded
The problem was that if a number was entered using a formula (i.e. by entering =1/3 in the form item), the value was not rounded using the numeric field mask. For non-formula inputs the validation is done at the beginning of the blur function. For formula inputs it is not possible to do it at that point, because the value of the field is still the formula, not the result of evaluating the formula. The formula is evaluated in the validate function(), so the rounding for formula inputs is done after invoking it.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
---
|
|
|
(0073911)
|
alostale
|
2015-01-29 17:42
(edited on: 2015-01-29 17:54) |
|
Reopening:
-Create line
-qty:1000
-price: =1/3
-blur
-line net amount 330 (ok)
-save
-line net amount changed to 333.33
|
|
|
(0073923)
|
hgbot
|
2015-01-29 23:18
|
|
Repository: erp/devel/pi
Changeset: 79617a539b534107622ee34fdf7b43e9b5329b15
Author: Augusto Mauch <augusto.mauch <at> openbravo.com>
Date: Thu Jan 29 23:14:48 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/79617a539b534107622ee34fdf7b43e9b5329b15 [^]
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.
---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/form/formitem/ob-formitem-number.js
---
|
|
|
|
code reviewed
tested in:
*standard window: as described in the issue
*Parameter window grid: using formulas in Purchase Order > Create Lines process grid
*Parameter window parameter: using formulas in Sales Invoice > Add Payment process parameters |
|
|
|
|
|
|
|
|
|
|