diff --git a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs index 572ae382..374f8880 100644 --- a/EgwCoreLib.Lux.Data/Controllers/LuxController.cs +++ b/EgwCoreLib.Lux.Data/Controllers/LuxController.cs @@ -1742,17 +1742,25 @@ namespace EgwCoreLib.Lux.Data.Controllers { try { + DateTime adesso = DateTime.Now; // recupero offerta... var currRec = dbCtx .DbSetOffer .Where(x => x.OfferID == rec2clone.OfferID) .Include(x => x.OfferRowNav) .FirstOrDefault(); + // ultimo record x calcolo refNum + var lastRec = dbCtx + .DbSetOffer + .Where(x => x.RefYear == adesso.Year) + .OrderByDescending(x => x.RefNum) + .FirstOrDefault(); + int newRefNum = lastRec != null ? lastRec.RefNum + 1 : 1; // se trovo --> duplico! if (currRec != null) { - DateTime adesso = DateTime.Now; + // recupero ultimo num offerta dell'anno corrente... OfferModel newRec = new OfferModel() { ConsNote = rec2clone.ConsNote, @@ -1767,8 +1775,8 @@ namespace EgwCoreLib.Lux.Data.Controllers Inserted = adesso, Modified = adesso, OffertState = OfferStates.Open, - RefNum = rec2clone.RefNum, - RefRev = 0, + RefNum = newRefNum, + RefRev = 1, RefYear = adesso.Year, ValidUntil = currRec.ValidUntil }; diff --git a/Lux.API/Lux.API.csproj b/Lux.API/Lux.API.csproj index b53ea3d9..ebbfc8c5 100644 --- a/Lux.API/Lux.API.csproj +++ b/Lux.API/Lux.API.csproj @@ -4,7 +4,7 @@ net8.0 enable enable - 0.9.2511.1416 + 0.9.2511.1417 diff --git a/Lux.UI/Lux.UI.csproj b/Lux.UI/Lux.UI.csproj index 00007500..09f90f34 100644 --- a/Lux.UI/Lux.UI.csproj +++ b/Lux.UI/Lux.UI.csproj @@ -5,7 +5,7 @@ enable enable aspnet-Lux.UI-a758c101-a2f4-4e38-977d-1c4887dbbd50 - 0.9.2511.1416 + 0.9.2511.1417 diff --git a/Resources/ChangeLog.html b/Resources/ChangeLog.html index ff9714a7..ddd16ecc 100644 --- a/Resources/ChangeLog.html +++ b/Resources/ChangeLog.html @@ -1,6 +1,6 @@ LUX - Web Windows MES -

Versione: 0.9.2511.1416

+

Versione: 0.9.2511.1417


Note di rilascio: