Update Fix StockItemScan
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 8m19s

This commit is contained in:
Leandro Hernan Rojas 2025-08-24 18:18:18 -03:00
parent 345bc817c4
commit e075453d49

View File

@ -88,7 +88,7 @@
[Parameter] public int? ProductId { get; set; } [Parameter] public int? ProductId { get; set; }
[Parameter] public int? LocationId { get; set; } [Parameter] public int? LocationId { get; set; }
//[Parameter] public List<ProductSetItemDto>? SetItems { get; set; } [Parameter] public List<ProductSetItemDto>? SetItems { get; set; }
[Parameter] public List<StockSnapshotItem> Snapshot { get; set; } = new(); [Parameter] public List<StockSnapshotItem> Snapshot { get; set; } = new();
// Mapa: BusinessKey -> Cantidad ya en la expedición // Mapa: BusinessKey -> Cantidad ya en la expedición
@ -295,8 +295,11 @@
Serial= x.Serial, Serial= x.Serial,
Expiration = x.Expiration, Expiration = x.Expiration,
TraceabilityType = x.TraceabilityType, 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(); .ToList();