fix: Use account_type == 'Stock' to filter stock accounts

This commit is contained in:
marination 2022-04-26 17:50:51 +05:30
parent 44331f4f1f
commit e2a163d4e9

View File

@ -89,7 +89,7 @@ class Warehouse(NestedSet):
.on(ac.name == gle.account)
.select(gle.account)
.distinct()
.where((sle.warehouse == name) & (ac.root_type == "Asset"))
.where((sle.warehouse == name) & (ac.account_type == "Stock"))
.orderby(sle.creation)
.run(as_dict=True)
)