Skip to content

Commit

Permalink
fix: regional overide for updating item valution
Browse files Browse the repository at this point in the history
(cherry picked from commit 1a10f0b)
  • Loading branch information
ljain112 authored and mergify[bot] committed Jun 13, 2024
1 parent ac2e760 commit 5ea2cdc
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions erpnext/controllers/buying_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from frappe.utils import cint, flt, getdate
from frappe.utils.data import nowtime

import erpnext
from erpnext.accounts.doctype.budget.budget import validate_expense_against_budget
from erpnext.accounts.party import get_party_details
from erpnext.buying.utils import update_last_purchase_rate, validate_for_items
Expand Down Expand Up @@ -332,6 +333,8 @@ def update_valuation_rate(self, reset_outgoing_rate=True):
else:
item.valuation_rate = 0.0

update_regional_item_valuation_rate(self)

def set_incoming_rate(self):
if self.doctype not in ("Purchase Receipt", "Purchase Invoice", "Purchase Order"):
return
Expand Down Expand Up @@ -935,3 +938,8 @@ def validate_item_type(doc, fieldname, message):
).format(items, message)

frappe.throw(error_message)


@erpnext.allow_regional
def update_regional_item_valuation_rate(doc):
pass

0 comments on commit 5ea2cdc

Please sign in to comment.