From 0b4e82ccb18a50dfdfc546b96459abc16cdaf5e4 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Wed, 17 May 2023 11:31:29 +0200 Subject: [PATCH] Fix ricerca commessa cona rrotondamento --- MapoDb/resoconti.cs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/MapoDb/resoconti.cs b/MapoDb/resoconti.cs index 4959708d..7dac145c 100644 --- a/MapoDb/resoconti.cs +++ b/MapoDb/resoconti.cs @@ -870,6 +870,14 @@ public class resoconti var currRow = tabOdl .Where(x => x.DataInizio <= dataRif && (x.DataFine >= dataRif || x.DataFine == null)) .FirstOrDefault(); + // 2023.05.17: se NON trovasse "sposto avanti" un sec... + if (currRow == null) + { + dataRif = dataRif.AddSeconds(1); + currRow = tabOdl + .Where(x => x.DataInizio <= dataRif && (x.DataFine >= dataRif || x.DataFine == null)) + .FirstOrDefault(); + } if (currRow != null) { answ = currRow.KeyRichiesta;