diff --git a/brewman/brewman/routers/batch_integrity.py b/brewman/brewman/routers/batch_integrity.py index 122e854e..0d5afb00 100644 --- a/brewman/brewman/routers/batch_integrity.py +++ b/brewman/brewman/routers/batch_integrity.py @@ -17,7 +17,6 @@ from ..models.journal import Journal from ..models.product import Product from ..models.stock_keeping_unit import StockKeepingUnit from ..models.voucher import Voucher -from ..models.voucher_type import VoucherType from ..schemas.user import UserToken from .issue import refresh_voucher @@ -47,14 +46,6 @@ def negative_batches(db: Session) -> List[schemas.BatchIntegrity]: .join(Inventory.voucher) .join(Voucher.journals) .where( - Voucher.voucher_type.in_( - [ - VoucherType.PURCHASE, - VoucherType.PURCHASE_RETURN, - VoucherType.ISSUE, - VoucherType.OPENING_BATCHES, - ] - ), Journal.cost_centre_id == CostCentre.cost_centre_purchase(), ) .group_by(Batch, Product.name) @@ -87,14 +78,6 @@ def batch_details(batch_id: uuid.UUID, db: Session) -> List[schemas.BatchIntegri .join(Voucher.journals) .where( Inventory.batch_id == batch_id, - Voucher.voucher_type.in_( - [ - VoucherType.PURCHASE, - VoucherType.PURCHASE_RETURN, - VoucherType.ISSUE, - VoucherType.OPENING_BATCHES, - ] - ), Journal.cost_centre_id == CostCentre.cost_centre_purchase(), ) ).all()