fix: add filter for disabled batch
This commit is contained in:
parent
988d755906
commit
90a77030a7
@ -1312,7 +1312,10 @@ def get_available_batches(kwargs):
|
||||
batch_ledger.warehouse,
|
||||
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)
|
||||
.groupby(batch_ledger.batch_no, batch_ledger.warehouse)
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user