Skip to content

GH-26597: Also calculate tax discount compensation amount when prices are configured excl. tax #26598

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

Open
wants to merge 1 commit into
base: 2.4-develop
Choose a base branch
from

Conversation

moloughlin
Copy link

@moloughlin moloughlin commented Jan 31, 2020

This is a fix for the issue raised here: #26597

See: \Magento\Tax\Model\Calculation\AbstractAggregateCalculator::calculateWithTaxInPrice and notice that in this scenario, the calculator does the correct thing for computing compensation value:
$discountTaxCompensationAmount = $rowTax - $rowTaxAfterDiscount;

Meanwhile in: \Magento\Tax\Model\Calculation\AbstractAggregateCalculator::calculateWithTaxNotInPrice the calculation is missing. Tax discount compensation should be calculated regardless of whether catalog prices were provided incl vs excl tax.

… prices are configured to be exclusive of tax.
@m2-assistant
Copy link

m2-assistant bot commented Jan 31, 2020

Hi @moloughlin. Thank you for your contribution
Here is some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Guide documentation.

@magento-engcom-team magento-engcom-team added Partner: Aligent Consulting partners-contribution Pull Request is created by Magento Partner labels Jan 31, 2020
@sidolov sidolov added Priority: P3 May be fixed according to the position in the backlog. Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround. labels Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Partner: Aligent Consulting partners-contribution Pull Request is created by Magento Partner Priority: P3 May be fixed according to the position in the backlog. Progress: pending review Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants