Browse Source

Revert #73: Check inventory when creating an order

pull/87/head
gdlcf88 6 years ago
parent
commit
d1df42ea48
  1. 6
      modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs

6
modules/EasyAbp.EShop.Orders/src/EasyAbp.EShop.Orders.Application/EasyAbp/EShop/Orders/Orders/NewOrderGenerator.cs

@ -82,12 +82,6 @@ namespace EasyAbp.EShop.Orders.Orders
{
throw new OrderLineInvalidQuantityException(product.Id, productSku.Id, input.Quantity);
}
if (productSku.Inventory < input.Quantity)
{
throw new InventoryInsufficientException(input.ProductId, input.ProductSkuId, input.Quantity,
productSku.Inventory);
}
return new OrderLine(
id: _guidGenerator.Create(),

Loading…
Cancel
Save