Fixed error with update of quantity in stock page
This commit is contained in:
+1
-1
@@ -2,7 +2,7 @@
|
||||
using PyroFetes.DTO.WareHouse.Response;
|
||||
using PyroFetes.Repositories;
|
||||
|
||||
namespace PyroFetes.Endpoints;
|
||||
namespace PyroFetes.Endpoints.WareHouse;
|
||||
|
||||
public class GetAllWarehouseEndpoint(WareHouseRepository wareHouseRepository, AutoMapper.IMapper mapper) : EndpointWithoutRequest<List<GetWareHouseDto>>
|
||||
{
|
||||
@@ -30,7 +30,7 @@ public class PatchWareHouseProductQuantityEndpoint(WarehouseProductsRepository w
|
||||
if (wareHouseProduct is null) await warehouseProductsRepository.AddAsync(mapper.Map<WarehouseProduct>(req), ct);
|
||||
else
|
||||
{
|
||||
wareHouseProduct.Quantity = req.Quantity;
|
||||
wareHouseProduct.Quantity += req.Quantity;
|
||||
await warehouseProductsRepository.SaveChangesAsync(ct);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user