From 16ba2fa6fbc2889df8f71c3aaa7f170bf80ef4af Mon Sep 17 00:00:00 2001 From: masoodafar-web Date: Sun, 4 Jan 2026 22:22:42 +0330 Subject: [PATCH] fix: Update sorting and calculation of available quantity in GetLowStockItems query --- .../Queries/GetLowStockItems/GetLowStockItemsQueryHandler.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/CMSMicroservice.Application/InventoryItemCQ/Queries/GetLowStockItems/GetLowStockItemsQueryHandler.cs b/src/CMSMicroservice.Application/InventoryItemCQ/Queries/GetLowStockItems/GetLowStockItemsQueryHandler.cs index 7b22672..531f9a2 100644 --- a/src/CMSMicroservice.Application/InventoryItemCQ/Queries/GetLowStockItems/GetLowStockItemsQueryHandler.cs +++ b/src/CMSMicroservice.Application/InventoryItemCQ/Queries/GetLowStockItems/GetLowStockItemsQueryHandler.cs @@ -26,7 +26,7 @@ public class GetLowStockItemsQueryHandler : IRequestHandler i.AvailableQuantity) + .OrderBy(i => i.Quantity - i.ReservedQuantity) .Take(request.Count) .Select(i => new LowStockItemDto { @@ -39,7 +39,7 @@ public class GetLowStockItemsQueryHandler : IRequestHandler