Skip to content

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