chore: Update condition
This commit is contained in:
parent
fa15221455
commit
6a47fb6c9e
@ -240,7 +240,11 @@ class AccountsController(TransactionBase):
|
|||||||
item.set(field_map.get(self.doctype), default_deferred_account)
|
item.set(field_map.get(self.doctype), default_deferred_account)
|
||||||
|
|
||||||
def validate_auto_repeat_subscription_dates(self):
|
def validate_auto_repeat_subscription_dates(self):
|
||||||
if getdate(self.from_date) > getdate(self.to_date):
|
if (
|
||||||
|
self.get("from_date")
|
||||||
|
and self.get("to_date")
|
||||||
|
and getdate(self.from_date) > getdate(self.to_date)
|
||||||
|
):
|
||||||
frappe.throw(_("To Date cannot be before From Date"), title=_("Invalid Auto Repeat Date"))
|
frappe.throw(_("To Date cannot be before From Date"), title=_("Invalid Auto Repeat Date"))
|
||||||
|
|
||||||
def validate_deferred_start_and_end_date(self):
|
def validate_deferred_start_and_end_date(self):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user