mirror of
https://github.com/frappe/erpnext.git
synced 2026-04-20 23:35:11 +00:00
fix: better validation message for Purchase Invoice with Update Stock
(cherry picked from commit cfb06cf247)
This commit is contained in:
committed by
Mergify
parent
005ff0d6a8
commit
839f5f6a29
@@ -733,9 +733,10 @@ class PurchaseInvoice(BuyingController):
|
|||||||
for item in self.get("items"):
|
for item in self.get("items"):
|
||||||
if item.purchase_receipt:
|
if item.purchase_receipt:
|
||||||
frappe.throw(
|
frappe.throw(
|
||||||
_("Stock cannot be updated against Purchase Receipt {0}").format(
|
_(
|
||||||
item.purchase_receipt
|
"Stock cannot be updated for Purchase Invoice {0} because a Purchase Receipt {1} has already been created for this transaction. Please disable the 'Update Stock' checkbox in the Purchase Invoice and save the invoice."
|
||||||
)
|
).format(self.name, item.purchase_receipt),
|
||||||
|
title=_("Stock Update Not Allowed"),
|
||||||
)
|
)
|
||||||
|
|
||||||
def validate_for_repost(self):
|
def validate_for_repost(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user