Grocy-SwiftUI icon indicating copy to clipboard operation
Grocy-SwiftUI copied to clipboard

unexpected behaviour when purchasing item with a Factor purchase to stock quantity unit

Open analogmonster opened this issue 4 years ago • 7 comments

I have a product that is 10 pieces in a pack. I want to purchase a pack. The new stock amount increases it by 1 piece, not 10 pieces/1 pack. If I do a purchase of 1 pack through the grocy web interface I get the expected behaviour, 10 pieces in the inventory.

In the product master data, the Quantity unit stock is set to piece, Default quantity unit purchase is set to pack and Factor purchase to stock quantity unit to 10.

I am pretty sure this is a bug, but if not could you please let me know how to use your app so it works in the same way as the web interface

analogmonster avatar Oct 08 '21 00:10 analogmonster

The quantity unit conversion is not implemented indeed, since I thought it was handled by the server. I am working on a fix.

supergeorg avatar Oct 08 '21 15:10 supergeorg

Good to know, sometimes I am missing something obvious. I’m almost exclusively using your app to access my grocy instance, thanks a lot for your work

On 8 Oct 2021, at 16:26, Georg Meißner @.***> wrote:



The quantity unit conversion is not implemented indeed, since I thought it was handled by the server. I am working on a fix.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fsupergeorg%2FGrocy-SwiftUI%2Fissues%2F40%23issuecomment-938730451&data=04%7C01%7C%7Cf6664f8292134375321f08d98a70032d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693035959142616%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=onwmt%2Fmg%2BS%2Bwc2u%2FhH%2BSZYz1AJrnvXjzbvoRkMEnPk4%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABPMG3FWPI2RLXQKYVDSOEDUF4ESTANCNFSM5FSOWINQ&data=04%7C01%7C%7Cf6664f8292134375321f08d98a70032d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693035959142616%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=H%2BWXW05oef6OK2gqsJhDccBs87DPtKaqOrRc0g30EbE%3D&reserved=0. Triage notifications on the go with GitHub Mobile for iOShttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fapps.apple.com%2Fapp%2Fapple-store%2Fid1477376905%3Fct%3Dnotification-email%26mt%3D8%26pt%3D524675&data=04%7C01%7C%7Cf6664f8292134375321f08d98a70032d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693035959152572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=myJiZN7CwMSTcP4ZuCnHlki9MT3vYz9WUv%2B6K3tlgPc%3D&reserved=0 or Androidhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fplay.google.com%2Fstore%2Fapps%2Fdetails%3Fid%3Dcom.github.android%26referrer%3Dutm_campaign%253Dnotification-email%2526utm_medium%253Demail%2526utm_source%253Dgithub&data=04%7C01%7C%7Cf6664f8292134375321f08d98a70032d%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C637693035959152572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IdnEziYtsokleFtp%2FoZPWQvOhI5V7J0mimV%2Bfg6q1I4%3D&reserved=0.

analogmonster avatar Oct 08 '21 23:10 analogmonster

I confirm, i use this app synced with my home lab and this behaviour complicated my whole groceries management

Zac5teeve avatar Dec 07 '21 15:12 Zac5teeve

I'm sorry for this up... I agree with @Zac5teeve, this comportement complicate a lot the management, and my wife refuses to use it as long as this doesn't work... 👎 !

Same problem, with weight. For example, if I scan a barcode of a tin can of 300g of carrots, the app in increment basicaly of 1g of carrots instead of 300g by barcode recognition.

For information, Pantry Party App does it but I found the interface ugly compared to @supergeorg work's !

Will711990 avatar Jan 22 '22 11:01 Will711990

Ok, after some updates I tried to reproduce the workflow with my app (the soon releasing update containing qu conversions editing). The factor purchase to stock should be set to one, otherwise purchasing 1 pack may mean 10 packs meaning 100 pieces. But with the correct unit and conversion, it should work. Please report if it doesn't otherwise (with the demo website).

Simulator Screen Shot - iPhone 12 - 2022-02-12 at 18 36 58 Simulator Screen Shot - iPhone 12 - 2022-02-12 at 18 37 24 Simulator Screen Shot - iPhone 12 - 2022-02-12 at 18 37 31 Simulator Screen Shot - iPhone 12 - 2022-02-12 at 18 38 04 Simulator Screen Shot - iPhone 12 - 2022-02-12 at 18 39 12

supergeorg avatar Feb 12 '22 17:02 supergeorg

I am experiencing the same issue - scanning a barcode adds 1 piece instead of 1 pack. I wasn't sure how to test the TestQUConversion parts - I didn't see them on the grocy demo server or anything. Using the windows app with the ios app.

Yowaishi avatar May 04 '22 16:05 Yowaishi

@supergeorg Hi, not sure if you are aware, but the bug here occurs in case you set Factor purchase to stock quantity unit in the Product , so for example here https://demo.grocy.info/product/10.

( so don't change https://demo.grocy.info/quantityunit/3 as you described above, just leave this at the default, which is 'No data available in table' )

notDavid avatar May 23 '22 21:05 notDavid