Skip to content

[Bug]: Cancel fulfillment not working when item has negative stock #12796

Description

@pepijn-vanvlaanderen

What happended?

Reproduce steps

  1. Create a fulfillment for an order
  2. Set one of the products to negative stock
    2.1 this can happen when stock is updated by external fulfiller due to backorders)
  3. Cancel fullment is not possible

Workaround:

  1. Set the specific items to inventory_quantity 0
  2. Cancel fullfilment
  3. Set the specif items to inventory_quantity 0 (this is important, otherwise items has gained the stock of cancelled amount in 2)

Expected behavior

The fulfillment is cancelled.

Actual behavior

The fulfillment is not cancelled and received the error, Not enough stock available for item

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions