Open tangphi opened 1 year ago
[IMPORTANT!: Please do not edit or reply to this comment using the GitHub UI. You can respond to it using CATcher during the next phase of the PE]
In short, non advanced users will not use more than 2dp for price (unless selling in bulk or something similar). See #780 for explanation on current behaviour.
[The team marked this bug as a duplicate of the following bug]
'filter f/price p/lt [price]' command is supposed to give me less than but also gives equals to
[original: nus-cs2113-AY2223S2/pe-interim#1051] [original labels: type.FunctionalityBug severity.Medium]
[This is the team's response to the above 'original' bug]
Filter can produce seemingly wrong results when item prices are more than 2 decimal places. This is because we allow more than 2dp pricing for advanced users who are selling in bulk but still want to keep individual items instead of groups of items. E.g. for a user selling 100 screws at $4.50, each Screw Item would have a price of $0.045. We made the change to display prices as 2 decimal places as there were complaints of allowing more than 2dp pricing, but we did not want to limit the options of advanced users.
A possible middle ground is to add a
For Advanced Users
section in relevant parts of the UG in the next iteration.However, as demonstrated, normal users setting prices to 2dp or less do not experience the bug.
Team chose to mark this issue as a duplicate of another issue (as explained in the Team's response above)
Reason for disagreement: [replace this with your reason]
UG had no mention that a decimal with more than 2 figures get automatically rounded up in list. This may be more descriptive and useful for users for this unexpected behaviour.
Replicate test by inserting this command: add n/phone upc/19303939 qty/99 p/1299.999 c/something
Resulting output: Rounds up to $1300.00![Screenshot 2023-04-14 at 4.35.26 pm.png](https://raw.githubusercontent.com/tangphi/pe/main/files/5e694f48-0d04-4c94-ad19-6292a2d6479d.png)