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

Prevent invoice cancelation multiple times 2.2-develop [Backport] #11261

Merged
merged 2 commits into from
Oct 16, 2017

Conversation

osrecio
Copy link
Member

@osrecio osrecio commented Oct 5, 2017

Add Guard Clause to check if invoice has been canceled previously

Description

The invoice gets canceled twice, so order amounts are also being adjusted twice.

With same approach of Magento\Sales\Model\Order::cancel added guard clause to avoid recancel order.

Fixed Issues (if relevant)

  1. Canceled invoice can be canceled again #9968

Manual testing scenarios

  1. Load Invoice programmatically
  2. Cancel Invoice
  3. Try to Cancel the same invoice

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)

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.

4 participants