diff --git a/erpnext/buying/doctype/purchase_common/purchase_common.py b/erpnext/buying/doctype/purchase_common/purchase_common.py index a1a41ca424..4c307e67a9 100644 --- a/erpnext/buying/doctype/purchase_common/purchase_common.py +++ b/erpnext/buying/doctype/purchase_common/purchase_common.py @@ -269,7 +269,8 @@ class DocType(TransactionBase): item_last_purchase_rate = webnotes.conn.get_value("Item", d.item_code, "last_purchase_rate") if item_last_purchase_rate: - d.purchase_ref_rate = item_last_purchase_rate + d.purchase_ref_rate = d.purchase_rate = d.import_ref_rate \ + = d.import_rate = item_last_purchase_rate def get_last_purchase_details(self, item_code, doc_name): import webnotes