Add 'on_order' quantity to the part list API
This commit is contained in:
parent
d0f71ea6de
commit
dae45875fb
|
|
@ -172,6 +172,7 @@ class PartList(generics.ListCreateAPIView):
|
|||
'active',
|
||||
).annotate(
|
||||
in_stock=Sum('stock_items__quantity'),
|
||||
on_order=Sum('supplier_parts__purchase_order_line_items__quantity'),
|
||||
)
|
||||
|
||||
# TODO - Annotate total being built
|
||||
|
|
|
|||
Loading…
Reference in New Issue