From e075453d4977a16d4dcf78e97dd793141c7305e3 Mon Sep 17 00:00:00 2001 From: Leandro Hernan Rojas Date: Sun, 24 Aug 2025 18:18:18 -0300 Subject: [PATCH] Update Fix StockItemScan --- .../Pages/Stock/Shared/StockItemSelectorModal.razor | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phronCare.UIBlazor/Pages/Stock/Shared/StockItemSelectorModal.razor b/phronCare.UIBlazor/Pages/Stock/Shared/StockItemSelectorModal.razor index cfb070a..bdcf47c 100644 --- a/phronCare.UIBlazor/Pages/Stock/Shared/StockItemSelectorModal.razor +++ b/phronCare.UIBlazor/Pages/Stock/Shared/StockItemSelectorModal.razor @@ -88,7 +88,7 @@ [Parameter] public int? ProductId { get; set; } [Parameter] public int? LocationId { get; set; } - //[Parameter] public List? SetItems { get; set; } + [Parameter] public List? SetItems { get; set; } [Parameter] public List Snapshot { get; set; } = new(); // Mapa: BusinessKey -> Cantidad ya en la expedición @@ -295,8 +295,11 @@ Serial= x.Serial, Expiration = x.Expiration, TraceabilityType = x.TraceabilityType, - Quantity = x.Selected, - LocationId = x.LocationId + LocationId = x.LocationId, + Quantity = !string.IsNullOrWhiteSpace(x.Serial) + ? 1m + : decimal.Round(Math.Min(x.Selected, x.Available), 2, MidpointRounding.AwayFromZero) + }) .ToList();