Skip to content

Connect Stock Endpoint to Items and Transactions #200

Description

@Jooms

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions