mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-18 02:55:20 +00:00
fix: update modified for last purchase rate (#59044)
(cherry picked from commit f6b907ef9d)
Co-authored-by: rohitwaghchaure <rohitw1991@gmail.com>
This commit is contained in:
@@ -43,7 +43,9 @@ def update_last_purchase_rate(doc, is_submit) -> None:
|
||||
frappe.throw(_("UOM Conversion factor is required in row {0}").format(d.idx))
|
||||
|
||||
# update last purchsae rate
|
||||
frappe.db.set_value("Item", d.item_code, "last_purchase_rate", flt(last_purchase_rate))
|
||||
frappe.db.set_value(
|
||||
"Item", d.item_code, "last_purchase_rate", flt(last_purchase_rate), update_modified=False
|
||||
)
|
||||
|
||||
|
||||
def validate_for_items(doc) -> None:
|
||||
|
||||
@@ -730,7 +730,7 @@ class Item(Document):
|
||||
|
||||
def set_last_purchase_rate(self, new_name):
|
||||
last_purchase_rate = get_last_purchase_details(new_name).get("base_net_rate", 0)
|
||||
frappe.db.set_value("Item", new_name, "last_purchase_rate", last_purchase_rate)
|
||||
frappe.db.set_value("Item", new_name, "last_purchase_rate", last_purchase_rate, update_modified=False)
|
||||
|
||||
def recalculate_bin_qty(self, new_name):
|
||||
from erpnext.stock.stock_balance import repost_stock
|
||||
|
||||
Reference in New Issue
Block a user