Skip to content

Commit

Permalink
fix: don't set rate for non-stock item in Internal Transfer
Browse files Browse the repository at this point in the history
  • Loading branch information
s-aga-r committed Jan 4, 2024
1 parent 351ee5b commit e1b0fff
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions erpnext/controllers/selling_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,9 @@ def set_incoming_rate(self):

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")
):
Expand Down

0 comments on commit e1b0fff

Please sign in to comment.