Open nus-se-script opened 7 months ago
This is intended. For situations where customers can only buy in sets of 2 cupcakes but users i.e. the business owners want to track the cost and sales of each individual cupcake, sales can often exceed 2 decimal places. When considering the cost of each cupcake based on the proportion of ingredients used, for example, 70g of flour of 1kg packet with price of 9.50, the cost of flour used would be $0.665. Hence, for accurate calculation of profits, it is possible that prices exceed 2 decimal places and we do not see the need to limit to 2 decimal places. Moreover, this app is designed mainly for business owners and not for display for customers. It is true that when displaying the prices to customers, we would limit it to 2 decimal places but that is not the intended use of Strack.
--
As shown here, I can add a menu item
cake
with cost8.9999
and sales9.9999
. Some warning should be shown for this addition, as prices normally have a maximum of 2 decimal places.[original: nus-cs2103-AY2324S2/pe-interim#1010] [original labels: severity.Low type.FeatureFlaw]