-
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: Enable discount accounting #26359
feat: Enable discount accounting #26359
Conversation
…le_discount_accounting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-
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
erpnext/accounts/doctype/accounts_settings/accounts_settings.json
Outdated
Show resolved
Hide resolved
erpnext/accounts/doctype/accounts_settings/accounts_settings.py
Outdated
Show resolved
Hide resolved
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Co-authored-by: Deepesh Garg <42651287+deepeshgarg007@users.noreply.github.com>
Great description for PR 👍 |
d0a2bdd
to
f977c65
Compare
@nabinhait Thanks! |
@@ -286,6 +286,7 @@ def get_basic_details(args, item, overwrite_warehouse=True): | |||
"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), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you did None or
? Isn't it always run the second part?
…nting feat: Enable discount accounting
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