Skip to content

Commit

Permalink
Merge pull request #143 from 8848digital/serial_and_batch_number_issue
Browse files Browse the repository at this point in the history
fix: resolved issue for delivery note and purchase receipt on submit …
  • Loading branch information
aasif-patel authored Oct 1, 2024
2 parents 7320f36 + c2e5a82 commit a04991f
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1902,7 +1902,7 @@ def get_available_batches(kwargs):
)
.where(batch_table.disabled == 0)
.where(stock_ledger_entry.is_cancelled == 0)
.groupby(batch_ledger.batch_no, batch_ledger.warehouse)
.groupby(batch_ledger.batch_no, batch_ledger.warehouse, batch_table.creation)
)

if not kwargs.get("for_stock_levels"):
Expand Down Expand Up @@ -2186,7 +2186,12 @@ def get_stock_ledgers_batches(kwargs):
stock_ledger_entry.batch_no,
)
.where((stock_ledger_entry.is_cancelled == 0) & (stock_ledger_entry.batch_no.isnotnull()))
.groupby(stock_ledger_entry.batch_no, stock_ledger_entry.warehouse)
.groupby(
stock_ledger_entry.batch_no,
stock_ledger_entry.warehouse,
stock_ledger_entry.item_code,
batch_table.creation
)
)

for field in ["warehouse", "item_code", "batch_no"]:
Expand Down

0 comments on commit a04991f

Please sign in to comment.