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

Allocated stock should be reverted when cancelling a fullfillment - Part 2 #1250

Closed
ivasilov opened this issue Nov 30, 2021 · 0 comments
Closed
Assignees
Labels
type: bug 🐛 Something isn't working

Comments

@ivasilov
Copy link

Describe the bug
Cancelling a fullfillment should restore the allocated stock values of the product. The code here returns the onHand value back, but cancelling a fullfilment is a different process than canceling an order. The allocated value should be returned to the previous value so that a fulfillment can be attempted later.

I've reported a similar issue (#1198) but the fix was only for stockOnHand not for the stockAllocated value.

Ideally, cancelling Fulfillment should work like OrderService.createFullfilment (which generates a stock movement) but in reverse :)

To Reproduce
Steps to reproduce the behavior:

  1. Make an order
  2. Fullfill that order through the Admin panel
  3. Cancel that specific fullfilment

Expected behavior
When cancelling a fullfilment, Vendure should return the allocated levels of the products to the pre-fullfilled values. They way it works now, the allocated value is not returned to the pre-fulfillment value.

Environment (please complete the following information):

  • @vendure/core version: 1.3.4
  • Nodejs version: v14
  • Database (mysql/postgres etc): Postgres v11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants