-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
fix: Allocate tax loss to tax account head on early payment discount (backport #34287) #34730
Merged
deepeshgarg007
merged 15 commits into
version-13-hotfix
from
mergify/bp/version-13-hotfix/pr-34287
Apr 5, 2023
Merged
fix: Allocate tax loss to tax account head on early payment discount (backport #34287) #34730
deepeshgarg007
merged 15 commits into
version-13-hotfix
from
mergify/bp/version-13-hotfix/pr-34287
Apr 5, 2023
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
- Deductions in payment entry must be split into income loss and tax loss - Compute total discount in percentage, makes discounting different amounts proportionately easier (cherry picked from commit 768c3a4)
(cherry picked from commit 75ec0a0)
- Use field precision to get more accurate values (cherry picked from commit dc2998f)
- Discount value was always trated as a percentage on back updation (cherry picked from commit 2ae5834)
…n discount % test (cherry picked from commit c217bb2)
- Even via JS, deductions amount is always in company currency - Since there is nothing dynamic about this field, set it in the doctype spec itself - fixed: Inconsistency between label currency and field currency formatted value (cherry picked from commit 7f2e7ba)
- misc: better docstring (cherry picked from commit f02fc8a)
- Accounting is in the same currency if party currency and company currency is the same - If accounting is in the same currency, paid and recvd amount is in the base currency - Then, discount amount must also be in the base currency as it is deducted from paid amount - Received amount must be in base currency if not multi currency - cleanup: Deductions setting broken into smaller functions (cherry picked from commit 761f68d)
- Return total discount loss in base currency - Allocate payment based on terms: Set allocated amount in references table in base currency if accounting is in that currency - Allocate payment based on terms: While back updating set paid amount (payment schedule) in transaction currency always - minor: discount msgprint in correct currency (cherry picked from commit b09c238)
…rency accounting + Early payment discount (cherry picked from commit 9abf0ef) # Conflicts: # erpnext/accounts/doctype/payment_entry/test_payment_entry.py
- Round off pending discount loss to avoid miniscule losses rounded to 0.0 that are added in deductions - Use base amounts to calculate base losses instead of using conversion factor which increases rounding error - Round of total base loss instead of individual income and tax losses to reduce rounding error - Use default round off account for pending rounding loss in deductions (cherry picked from commit caa1a3d)
… late - Party could have paid on time but payment is recorded late - Prompt for reference date so that discount is applied while mapping - Prompt only if discount in payment schedule of valid doctypes - test: Reference date and impact on PE - `make_payment_entry` (JS) must be able to access `this` (cherry picked from commit d6d0163) # Conflicts: # erpnext/accounts/doctype/payment_entry/payment_entry.py # erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js # erpnext/buying/doctype/purchase_order/purchase_order.js # erpnext/public/js/controllers/transaction.js
- Checkbox in Accounts Settings - Apply checkbox in PE deductions setting logic - Adjust tests (cherry picked from commit 216a46b) # Conflicts: # erpnext/accounts/doctype/accounts_settings/accounts_settings.json
@deepeshgarg007 hoping this can go in the v13 release 🤞 |
- Make sure check uses this field only for eligible documents
🎉 This PR is included in version 13.49.12 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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.
This is an automatic backport of pull request #34287 done by Mergify.
Cherry-pick of 9abf0ef has failed:
Cherry-pick of d6d0163 has failed:
Cherry-pick of 216a46b has failed:
To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally
Mergify commands and options
More conditions and actions can be found in the documentation.
You can also trigger Mergify actions by commenting on this pull request:
@Mergifyio refresh
will re-evaluate the rules@Mergifyio rebase
will rebase this PR on its base branch@Mergifyio update
will merge the base branch into this PR@Mergifyio backport <destination>
will backport this PR on<destination>
branchAdditionally, on Mergify dashboard you can:
Finally, you can contact us on https://mergify.com