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

[Backport] Fixed calculation of 'Total' column under "Last Orders" listing on the admin dashboard #21944

Merged

Conversation

eduard13
Copy link
Contributor

Original Pull Request

#21283

Description (*)

The calculation of 'Total' column under "Last Orders" listing on the admin dashboard was wrong. It has below problems.

  1. It wasn't considering the refunded discount amount
  2. It was subtracting discount canceled amount instead of adding when viewing data for a particular website or store

Fixed Issues (if relevant)

  1. Wrong order amount on dashboard on Last orders listing when order has discount and it is partially refunded #21281: Wrong order amount on the dashboard on Last orders listing when the order has discount and it is partially refunded
  2. Negative order amount in dashboard latest order when order is cancelled where coupon has been used #18754: Negative order amount in dashboard latest order when order is cancelled where coupon has been used

Manual testing scenarios (*)

Testing fix for issue##18754

  1. Place an order with a coupon code, for example, 4.95 EUR off
  2. Cancel the order
  3. Go to dashboard select a specific store to view data and notice the total column under "Last Orders" listing

negative-total

Testing fix for issue##21281

  1. Add a product with quantity 3 to Cart
  2. Create a 10% discount coupon from admin and apply it to the cart
  3. Go to checkout and place order
  4. Invoice the order from admin, if placed using the offline payment method
  5. Create a credit memo for the order to refund 2 quantities out of 3
  6. Now notice the "Total" column for order on the admin dashboard under "Last Orders" listing. The refunded discount amount on credit memo is not considered in the total.

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)

@magento-engcom-team
Copy link
Contributor

Hi @eduard13. 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 magento-engcom-team added Component: Reports Release Line: 2.2 Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner labels Mar 26, 2019
@dmytro-ch dmytro-ch self-assigned this Mar 26, 2019
@dmytro-ch dmytro-ch self-requested a review March 26, 2019 20:09
@dmytro-ch
Copy link
Contributor

@magento-engcom-team give me test instance

@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch. Thank you for your request. I'm working on Magento instance for you

@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, here is your new Magento instance.
Admin access: https://pr-21944.instances.magento-community.engineering/admin
Login: admin Password: 123123q

@magento-engcom-team
Copy link
Contributor

Hi @dmytro-ch, thank you for the review.
ENGCOM-4593 has been created to process this Pull Request

@VasylShvorak
Copy link
Contributor

✔️ QA passed

@m2-assistant
Copy link

m2-assistant bot commented Apr 3, 2019

Hi @eduard13, 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 3, 2019
@magento-engcom-team magento-engcom-team added this to the Release: 2.2.9 milestone Apr 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: Reports Partner: Atwix Pull Request is created by partner Atwix partners-contribution Pull Request is created by Magento Partner Progress: accept Release Line: 2.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants