I've started using the app again and noticed that when purchasing products, if the purchase unit is different to the stock unit, the price is not calculated correctly.
It seems the conversion between units is using the stock_decimal_places_prices_display setting instead of the stock_decimal_places_prices_input setting. This means that even though I can enter a price up-to X decimals on input, it will get converted to the display setting when being purchased.
For a specific example, if I set the input setting to 6 places and the display setting to 2 places, with a conversion between purchase and stock units of 3000 (3ltr purchase to 3000ml stock for instance) and a price of $4.50, it means it will be saved as $0.00 as the conversion is $0.0015 per stock unit. If I change the display setting to 6 places as well, it's saved correctly but, obviously, now all my prices are displayed with 6 decimal places. I hope that makes sense.
Entering the purchase via the website works as intended with the 6 input and 2 display settings.
This is somewhat related to #459 from last year.
I've started using the app again and noticed that when purchasing products, if the purchase unit is different to the stock unit, the price is not calculated correctly.
It seems the conversion between units is using the
stock_decimal_places_prices_display
setting instead of thestock_decimal_places_prices_input
setting. This means that even though I can enter a price up-to X decimals on input, it will get converted to the display setting when being purchased.For a specific example, if I set the input setting to
6
places and the display setting to2
places, with a conversion between purchase and stock units of3000
(3ltr purchase to 3000ml stock for instance) and a price of$4.50
, it means it will be saved as$0.00
as the conversion is$0.0015
per stock unit. If I change the display setting to6
places as well, it's saved correctly but, obviously, now all my prices are displayed with 6 decimal places. I hope that makes sense.Entering the purchase via the website works as intended with the
6
input and2
display settings.Grocy: v4.0.3 App: v3.3.2