fix: valuation rate for batch

(cherry picked from commit b88305a95f)
This commit is contained in:
Rohit Waghchaure
2025-02-23 22:04:52 +05:30
committed by Mergify
parent 0ae2d61974
commit c72dab49f4
2 changed files with 3 additions and 1 deletions

View File

@@ -332,6 +332,8 @@ class DeprecatedBatchNoValuation:
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 {}

View File

@@ -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()