#779 Received state for orders (PR #789, #779)

This commit is contained in:
lentschi 2021-02-03 20:57:53 +01:00 committed by GitHub
parent 67ad202859
commit 085562dbf4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 23 additions and 8 deletions

View file

@ -21,7 +21,7 @@ class StockArticle < Article
def quantity_ordered
OrderArticle.where(article_id: id).
joins(:order).where(orders: {state: ['open', 'finished']}).sum(:units_to_order)
joins(:order).where(orders: {state: %w[open finished received]}).sum(:units_to_order)
end
def quantity_history