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

Connect Stock Endpoint to Items and Transactions #200

Open
Jooms opened this issue Apr 27, 2023 · 0 comments
Open

Connect Stock Endpoint to Items and Transactions #200

Jooms opened this issue Apr 27, 2023 · 0 comments
Assignees

Comments

@Jooms
Copy link
Contributor

Jooms commented Apr 27, 2023

We have a "/stock" endpoint that returns current amounts of items.

Item amounts are already tracked if someone flattens all of the transactions for each item.

By "flatten" we mean, there might be a transaction that donates 3 bananas and 5 cans of beans. Then 2 cans and 1 banana were "purchased" or "thrown own". If you combine (+3 -1) bananas and (+5 -2) cans of beans, you'll get a current stock of 2 bananas and 3 cans of beans.

There is a suggestion to have a nightly job that handles this.
Please look into how to set that up, or come up with a model-based query that relies only on the transactions.

@Jooms Jooms changed the title Update Stock endpoint to factor-in items that have been thrown-away or purchased Connect Stock Endpoint to Items and Transactions Apr 27, 2023
@briswells briswells self-assigned this Apr 27, 2023
@parthpandey1 parthpandey1 removed their assignment May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants