I have a question regarding the validation in Purchase Invoice that throws the following error:
“Supplier Invoice Date cannot be greater than Posting Date”
We have a customer who would like to set the Posting Date earlier than the Supplier Invoice Date, but ERPNext does not allow this due to the validation.
Before overriding this behavior, I would like to better understand the intention behind this restriction.
Is this validation simply meant to prevent inconsistent date entries (for example, entering an invoice date before the supplier’s invoice date)?
Or does it protect against a deeper accounting, legal, or reporting issue within ERPNext?
In other words:
Would overriding this validation potentially cause downstream problems in accounting, tax reporting, or other modules?
I would appreciate any insights into the reasoning behind this design decision.
The issue is that you might have an invoice for things like utilities (electric bill etc) which have an invoice date of let’s say the 10th of a month, but the billing cycle was in the previous month. So to accurately book expenses, you need to post it in the previous month, even though the invoice was generated later.
I wanted to remove this validation earlier, but found a weird hack using doc_events to get around it. Can we remove it though?
@mihir-kandoi Thank you, for your response. Our customer has exactly the same use case as described by Nikhil.
From an accounting perspective, there are valid reasons why the Posting Date may need to be earlier than the Supplier Invoice Date, especially for accrual-based accounting (e.g. utilities, rent, subscriptions, or other recurring expenses that belong to a previous accounting period but are invoiced later).
That’s why I’m trying to understand whether this validation protects against a deeper system or accounting issue or if it’s mainly a logical safeguard that might be too restrictive for certain real-world scenarios.
@nikkothari22 have you observed any side effects after bypassing the validation?