diff --git a/brewman/brewman/routers/reports/closing_stock.py b/brewman/brewman/routers/reports/closing_stock.py index 2bb95f39..a0a2efec 100644 --- a/brewman/brewman/routers/reports/closing_stock.py +++ b/brewman/brewman/routers/reports/closing_stock.py @@ -154,7 +154,7 @@ def build_report(date_: date, cost_centre_id: uuid.UUID, db: Session) -> List[sc or_(Voucher.voucher_type != VoucherType.CLOSING_STOCK, Voucher.date != date_), ) .group_by(StockKeepingUnit, Product, ProductGroup) - .order_by(amount_sum.desc()) + .order_by(ProductGroup.name, Product.name, StockKeepingUnit.units) ).all() physical_list = (