mirror of
https://github.com/frappe/erpnext.git
synced 2026-11-15 21:20:55 +00:00
fix: only allow a submitted quotation to be set as Lost
This commit is contained in:
@@ -263,6 +263,9 @@ class Quotation(SellingController):
|
||||
):
|
||||
self.check_permission("write")
|
||||
|
||||
if self.docstatus != 1:
|
||||
frappe.throw(_("Only a submitted Quotation can be set as Lost."))
|
||||
|
||||
if not (self.is_fully_ordered() or self.is_partially_ordered()):
|
||||
get_lost_reasons = frappe.get_list("Quotation Lost Reason", fields=["name"])
|
||||
lost_reasons_lst = [reason.get("name") for reason in get_lost_reasons]
|
||||
|
||||
Reference in New Issue
Block a user