Browse Source

Merge pull request #29009 from deepeshgarg007/deferred_service_start_date_validate

fix: Start date validation for deferred invoices
develop
Deepesh Garg 3 years ago
committed by GitHub
parent
commit
d02dcb6433
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      erpnext/controllers/accounts_controller.py

2
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)) 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): 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)) 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): def validate_invoice_documents_schedule(self):
self.validate_payment_schedule_dates() self.validate_payment_schedule_dates()

Loading…
Cancel
Save