mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-21 14:09:19 +00:00
expected delivery date mandatory only if order type is sales
This commit is contained in:
@@ -286,7 +286,7 @@ class DocType(TransactionBase):
|
|||||||
#-----------------------------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------------------------
|
||||||
def validate_order_type(self):
|
def validate_order_type(self):
|
||||||
#validate delivery date
|
#validate delivery date
|
||||||
if self.doc.order_type != 'Maintenance' and not self.doc.delivery_date:
|
if self.doc.order_type == 'Sales' and not self.doc.delivery_date:
|
||||||
msgprint("Please enter 'Expected Delivery Date'")
|
msgprint("Please enter 'Expected Delivery Date'")
|
||||||
raise Exception
|
raise Exception
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user