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();