Skip to content

Commit

Permalink
Merge pull request #41842 from ljain112/fix-item-valuation
Browse files Browse the repository at this point in the history
fix: regional overide for updating item valution
  • Loading branch information
vorasmit authored Jun 13, 2024
2 parents 7996723 + 1a10f0b commit 99695df
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 @@ -937,3 +940,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 99695df

Please sign in to comment.