Closed SirFlobo closed 1 year ago
Thanks for the detailed report, I will look into it!
Hi, It looks like the app is behaving as intended and I just didn't realise. I was using barcode buddy to add the products to my grocy server and it seems with the settings I was using it would add the buy unit and the conversion rate as quantity to the barcode. So when the app read the barcode it saw those values and used them, as should happen.
I didn't realise this since this is my first time using grocy and barcode buddy.
When I add a barcode with no unit and no quantity, the app behaves as I expect. The buy unit when buying and the stock unit when consuming.
What I did notice though is that when I add a new product using grocy android, it adds the buy unit to the barcode. This causes the barcode to always use the buy unit when scanning it, even when consuming. I'm not sure if this is the intended behaviour, since it messes up the internal unit selection. Alternatively make it a setting which can enabled or disabled.
Should I make a seperate issue for this or should I just rename this issue?
Anyway, sorry for reporting wrongly reporting a bug. 😔
Oh okay, thanks for your reply. :) Don't worry.
Regarding your question: I just tested it with the server and the barcode unit is always chosen (purchase and consume). But this makes sense I think: You for example buy a pack of eggs with the barcode for "pack" and if you scan it in the consume mode, you also want to consume the whole "pack"... The single eggs are another unit.
I think this is intended behavior. You can ask the community on Reddit or if you think this should be improved you can create an issue in the grocy server repo (but search for existing issues first).
I've tested the bug on both the play store version and the nightly build and it was present in both.
My setup is the following:
Quantity units
Products
[^1]: When initially setting up this product using the grocy app the ratio was set as 1:1 and was later changed in the grocy web ui.
The issue/ bug
In the table below I've written down the behaviour for buying/consuming products using manual entry of the name and using the barcode scanner. I've marked in bold which cells don't correspond to my expected result.
Software
Play Store: V3.2.1 Nightly version: Grocy-Android-master-20230613.apk Grocy version: 3.3.2 (Docker)