Merge pull request #43448 from rohitwaghchaure/fixed-support-22814

fix: last purchase rate for purchase invoice
This commit is contained in:
rohitwaghchaure
2024-09-30 20:05:00 +05:30
committed by GitHub
4 changed files with 71 additions and 30 deletions

View File

@@ -702,9 +702,11 @@ class BuyingController(SubcontractingController):
if self.get("is_return"):
return
if self.doctype in ["Purchase Order", "Purchase Receipt"] and not frappe.db.get_single_value(
"Buying Settings", "disable_last_purchase_rate"
):
if self.doctype in [
"Purchase Order",
"Purchase Receipt",
"Purchase Invoice",
] and not frappe.db.get_single_value("Buying Settings", "disable_last_purchase_rate"):
update_last_purchase_rate(self, is_submit=0)
if self.doctype in ["Purchase Receipt", "Purchase Invoice"]: