fix: don't set rate for non-stock item in Internal Transfer

This commit is contained in:
s-aga-r 2024-01-04 11:43:02 +05:30
parent 351ee5b8fe
commit e1b0fffd0c

View File

@ -432,6 +432,9 @@ class SellingController(StockController):
items = self.get("items") + (self.get("packed_items") or [])
for d in items:
if not frappe.get_cached_value("Item", d.item_code, "is_stock_item"):
continue
if not self.get("return_against") or (
get_valuation_method(d.item_code) == "Moving Average" and self.get("is_return")
):