feat: Enable discount accounting#26359
Merged
deepeshgarg007 merged 54 commits intoAug 14, 2021
Merged
Conversation
…le_discount_accounting
This was referenced Jul 6, 2021
deepeshgarg007
requested changes
Jul 9, 2021
deepeshgarg007
left a comment
Member
There was a problem hiding this comment.
-
One more discount account field at parent level needs to be added if additional discounts are applied. If additional discount is applied on Grand Total then tax GL Entries should be made for full amount instead of post discount amount
-
Add test cases
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Member
|
Great description for PR 👍 |
nabinhait
requested changes
Aug 10, 2021
d0a2bdd to
f977c65
Compare
Contributor
Author
|
@nabinhait Thanks! |
pruthvi145
reviewed
Sep 17, 2021
| "warehouse": warehouse, | ||
| "income_account": get_default_income_account(args, item_defaults, item_group_defaults, brand_defaults), | ||
| "expense_account": expense_account or get_default_expense_account(args, item_defaults, item_group_defaults, brand_defaults) , | ||
| "discount_account": None or get_default_discount_account(args, item_defaults), |
Contributor
There was a problem hiding this comment.
Why you did None or? Isn't it always run the second part?
asoral
pushed a commit
to asoral/erpnext
that referenced
this pull request
Nov 12, 2021
…nting feat: Enable discount accounting
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Problem:
Currently any item or addition discount applied is accounted in the Income account itself and there is no way to account for discounts in a separate account head. The only workaround possible for now is to use Item Tax templates with negative rate but there is no way to apply fixed amount discount (has to be done manually by back calculating rate) and add that rate in Item Tax Template
Fix:
For Sales Invoice
For Purchase Invoice
Example
Item cost = Rs 100
Tax Amount = Rs 20
Discount Percentage = 20%
Therefore, Discount Amount = Rs 24
For Sales Invoice
Before:
After:
For Purchase Invoice
Before:
After:
Docs
Testing Info