diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index 3fcbb62b..f9149ebb 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -56,6 +56,7 @@ namespace MP.INVE.Components protected bool firstMsg = false; protected bool isKnown = false; protected bool canSave = true; + protected string oldArt = ""; protected override async Task OnAfterRenderAsync(bool firstRender) { await Task.Delay(1); @@ -96,6 +97,7 @@ namespace MP.INVE.Components } alreadyScan = scansioneClone; lottoScan = alreadyScan.ScanValue; + oldArt = alreadyScan.CodArticolo; articoloScan = alreadyScan.CodArticolo; quantitaScan = Math.Round(alreadyScan.Qty, 2); noteScan = alreadyScan.Note; @@ -119,6 +121,7 @@ namespace MP.INVE.Components currUdc = udc; tipo = "U"; lottoScan = udc.lottoNav.Lotto; + oldArt = udc.lottoNav.CodArt; articoloScan = udc.lottoNav.CodArt; quantitaScan = Math.Round(udc.Qta, 2); noteScan = udc.Note; @@ -139,6 +142,7 @@ namespace MP.INVE.Components tipo = "LI"; currLottoInterno = lottoInterno; lottoScan = lottoInterno.Lotto; + oldArt = lottoInterno.CodArt; articoloScan = lottoInterno.CodArt; quantitaScan = 0; } @@ -153,6 +157,7 @@ namespace MP.INVE.Components { lottoScan = lottoEsterno.Cd_ARLotto; } + oldArt = lottoEsterno.Cd_AR; articoloScan = lottoEsterno.Cd_AR; quantitaScan = 0; noteScan = ""; @@ -184,12 +189,17 @@ namespace MP.INVE.Components if (artExists != null) { + var force = false; + if(articoloScan != oldArt) + { + force = true; + } ScanDataModel newScan = new ScanDataModel() { DtScan = DateTime.Now, UserScan = userScan, ScanValue = lastScan, - IsForced = true, + IsForced = force, CodArticolo = articoloScan, Lotto = lastScan, RifExt = "",