Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Price: add new "consumption-related" field on receipts: receipt_quantity #499

Closed
2 of 3 tasks
raphodn opened this issue Oct 5, 2024 · 1 comment · Fixed by #498 or #666
Closed
2 of 3 tasks

Price: add new "consumption-related" field on receipts: receipt_quantity #499

raphodn opened this issue Oct 5, 2024 · 1 comment · Fixed by #498 or #666

Comments

@raphodn
Copy link
Member

raphodn commented Oct 5, 2024

Story

Linked with #387

Allow users to input the number bought for a given item.

Say in a receipt I buy 2x Snickers, I will add its price once, but I want to store somewhere the info that it was bought in a larger quantity. This would rather be stored on the Price model. For instance receipt_quantity. Defaults to 1.

Todo

Frontend integration: see openfoodfacts/open-prices-frontend#974

@raphodn
Copy link
Member Author

raphodn commented Jan 1, 2025

In #666 I made a change to the field type. We now allow users to store Decimal numbers.
Why? For "raw category" prices, for instance buying 2.5 kg of bananas.

See also openfoodfacts/open-prices-frontend#1090

@raphodn raphodn closed this as completed Jan 1, 2025
@github-project-automation github-project-automation bot moved this from In review to Done in 💸 Open Prices Jan 1, 2025
@raphodn raphodn linked a pull request Jan 1, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
1 participant