mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 17:04:47 +00:00
fix: add filter for disabled batch
This commit is contained in:
@@ -1312,7 +1312,10 @@ def get_available_batches(kwargs):
|
|||||||
batch_ledger.warehouse,
|
batch_ledger.warehouse,
|
||||||
Sum(batch_ledger.qty).as_("qty"),
|
Sum(batch_ledger.qty).as_("qty"),
|
||||||
)
|
)
|
||||||
.where(((batch_table.expiry_date >= today()) | (batch_table.expiry_date.isnull())))
|
.where(
|
||||||
|
(batch_table.disabled == 0)
|
||||||
|
& ((batch_table.expiry_date >= today()) | (batch_table.expiry_date.isnull()))
|
||||||
|
)
|
||||||
.where(stock_ledger_entry.is_cancelled == 0)
|
.where(stock_ledger_entry.is_cancelled == 0)
|
||||||
.groupby(batch_ledger.batch_no, batch_ledger.warehouse)
|
.groupby(batch_ledger.batch_no, batch_ledger.warehouse)
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user