8000 Inventory updates work incorrectly when cancelling an order · Issue #3678 · reactioncommerce/reaction · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Inventory updates work incorrectly when cancelling an order #3678
Closed
@kieckhafer

Description

@kieckhafer

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.

https://youtu.be/PJKnsPruzMw

  • 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).

https://youtu.be/izMjluy9fEQ

Steps to reproduce the behavior

  1. Write down the inventory of a product, and then create an order with X amount of the product
  2. As an admin, begin to process the order, and capture the payement
  3. Revisit the product and see that inventory has dropped by X
  4. Cancel the order, choose "without restocking"
    5 Revisit the product and see that inventory has dropped by an additional X

  1. Write down the inventory of a product, and then create an order with X amount of the product
  2. As an admin, begin to process the order, and capture the payement
  3. Revisit the product and see that inventory has dropped by X
  4. 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

Metadata

Metadata

Labels

bugFor issues that describe a defect or regression in the released software

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0