Skip to content
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

[MODINVOICE-554]. Invoices app: Incorrect formula for calculating adjustments, that are included and pro-rated by amount #509

Merged
merged 3 commits into from
Oct 11, 2024

Conversation

BKadirkhodjaev
Copy link
Contributor

@BKadirkhodjaev BKadirkhodjaev commented Oct 10, 2024

Purpose

Approach

  • Add a custom method for correct invoice lines-independent VAT calculation
    • Calculate invoice line adjustment amount with adjustmentAmount = (subTotal * adjustmentRate) / (100 + adjustmentRate)
    • Calculate invoice line sub total amount with subTotal = subTotal - adjustmentAmount
    • Tested with unit tests and Karate tests for regression

Related issues

…ustments, that are included and pro-rated by amount
@BKadirkhodjaev BKadirkhodjaev requested a review from a team October 10, 2024 14:18
@BKadirkhodjaev BKadirkhodjaev marked this pull request as ready for review October 10, 2024 18:07
Copy link

@BKadirkhodjaev BKadirkhodjaev merged commit 4ababdf into master Oct 11, 2024
4 checks passed
BKadirkhodjaev added a commit that referenced this pull request Oct 21, 2024
…ting adjustments, that are included and pro-rated by amount (#509)"

This reverts commit 4ababdf.
BKadirkhodjaev added a commit that referenced this pull request Oct 22, 2024
* Revert "[MODINVOICE-554-2]. Change invoice total and adjustments total calculation (#512)"

This reverts commit 8dcd006.

* Revert "[MODINVOICE-554]. Invoices app: Incorrect formula for calculating adjustments, that are included and pro-rated by amount (#509)"

This reverts commit 4ababdf.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants