Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0038315
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Retail Modules] Web POSminorhave not tried2018-04-10 17:482018-04-10 17:48
ReporterplujanView Statuspublic 
Assigned ToRetail 
PrioritynormalResolutionopenFixed in Version
StatusnewFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Regression level
Regression date
Regression introduced in releasemain
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0038315: [RR18Q2] The 20-char limit in the keypad is too large and can cause rounding issues

DescriptionThe webPOS keypad has a maximum of 20 chars for setting values like quantity and price. However, this number is too big for the precision of the variables underneath, creating some rounding issues. See steps.
Steps To Reproduce1. In the main screen of the webPOS go to browse and add a product to a ticket.
2. Note the quantity default is 1. Press the '9' key in the keypad 20 times to get the maximum number you are allowed to enter.
3. Note that you cannot enter more than 20 and that a warning message is shown.
4. Tap the Quantity button and check that the quantity of the line has changed to 100000000000000000000 (which is not correct since the actual number entered was 99999999999999999999 )
5. Use the - and + keys of the keypad to add or remove one item from the quantity. Note that nothing happens (since one is less than the current precision)

Alternative scenario: Having 100000000000000000000 in quantity, tap the 1 key and tap Quantity button. Note that the whole line is removed (since it has removed EnteredQty - CurrentQty units)

Working scenario: By using values closer to the one in quantity, the precision is not interfering and the results are correct. Like using 1000000 instead of 1 in previous steps.
Proposed SolutionPrecision and rounding are inherent to computer design, so there is not an actual solution for this. Some mitigation actions can be taken tough.

1. (Simpler) Evaluate if the 20 char limit is too high and can be reduced. A 14 char number will fit current precision with no further changes
2. (somewhat simple) If 14char+ values are required, do not allow values under the precision (ie Currencies can be often very big, but they will lack cents and even smaller units)
3. (complex) There are algorithms to increase precision by using more than one variable to represent different parts of a number.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2018-04-10 17:48 plujan New Issue
2018-04-10 17:48 plujan Assigned To => Retail
2018-04-10 17:48 plujan Regression introduced in release => main
2018-04-10 17:48 plujan Triggers an Emergency Pack => No


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker