From 7ad149f9fec06cd730d9734f3515608c1e4c1ed8 Mon Sep 17 00:00:00 2001 From: Deepesh Garg Date: Thu, 23 Dec 2021 14:39:20 +0530 Subject: [PATCH] fix: Start date validation for deferred invoices --- erpnext/controllers/accounts_controller.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 2c92820a74..c862774060 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -184,6 +184,8 @@ class AccountsController(TransactionBase): frappe.throw(_("Row #{0}: Service Start Date cannot be greater than Service End Date").format(d.idx)) elif getdate(self.posting_date) > getdate(d.service_end_date): frappe.throw(_("Row #{0}: Service End Date cannot be before Invoice Posting Date").format(d.idx)) + elif getdate(self.posting_date) > getdate(d.service_start_date): + frappe.throw(_("Row #{0}: Service Start Date cannot be before Invoice Posting Date").format(d.idx)) def validate_invoice_documents_schedule(self): self.validate_payment_schedule_dates()