From 57646a141740ea3a9b90a32988204e234114b463 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Tue, 26 May 2026 10:25:05 +0100 Subject: [PATCH] Fix error with spec of product under limit --- .../Specifications/Products/GetProductsUnderLimitSpec.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PyroFetes/Specifications/Products/GetProductsUnderLimitSpec.cs b/PyroFetes/Specifications/Products/GetProductsUnderLimitSpec.cs index 23075f7..5b3c1f4 100644 --- a/PyroFetes/Specifications/Products/GetProductsUnderLimitSpec.cs +++ b/PyroFetes/Specifications/Products/GetProductsUnderLimitSpec.cs @@ -8,7 +8,7 @@ public sealed class GetProductsUnderLimitSpec : Specification public GetProductsUnderLimitSpec() { Query - .Include(p => p.QuotationProducts) - .Where(p => p.QuotationProducts != null && p.QuotationProducts.Any(q => q.Quantity < p.MinimalQuantity)); + .Include(x => x.WarehouseProducts) + .Where(x => x.WarehouseProducts != null && x.WarehouseProducts.Sum(p => p.Quantity) < x.MinimalQuantity); } } \ No newline at end of file