Change the default sort in Closing Stock

This commit is contained in:
Amritanshu Agrawal 2021-11-02 12:31:12 +05:30
parent ce01a4d1f3
commit e06c8b484e

View File

@ -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 = (