Skip to content

Commit

Permalink
fix: valuation rate for batch
Browse files Browse the repository at this point in the history
  • Loading branch information
rohitwaghchaure committed Feb 23, 2025
1 parent a81867b commit b88305a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions erpnext/stock/deprecated_serial_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,8 @@ def get_last_sle_for_sabb_no_batchwise_valuation(self):
if self.sle.voucher_detail_no:
query = query.where(sabb.voucher_detail_no != self.sle.voucher_detail_no)

query = query.where(sabb.voucher_type != "Pick List")

data = query.run(as_dict=True)
if not data:
return {}
Expand Down
2 changes: 1 addition & 1 deletion erpnext/stock/doctype/bin/bin.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ def update_qty(bin_name, args):
& (sle.warehouse == args.get("warehouse"))
& (sle.is_cancelled == 0)
)
.orderby(CombineDatetime(sle.posting_date, sle.posting_time), order=Order.desc)
.orderby(sle.posting_datetime, order=Order.desc)
.orderby(sle.creation, order=Order.desc)
.limit(1)
.run()
Expand Down

0 comments on commit b88305a

Please sign in to comment.