From cf7e669397ba72413e2a1b96b0715a37004acdb3 Mon Sep 17 00:00:00 2001 From: "Samuele E. Locatelli" Date: Tue, 29 Jul 2025 09:33:24 +0200 Subject: [PATCH] Fix ordinamento conferme se filtrate x ODL --- MP-TAB3/Components/ProdConfMan.razor | 2 +- MP-TAB3/Components/ProdConfMan.razor.cs | 15 +++++++++------ MP-TAB3/MP-TAB3.csproj | 2 +- MP-TAB3/Resources/ChangeLog.html | 2 +- MP-TAB3/Resources/VersNum.txt | 2 +- MP-TAB3/Resources/manifest.xml | 2 +- 6 files changed, 14 insertions(+), 11 deletions(-) diff --git a/MP-TAB3/Components/ProdConfMan.razor b/MP-TAB3/Components/ProdConfMan.razor index 43e9bd1b..7f31da2f 100644 --- a/MP-TAB3/Components/ProdConfMan.razor +++ b/MP-TAB3/Components/ProdConfMan.razor @@ -17,7 +17,7 @@ @if (useOdl) { - + } else { diff --git a/MP-TAB3/Components/ProdConfMan.razor.cs b/MP-TAB3/Components/ProdConfMan.razor.cs index 5238d0cd..7107bc56 100644 --- a/MP-TAB3/Components/ProdConfMan.razor.cs +++ b/MP-TAB3/Components/ProdConfMan.razor.cs @@ -144,7 +144,7 @@ namespace MP_TAB3.Components // altrimenti reset.. else { - setupPeriodo(); + await setupPeriodo(); } await ReloadData(); isProcessing = false; @@ -176,7 +176,9 @@ namespace MP_TAB3.Components } else { - ListPaged = ListComplete; + ListPaged = ListComplete + .OrderByDescending(x => x.DataTo) + .ToList(); } } @@ -356,7 +358,7 @@ namespace MP_TAB3.Components await Task.Delay(1); if (!string.IsNullOrEmpty(IdxMaccSel)) { - ListaOdl = await TabDServ.OdlListByMaccPeriodo(IdxMaccSel, CurrPeriodo.Inizio.AddMonths(-1), CurrPeriodo.Fine); + ListaOdl = await TabDServ.OdlListByMaccPeriodo(IdxMaccSel, CurrPeriodo.Inizio.AddMonths(-1), DateTime.Today.AddDays(1)); ListComplete = await TabDServ.ElencoConfProdFiltAsync(IdxMaccSel, CurrPeriodo.Inizio, CurrPeriodo.Fine); TotalCount = ListComplete.Count; // esegue paginazione @@ -374,10 +376,12 @@ namespace MP_TAB3.Components var LastODL = await TabDServ.VSOdlGetLastByMacc(IdxMaccSel, 1); if (LastODL != null) { - var recOdl = LastODL.FirstOrDefault(); + var recOdl = LastODL + .Where(x => x.value > 0) + .FirstOrDefault(); if (recOdl != null) { - idxOdlLast = recOdl.value; + var idxOdlLast = recOdl.value; await SetOdl(idxOdlLast); doSet = false; } @@ -392,7 +396,6 @@ namespace MP_TAB3.Components } } - private int idxOdlLast = 0; #endregion Private Methods } diff --git a/MP-TAB3/MP-TAB3.csproj b/MP-TAB3/MP-TAB3.csproj index 55e3a07e..465f0f0b 100644 --- a/MP-TAB3/MP-TAB3.csproj +++ b/MP-TAB3/MP-TAB3.csproj @@ -3,7 +3,7 @@ net6.0 enable - 6.16.2507.2814 + 6.16.2507.2909 enable MP_TAB3 diff --git a/MP-TAB3/Resources/ChangeLog.html b/MP-TAB3/Resources/ChangeLog.html index 5380e47a..704a5c33 100644 --- a/MP-TAB3/Resources/ChangeLog.html +++ b/MP-TAB3/Resources/ChangeLog.html @@ -1,6 +1,6 @@ Modulo MAPOSPEC -

Versione: 6.16.2507.2814

+

Versione: 6.16.2507.2909


Note di rilascio: