fix: valuation rate for the legacy batches (#42011)

This commit is contained in:
rohitwaghchaure
2024-06-25 12:32:27 +05:30
committed by GitHub
parent d50487ce53
commit 9ab333d105
4 changed files with 63 additions and 41 deletions

View File

@@ -276,11 +276,7 @@ def get_incoming_rate(args, raise_error_if_no_rate=True):
sn_obj = SerialNoValuation(sle=args, warehouse=args.get("warehouse"), item_code=args.get("item_code"))
return sn_obj.get_incoming_rate()
elif (
args.get("batch_no")
and frappe.db.get_value("Batch", args.get("batch_no"), "use_batchwise_valuation", cache=True)
and not args.get("serial_and_batch_bundle")
):
elif args.get("batch_no") and not args.get("serial_and_batch_bundle"):
args.actual_qty = args.qty
args.batch_nos = frappe._dict({args.batch_no: args})