Commit 385a1be5 authored by John Lam's avatar John Lam

fix cancelled items notaffecting fulfilledstock

parent ec18315a
......@@ -55,7 +55,7 @@ public class ProductService {
return productRepository.findBySku(sku)
.flatMap(dbProduct -> {
dbProduct.setAvailableStock(dbProduct.getAvailableStock() - finalStock);
dbProduct.setFulfilledStock(dbProduct.getFulfilledStock() + finalStock);
dbProduct.setFulfilledStock(dbProduct.getFulfilledStock() + itemQuantity);
dbProduct.setBlockedStock(dbProduct.getBlockedStock() - itemQuantity);
return productRepository.save(dbProduct);
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment