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

Fixed Issue #20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20252

Merged

Conversation

shikhamis11
Copy link
Member

Fixed Issue #20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No

Preconditions

  1. Magento 2.2.6 Community
  2. Reproduced on PHP 7.1.18 and 7.1.25
  3. MariaDB 10.1.26 and 10.3.11
  4. Go to Stores -> Configuration -> Catalog -> Inventory and make sure the following options are set as per below:
  • Decrease Stock When Order is Placed to Yes
  • Set Items' Status to be In Stock When Order is Cancelled to No
  • Manage Stock to Yes
  • Automatically Return Credit Memo Item to Stock to No
    (see screenshot below)
    image

Steps to reproduce

  1. Place an order with 1 item of product (i.e. qty = 1)
  2. Cancel order

Expected result

  1. Product quantity in product catalog is decreased by 1 after order is created
  2. Product quantity remains the same (i.e. does not increase) after order is canceled

Actual result

  1. Product quantity in product catalog is decreased by 1 after order is created
  2. Product quantity is increased by 1 immediately after order is canceled

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)

Fixed Issue magento#20121 Cancel order increases stock although "Set Items' Status to be In Stock When Order is Cancelled" is set to No
@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11. 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.3-develop instance - deploy vanilla Magento instance

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

@magento-engcom-team magento-engcom-team added this to the Release: 2.3.1 milestone Jan 13, 2019
@magento-engcom-team
Copy link
Contributor

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

@sivaschenko sivaschenko self-assigned this Jan 16, 2019
@ghost
Copy link

ghost commented Jan 23, 2019

Hi @shikhamis11, 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 Jan 23, 2019
… "Set Items' Status to be In Stock When Order is Cancelled" is set to No #20252
@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

@magento-engcom-team
Copy link
Contributor

Hi @shikhamis11. Thank you for your contribution.
We will aim to release these changes as part of 2.3.1.
Please check the release notes for final confirmation.

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