diff --git a/MP.INVE/Components/ProcSuggestion.razor.cs b/MP.INVE/Components/ProcSuggestion.razor.cs index a9d96e13..095a1c12 100644 --- a/MP.INVE/Components/ProcSuggestion.razor.cs +++ b/MP.INVE/Components/ProcSuggestion.razor.cs @@ -53,7 +53,8 @@ namespace MP.INVE.Components protected ScanDataModel? alreadyScan; protected AnagUdcModel? currUdc; - protected AnagLottoModel? currLotto; + protected AnagLottoModel? currLottoInterno; + protected AnagLottiArca? currLottoEsterno; protected bool alertScan; protected bool isScannedLotto; protected bool firstMsg = false; @@ -94,7 +95,7 @@ namespace MP.INVE.Components } alreadyScan = elencoScansioni.Where(x => x.ScanValue == lastScan).FirstOrDefault(); currUdc = null; - currLotto = null; + currLottoInterno = null; } } @@ -133,7 +134,7 @@ namespace MP.INVE.Components if (lottoInterno != null) { tipo = "LOTTO"; - currLotto = lottoInterno; + currLottoInterno = lottoInterno; lottoScan = lottoInterno.Lotto; articoloScan = lottoInterno.CodArt; quantitaScan = 0; @@ -143,11 +144,14 @@ namespace MP.INVE.Components if (lottoEsterno != null) { tipo = "LOTTO EXT"; + currLottoEsterno = lottoEsterno; + lottoScan = lottoEsterno.Cd_ARLotto; + articoloScan = lottoEsterno.Cd_AR; quantitaScan = 0; } else { - currLotto = null; + currLottoInterno = null; currUdc = null; alreadyScan = null; lottoScan = lastScan; @@ -202,7 +206,7 @@ namespace MP.INVE.Components await MIService.InsertNewScansione(newScan); NavManager.NavigateTo(NavManager.Uri, true); } - else if (currLotto != null) + else if (currLottoInterno != null) { ScanDataModel newScan = new ScanDataModel() { @@ -210,11 +214,11 @@ namespace MP.INVE.Components UserScan = userScan, ScanValue = lastScan, IsForced = true, - CodArticolo = currLotto.CodArt, - Lotto = currLotto.Lotto, - RifExt = currLotto.RifExt, + CodArticolo = currLottoInterno.CodArt, + Lotto = currLottoInterno.Lotto, + RifExt = currLottoInterno.RifExt, Qty = qtaLotto, - Note = currLotto.Note, + Note = currLottoInterno.Note, IsKnown = true, IsUnique = false, InveSessID = sessID