feat: add make_regional_gl_entries override for Sales Invoice (backport #42399) #42420
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
following review on #42278
For a common feature in France/Europe (but missing in ERPNext core), we've introduce in France Regional Localization app (https://github.com/scopen-coop/erpnext_france), the "Deposit invoice". That's a real Sales invoices / Purchase Invoice issuing (not Payment Request) based on % or fixed amount from a Sales Order / Purchase Order .
We need to adapt make_gl_entries and make_reverse_gl_entries method because the actual tax accounting is not correct according regional accountancy law.
Income amount from this type of invoice can have a different Account, and Tax amount could be accounted in split/spread Accounts if it talk about Goods or Service or also, but not only, depend Customer/Supplier country, and other case...
Actually, we almost manage to update GL entry after core ERPNext make_gl_entries/make_reverse_gl_entries but that not the good way of doing things.
This missing "@erpnext.allow_regional" on these methods force us to spend a lot's of time to "hack" ERPNext, and in some case do not allow to implement the legal requirement for France accounting law.
Let me know what do you think about this PR