Skip to content

Conversation

ilnytskyi
Copy link
Contributor

Original Pull Request

#14468
Added additional check for discount

Description

Added additional check for full (100%) discount in
app/code/Magento/SalesRule/Model/Utility.php:214
to see if delta (row total minus discount) is negative. In case of negative delta to decrease a discount on delta value.

Fixed Issues (if relevant)

  1. Tax rate + 100% discount results in negative grand total #10790 Tax rate + 100% discount results in negative grand total

Manual testing scenarios

  1. Create product A with price = 2 762,71
  2. Create product B with price = 2 542,37
  3. Setup tax rule 18%
  4. Create coupon code that adds 100% discount.
  5. Add both products to the cart with qty = 2
  6. Apply coupon code
  7. Total Order should be 0

Contribution checklist

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • All automated tests passed successfully (all builds on Travis CI are green)

@m2-assistant
Copy link

m2-assistant bot commented Apr 8, 2019

Hi @ilnytskyi. 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-engcom-team give me test instance - deploy test instance based on PR changes
  • @magento-engcom-team give me 2.2-develop instance - deploy vanilla Magento instance

For more details, please, review the Magento Contributor Assistant documentation

@magento-engcom-team
Copy link
Contributor

Hi @rogyar, thank you for the review.
ENGCOM-4718 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@m2-assistant
Copy link

m2-assistant bot commented Apr 15, 2019

Hi @ilnytskyi, thank you for your contribution!
Please, complete Contribution Survey, it will take less than a minute.
Your feedback will help us to improve contribution process.

magento-engcom-team pushed a commit that referenced this pull request Apr 15, 2019
@magento-engcom-team magento-engcom-team added this to the Release: 2.2.9 milestone Apr 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants