Skip to content

Commit

Permalink
feat: validate discount date in payment schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
barredterra committed Dec 10, 2024
1 parent a7d9642 commit f3f4a9a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions erpnext/controllers/accounts_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -2361,6 +2361,7 @@ def validate_payment_schedule_dates(self):
return

for d in self.get("payment_schedule"):
d.validate_from_to_dates("due_date", "discount_date")
if self.doctype == "Sales Order" and getdate(d.due_date) < getdate(self.transaction_date):
frappe.throw(
_("Row {0}: Due Date in the Payment Terms table cannot be before Posting Date").format(
Expand Down

0 comments on commit f3f4a9a

Please sign in to comment.