diff --git a/tailbone/views/reports.py b/tailbone/views/reports.py index 2cb2ae88..377251c5 100644 --- a/tailbone/views/reports.py +++ b/tailbone/views/reports.py @@ -95,6 +95,7 @@ class OrderingWorksheet(View): q = Session.query(model.ProductCost) q = q.join(model.Product) + q = q.filter(model.Product.deleted == False) q = q.filter(model.ProductCost.vendor == vendor) q = q.filter(model.Product.department_uuid.in_([x.uuid for x in departments])) if preferred_only: @@ -168,6 +169,7 @@ class InventoryWorksheet(View): def get_products(subdepartment): q = Session.query(model.Product) q = q.outerjoin(model.Brand) + q = q.filter(model.Product.deleted == False) q = q.filter(model.Product.subdepartment == subdepartment) if self.request.params.get('weighted-only'): q = q.filter(model.Product.unit_of_measure == enum.UNIT_OF_MEASURE_POUND)