Fix error with spec of product under limit
This commit is contained in:
@@ -8,7 +8,7 @@ public sealed class GetProductsUnderLimitSpec : Specification<Product>
|
|||||||
public GetProductsUnderLimitSpec()
|
public GetProductsUnderLimitSpec()
|
||||||
{
|
{
|
||||||
Query
|
Query
|
||||||
.Include(p => p.QuotationProducts)
|
.Include(x => x.WarehouseProducts)
|
||||||
.Where(p => p.QuotationProducts != null && p.QuotationProducts.Any(q => q.Quantity < p.MinimalQuantity));
|
.Where(x => x.WarehouseProducts != null && x.WarehouseProducts.Sum(p => p.Quantity) < x.MinimalQuantity);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user