Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0043483Openbravo ERPA. Platformpublic2020-03-12 15:492020-04-20 07:15
cberner 
cberner 
normalminoralways
closedfixed 
5
 
PR20Q3 
alostale
Core
No
0043483: Price data introduced in Order Line "Line Net Amount" Field is not invalidated if incorrect
It is possible to introduce invalid price in the field "Line Net Amount" of a certain Order Line, both in Sales Order and Sales Invoice window. The price introduced, will be rounded or modified entirely and it doesn't show an error.

Note: It seems the problem is that there's a callout for that column, "LineNetAmt" and it is using the invalid data and making it valid.

This doesn't happen for example on Product->Price->Unit Price. The data is invalidated if incorrect as there is no callout making it valid. This is the intended behaviour.
1. Open Sales Order or Sales Invoice
2. Create an Order/Invoice
3. Create a line in Lines tab for the order/invoice
4. Choose any product, go to Line Net Amount and enter "1.25.25" and press Tab.

The number has probably been modified to 1.00 and it doesn't show as invalid.

Repeat this process in Product and Unit Price of Price tab, in this case the price introduced is invalidated, as it should be.

A couple of screenshots have been appended on this issue.
Change the callout (src\org\openbravo\erpCommon\ad_callouts\SL_Order_Amt.java) so it checks if the input has been invalidated and don't process the data if invalid.
No tags attached.
png issue1.png (90,939) 2020-03-12 15:49
https://issues.openbravo.com/file_download.php?file_id=14160&type=bug
png

png issue2.png (23,641) 2020-03-12 15:50
https://issues.openbravo.com/file_download.php?file_id=14161&type=bug
png

png issue3.png (23,884) 2020-03-12 15:50
https://issues.openbravo.com/file_download.php?file_id=14162&type=bug
png
Issue History
2020-03-12 15:49cbernerNew Issue
2020-03-12 15:49cbernerAssigned To => platform
2020-03-12 15:49cbernerFile Added: issue1.png
2020-03-12 15:49cbernerModules => Core
2020-03-12 15:49cbernerTriggers an Emergency Pack => No
2020-03-12 15:50cbernerFile Added: issue2.png
2020-03-12 15:50cbernerFile Added: issue3.png
2020-03-12 16:18salvador_campanellaResolution time => 1585778400
2020-03-12 16:18salvador_campanellaNote Added: 0118552
2020-03-12 16:18salvador_campanellaIssue Monitored: salvador_campanella
2020-04-14 17:16cbernerStatusnew => scheduled
2020-04-14 17:16cbernerAssigned Toplatform => cberner
2020-04-15 07:30alostaleReview Assigned To => alostale
2020-04-15 07:31alostaleNote Added: 0119166
2020-04-17 09:35hgbotCheckin
2020-04-17 09:35hgbotNote Added: 0119228
2020-04-17 09:35hgbotStatusscheduled => resolved
2020-04-17 09:35hgbotResolutionopen => fixed
2020-04-17 09:35hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b3403c38dc217c1bb49831a68e7a871275d45c26 [^]
2020-04-20 07:15alostaleStatusresolved => closed
2020-04-20 07:15alostaleFixed in Version => 3.0PR20Q3

Notes
(0118552)
salvador_campanella   
2020-03-12 16:18   
This problem was reproduced sometimes using the calculator application of windows 10, copying and pasting the value in the field Line Net Amount with Ctrl+C and Ctrl+V keys
(0119166)
alostale   
2020-04-15 07:31   
MR: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/59 [^]
(0119228)
hgbot   
2020-04-17 09:35   
Repository: erp/devel/pi
Changeset: b3403c38dc217c1bb49831a68e7a871275d45c26
Author: Cristian Berner <cristian.berner <at> openbravo.com>
Date: Tue Apr 14 17:18:03 2020 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b3403c38dc217c1bb49831a68e7a871275d45c26 [^]

Fixes ISSUE-43483: Float number fields invalidated if there are invalid chars

Previously float number fields were not invalidated correctly if there
were characters after a digit. Number is used now instead of parseFloat

Also removes hidden character generated by windows calculator when copy-pasting numbers
This is done so the number can be rounded correctly

---
M modules/org.openbravo.client.application/web-test/ob-utilities-number.test.js
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/utilities/ob-utilities-number.js
---