-
Notifications
You must be signed in to change notification settings - Fork 7.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Ledger for advance payment (backport #43709) #43946
Merged
ruthra-kumar
merged 25 commits into
version-15-hotfix
from
mergify/bp/version-15-hotfix/pr-43709
Nov 4, 2024
Merged
feat: Ledger for advance payment (backport #43709) #43946
ruthra-kumar
merged 25 commits into
version-15-hotfix
from
mergify/bp/version-15-hotfix/pr-43709
Nov 4, 2024
+525
−14
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cherry picked from commit 2d6efd7)
(cherry picked from commit f176a82)
(cherry picked from commit 575ca5b)
(cherry picked from commit 2b2360b) # Conflicts: # erpnext/controllers/accounts_controller.py
(cherry picked from commit 3c53b92)
(cherry picked from commit e2891a6)
(cherry picked from commit c4197c3)
(cherry picked from commit 14357bc)
(cherry picked from commit fca5e95)
(cherry picked from commit 35a8a18)
(cherry picked from commit b927f2f)
(cherry picked from commit 8ab7194)
(cherry picked from commit 767ae6a)
(cherry picked from commit 8e3bf7d)
(cherry picked from commit ad88bde)
(cherry picked from commit ae6a81c)
(cherry picked from commit 6c73156)
(cherry picked from commit 9c1a4e2)
(cherry picked from commit 1825082)
(cherry picked from commit 14cef3d)
(cherry picked from commit ca85c75)
(cherry picked from commit cf7b8f1)
mergify
bot
requested review from
deepeshgarg007,
rohitwaghchaure and
ruthra-kumar
as code owners
November 1, 2024 08:35
Cherry-pick of 2b2360b has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Issue
System allows advance payment to exceed Sales / Purchase Order grand total.
Consider below scenario,
Current Limitation
This happens because technically there is no distinction between a Normal Payment and an Advance Payment. So there is no persistent data structure to track the Advance Amount received for a Sales / Purchase Order. This distinction is inferred solely based on the allocation. If the Payment is allocated to a Sales / Purchase Order, then it is considered as an Advance Payment.
The problem with this approach is once reconciliation happens, the allocation to Sales / Purchase Order are replaced with an Invoice. So, we loose the critical information: A certain amount was received as an Advance, but it is now allocated to an Invoice.
Solution
A separate ledger to track Advance Payments against Sales Order or Purchase Order that only captures Submit and Cancel events. This way Reconciliation / Un-Reconciliation doesn't affect the advance amount calculation.
todo:
[ ] Refactor HR code as wellFor
Employee Advance
andGratuity
, reference is maintained even after the advance has been allocated. So, HRMS will continue to use GL Entry for calculatingadvance_paid
,no-docs
This is an automatic backport of pull request #43709 done by Mergify.