Closed
Description
Expected behavior
- If I cancel an order, and choose to restock, my available inventory for the product should increase by the number of items I've "cancelled". For example, if I started with 20 products, ordered 5, captured the payment, and then cancelled the order with restocking, I should have 20 available products.
- If I cancel an order, and choose not to restock, my available inventory for the product should equal the original quantity, minus the quantity of this order. For example, if I started with 20 products, ordered 5, captured the payment, and then cancelled the order without restocking, I should have 15 available products.
Actual behavior
- If I cancel an order, and choose to restock, my available inventory for the product stays at the depleted amount. For example, if I started with 20 products, ordered 5, captured the payment (the inventory drops to 15), and then cancelled the order with restocking, I still have 15 in my inventory.
- If I cancel an order, and choose not to restock, my available inventory for the product is taken away twice, instead of just once. For example, if I started with 20 products, ordered 5, captured the payment (the inventory drops to 15), and then cancelled the order without restocking, the inventory drops an additional 5, and I now have 10 in my inventory (instead of 15).
Steps to reproduce the behavior
- Write down the inventory of a product, and then create an order with X amount of the product
- As an admin, begin to process the order, and capture the payement
- Revisit the product and see that inventory has dropped by X
- Cancel the order, choose "without restocking"
5 Revisit the product and see that inventory has dropped by an additional X
- Write down the inventory of a product, and then create an order with X amount of the product
- As an admin, begin to process the order, and capture the payement
- Revisit the product and see that inventory has dropped by X
- Cancel the order, choose "with restocking"
5 Revisit the product and see that inventory is still at the initial inventory - X, instead of being at the original inventory number
Versions
Node: 9.5.0
NPM: 5.6.0
Meteor Node: 8.9.3
Meteor NPM: 5.5.1
Reaction CLI: 0.27.0
Reaction: 1.8.0
Reaction branch: release-1.8.0
Docker: 18.01.0-ce
Browser: http://whatismybrowser.com/w/KE449ZE
QA
QA by @kieckhafer + @cassytaylor