From c4330e0a8f536b685d376f959716cb4ce98df601 Mon Sep 17 00:00:00 2001 From: Joscha Metze Date: Tue, 1 Oct 2024 14:49:49 +0200 Subject: [PATCH 1/4] Skip FV2410 and return FV2404 instead --- EDILibrary/EdifactFormatVersion.cs | 382 ++++++++++++++++------------- 1 file changed, 218 insertions(+), 164 deletions(-) diff --git a/EDILibrary/EdifactFormatVersion.cs b/EDILibrary/EdifactFormatVersion.cs index 5e5c81e..3544234 100644 --- a/EDILibrary/EdifactFormatVersion.cs +++ b/EDILibrary/EdifactFormatVersion.cs @@ -129,13 +129,21 @@ public static class EdifactFormatHelper /// is true, UTILMD is returned instead of UTILMDG bzw. UTILMDS /// optional EdifactFormatVersion, in case of >= than FV2310 will return UTILMDW for '11xxxx' PIDs. /// the EdifactFormat, e.g. or throws a NotImplementedException iff EdiFormat was found - public static EdifactFormat FromPruefidentifikator(string pruefidentifikator, bool maskUTILMDX = true, EdifactFormatVersion? formatPackage = null) + public static EdifactFormat FromPruefidentifikator( + string pruefidentifikator, + bool maskUTILMDX = true, + EdifactFormatVersion? formatPackage = null + ) { if (string.IsNullOrWhiteSpace(pruefidentifikator)) { throw new ArgumentNullException(nameof(pruefidentifikator)); } - if (formatPackage is not null && formatPackage >= EdifactFormatVersion.FV2310 && pruefidentifikator.StartsWith("11")) + if ( + formatPackage is not null + && formatPackage >= EdifactFormatVersion.FV2310 + && pruefidentifikator.StartsWith("11") + ) { return EdifactFormat.UTILMDW; } @@ -143,11 +151,15 @@ public static EdifactFormat FromPruefidentifikator(string pruefidentifikator, bo { if (pruefidentifikator.StartsWith(((int)ef).ToString())) { - return maskUTILMDX && ef is EdifactFormat.UTILMDG or EdifactFormat.UTILMDS ? EdifactFormat.UTILMD : ef; + return maskUTILMDX && ef is EdifactFormat.UTILMDG or EdifactFormat.UTILMDS + ? EdifactFormat.UTILMD + : ef; } } - throw new NotImplementedException($"No matching EdiFormat found for Prüfidentifikator {pruefidentifikator}"); + throw new NotImplementedException( + $"No matching EdiFormat found for Prüfidentifikator {pruefidentifikator}" + ); } } @@ -190,10 +202,12 @@ public enum EdifactFormatVersion /// Format Version October 2022 (aka MaKo2022) /// FV2210, + /// /// Format Version April 2023 /// FV2304, + /// /// Format Version October 2023 (aka MaKo2023) /// @@ -251,7 +265,10 @@ public static string ToLegacyVersionString(this EdifactFormatVersion edifactForm EdifactFormatVersion.FV2404 => "04/24", EdifactFormatVersion.FV2410 => "10/24", EdifactFormatVersion.FV2504 => "04/25", - _ => throw new NotImplementedException($"The legacy format for {edifactFormatVersion} is not yet implemented.") + _ + => throw new NotImplementedException( + $"The legacy format for {edifactFormatVersion} is not yet implemented." + ) }; } @@ -262,7 +279,10 @@ public static string ToLegacyVersionString(this EdifactFormatVersion edifactForm /// /// -1 = smaller, 0 equal, 1 greater [Obsolete("Use the IComparer class " + nameof(EdifactFormatVersionComparer) + " instead")] - public static int CompareToVersion(this EdifactFormatVersion edifactFormatVersion, EdifactFormatVersion compare) + public static int CompareToVersion( + this EdifactFormatVersion edifactFormatVersion, + EdifactFormatVersion compare + ) { return new EdifactFormatVersionComparer().Compare(edifactFormatVersion, compare); } @@ -281,7 +301,10 @@ public static EdifactFormatVersion ToEdifactFormatVersion(this string legacyForm new EdifactFormatVersionHelper().GetCurrent(); } #if NETSTANDARD2_1 - foreach (EdifactFormatVersion efv in Enum.GetValues(typeof(EdifactFormatVersion)).Cast()) + foreach ( + EdifactFormatVersion efv in Enum.GetValues(typeof(EdifactFormatVersion)) + .Cast() + ) { if (legacyFormatString == efv.ToLegacyVersionString()) { @@ -303,7 +326,9 @@ public static EdifactFormatVersion ToEdifactFormatVersion(this string legacyForm return result; } - throw new NotImplementedException($"The legacy format string '{legacyFormatString}' could not be mapped."); + throw new NotImplementedException( + $"The legacy format string '{legacyFormatString}' could not be mapped." + ); } } @@ -341,57 +366,64 @@ public class EdifactFormatVersionHelper : IEdifactFormatVersionProvider /// /// validity date of /// - private static readonly DateTime Keydate1912 = new(2019, 11, 30, 23, 0, 0, 0, DateTimeKind.Utc); + private static readonly DateTime Keydate1912 = + new(2019, 11, 30, 23, 0, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime Keydate2004 = new(2020, 03, 31, 22, 0, 0, 0, DateTimeKind.Utc); + private static readonly DateTime Keydate2004 = + new(2020, 03, 31, 22, 0, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime Keydate2104 = new(2021, 03, 31, 22, 0, 0, 0, DateTimeKind.Utc); + private static readonly DateTime Keydate2104 = + new(2021, 03, 31, 22, 0, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime KeyDate2110 = new(2021, 09, 30, 22, 0, 0, DateTimeKind.Utc); - + private static readonly DateTime KeyDate2110 = + new(2021, 09, 30, 22, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime KeyDate2210 = new(2022, 09, 30, 22, 0, 0, DateTimeKind.Utc); - + private static readonly DateTime KeyDate2210 = + new(2022, 09, 30, 22, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime KeyDate2304 = new(2023, 03, 31, 22, 0, 0, DateTimeKind.Utc); + private static readonly DateTime KeyDate2304 = + new(2023, 03, 31, 22, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime KeyDate2310 = new(2023, 09, 30, 22, 0, 0, DateTimeKind.Utc); + private static readonly DateTime KeyDate2310 = + new(2023, 09, 30, 22, 0, 0, DateTimeKind.Utc); /// /// validity date of /// /// Note that this is _not_ April 1st - private static readonly DateTime KeyDate2404 = new(2024, 04, 02, 22, 0, 0, DateTimeKind.Utc); + private static readonly DateTime KeyDate2404 = + new(2024, 04, 02, 22, 0, 0, DateTimeKind.Utc); /// /// validity date of /// - private static readonly DateTime KeyDate2410 = new(2024, 09, 30, 22, 0, 0, DateTimeKind.Utc); + private static readonly DateTime KeyDate2410 = + new(2024, 09, 30, 22, 0, 0, DateTimeKind.Utc); /// /// validity date of /// /// Note that this is _not_ April 1st - private static readonly DateTime KeyDate2504 = new(2025, 04, 03, 22, 0, 0, DateTimeKind.Utc); - + private static readonly DateTime KeyDate2504 = + new(2025, 04, 03, 22, 0, 0, DateTimeKind.Utc); public EdifactFormatVersion GetFormatVersion(DateTimeOffset keydate) { @@ -401,7 +433,7 @@ public EdifactFormatVersion GetFormatVersion(DateTimeOffset keydate) } if (keydate >= KeyDate2410) { - return EdifactFormatVersion.FV2410; + return EdifactFormatVersion.FV2404; } if (keydate >= KeyDate2404) { @@ -447,6 +479,7 @@ public EdifactFormatVersion GetFormatVersion(DateTimeOffset keydate) return EdifactFormatVersion.FV1710; } + /// /// returns the format version valid as of now. /// @@ -456,6 +489,7 @@ public EdifactFormatVersion GetCurrent() var keydate = DateTime.UtcNow; return GetFormatVersion(keydate); } + /// /// /// does not support anything older than 2110 at the moment @@ -467,148 +501,168 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio { EdifactFormatVersion determinedVersion = format switch { - EdifactFormat.UTILMD => version switch - { - "5.2e" => EdifactFormatVersion.FV2210, - "5.2c" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.UTILMDG => version switch - { - "G1.0a" => EdifactFormatVersion.FV2310, - _ => GetCurrent() - }, - EdifactFormat.UTILMDW => version switch - { - "5.2e" => EdifactFormatVersion.FV2210, - "5.2c" => EdifactFormatVersion.FV2110, - "G1.0a" => EdifactFormatVersion.FV2310, - _ => GetCurrent() - }, - EdifactFormat.UTILMDS => version switch - { - "S1.1a" => EdifactFormatVersion.FV2404, - "S1.1" => EdifactFormatVersion.FV2310, - _ => GetCurrent() - }, - EdifactFormat.MSCONS => version switch - { - "2.4c" => EdifactFormatVersion.FV2404, - "2.4b" => EdifactFormatVersion.FV2310, - "2.4a" => EdifactFormatVersion.FV2210, - "2.3c" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.PARTIN => version switch - { - "1.0d" => EdifactFormatVersion.FV2404, - "1.0c" => EdifactFormatVersion.FV2310, - "1.0a" => EdifactFormatVersion.FV2210, - _ => GetCurrent() - }, - EdifactFormat.IFTSTA => version switch - { - "2.0e" => EdifactFormatVersion.FV2310, - "2.0d" => EdifactFormatVersion.FV2210, - "2.0c" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.APERAK => version switch - { - "2.1h" => EdifactFormatVersion.FV2210, - "2.1f" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.COMDIS => version switch - { - "1.0d" => EdifactFormatVersion.FV2404, - "1.0c" => EdifactFormatVersion.FV2310, - "1.0b" => EdifactFormatVersion.FV2210, - "1.0a" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.CONTRL => version switch - { - "2.0b" => EdifactFormatVersion.FV2210, - "2.0a" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.INSRPT => version switch - { - "1.1a" => EdifactFormatVersion.FV2210, - "1.1" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.INVOIC => version switch - { - "2.8c" => EdifactFormatVersion.FV2404, - "2.8b" => EdifactFormatVersion.FV2310, - "2.8a" => EdifactFormatVersion.FV2304, - "2.8" => EdifactFormatVersion.FV2210, - "2.7a" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.ORDCHG => version switch - { - "1.1" => EdifactFormatVersion.FV2310, - "1.0" => EdifactFormatVersion.FV2210, - _ => GetCurrent() - }, - EdifactFormat.ORDERS => version switch - { - "1.3" => EdifactFormatVersion.FV2310, - "1.2b" => EdifactFormatVersion.FV2304, - "1.2a" => EdifactFormatVersion.FV2210, - "1.1m" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.ORDRSP => version switch - { - "1.3" => EdifactFormatVersion.FV2310, - "1.2b" => EdifactFormatVersion.FV2304, - "1.2a" => EdifactFormatVersion.FV2210, - "1.1k" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.PRICAT => version switch - { - "2.0c" => EdifactFormatVersion.FV2310, - "2.0b" => EdifactFormatVersion.FV2304, - "2.0a" => EdifactFormatVersion.FV2210, - "1.1b" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.QUOTES => version switch - { - "1.3" => EdifactFormatVersion.FV2310, - "1.2" => EdifactFormatVersion.FV2210, - "1.1b" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.REMADV => version switch - { - "2.9c" => EdifactFormatVersion.FV2404, - "2.9b" => EdifactFormatVersion.FV2310, - "2.9a" => EdifactFormatVersion.FV2304, - "2.9" => EdifactFormatVersion.FV2210, - "2.8" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.REQOTE => version switch - { - "1.3" => EdifactFormatVersion.FV2310, - "1.2" => EdifactFormatVersion.FV2210, - "1.1d" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, - EdifactFormat.UTILTS => version switch - { - "1.1c" => EdifactFormatVersion.FV2404, - "1.1b" => EdifactFormatVersion.FV2310, - "1.1a" => EdifactFormatVersion.FV2210, - "1.0a" => EdifactFormatVersion.FV2110, - _ => GetCurrent() - }, + EdifactFormat.UTILMD + => version switch + { + "5.2e" => EdifactFormatVersion.FV2210, + "5.2c" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.UTILMDG + => version switch + { + "G1.0a" => EdifactFormatVersion.FV2310, + _ => GetCurrent() + }, + EdifactFormat.UTILMDW + => version switch + { + "5.2e" => EdifactFormatVersion.FV2210, + "5.2c" => EdifactFormatVersion.FV2110, + "G1.0a" => EdifactFormatVersion.FV2310, + _ => GetCurrent() + }, + EdifactFormat.UTILMDS + => version switch + { + "S1.1a" => EdifactFormatVersion.FV2404, + "S1.1" => EdifactFormatVersion.FV2310, + _ => GetCurrent() + }, + EdifactFormat.MSCONS + => version switch + { + "2.4c" => EdifactFormatVersion.FV2404, + "2.4b" => EdifactFormatVersion.FV2310, + "2.4a" => EdifactFormatVersion.FV2210, + "2.3c" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.PARTIN + => version switch + { + "1.0d" => EdifactFormatVersion.FV2404, + "1.0c" => EdifactFormatVersion.FV2310, + "1.0a" => EdifactFormatVersion.FV2210, + _ => GetCurrent() + }, + EdifactFormat.IFTSTA + => version switch + { + "2.0e" => EdifactFormatVersion.FV2310, + "2.0d" => EdifactFormatVersion.FV2210, + "2.0c" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.APERAK + => version switch + { + "2.1h" => EdifactFormatVersion.FV2210, + "2.1f" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.COMDIS + => version switch + { + "1.0d" => EdifactFormatVersion.FV2404, + "1.0c" => EdifactFormatVersion.FV2310, + "1.0b" => EdifactFormatVersion.FV2210, + "1.0a" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.CONTRL + => version switch + { + "2.0b" => EdifactFormatVersion.FV2210, + "2.0a" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.INSRPT + => version switch + { + "1.1a" => EdifactFormatVersion.FV2210, + "1.1" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.INVOIC + => version switch + { + "2.8c" => EdifactFormatVersion.FV2404, + "2.8b" => EdifactFormatVersion.FV2310, + "2.8a" => EdifactFormatVersion.FV2304, + "2.8" => EdifactFormatVersion.FV2210, + "2.7a" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.ORDCHG + => version switch + { + "1.1" => EdifactFormatVersion.FV2310, + "1.0" => EdifactFormatVersion.FV2210, + _ => GetCurrent() + }, + EdifactFormat.ORDERS + => version switch + { + "1.3" => EdifactFormatVersion.FV2310, + "1.2b" => EdifactFormatVersion.FV2304, + "1.2a" => EdifactFormatVersion.FV2210, + "1.1m" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.ORDRSP + => version switch + { + "1.3" => EdifactFormatVersion.FV2310, + "1.2b" => EdifactFormatVersion.FV2304, + "1.2a" => EdifactFormatVersion.FV2210, + "1.1k" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.PRICAT + => version switch + { + "2.0c" => EdifactFormatVersion.FV2310, + "2.0b" => EdifactFormatVersion.FV2304, + "2.0a" => EdifactFormatVersion.FV2210, + "1.1b" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.QUOTES + => version switch + { + "1.3" => EdifactFormatVersion.FV2310, + "1.2" => EdifactFormatVersion.FV2210, + "1.1b" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.REMADV + => version switch + { + "2.9c" => EdifactFormatVersion.FV2404, + "2.9b" => EdifactFormatVersion.FV2310, + "2.9a" => EdifactFormatVersion.FV2304, + "2.9" => EdifactFormatVersion.FV2210, + "2.8" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.REQOTE + => version switch + { + "1.3" => EdifactFormatVersion.FV2310, + "1.2" => EdifactFormatVersion.FV2210, + "1.1d" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, + EdifactFormat.UTILTS + => version switch + { + "1.1c" => EdifactFormatVersion.FV2404, + "1.1b" => EdifactFormatVersion.FV2310, + "1.1a" => EdifactFormatVersion.FV2210, + "1.0a" => EdifactFormatVersion.FV2110, + _ => GetCurrent() + }, _ => GetCurrent() }; return determinedVersion; From 3a9d9228555019175126a6af4f3539161b07356b Mon Sep 17 00:00:00 2001 From: Joscha Metze Date: Tue, 1 Oct 2024 15:24:07 +0200 Subject: [PATCH 2/4] Fix tests --- EDILibraryTests/EdifactFormatVersionTests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/EDILibraryTests/EdifactFormatVersionTests.cs b/EDILibraryTests/EdifactFormatVersionTests.cs index d7a7ab4..eb14769 100644 --- a/EDILibraryTests/EdifactFormatVersionTests.cs +++ b/EDILibraryTests/EdifactFormatVersionTests.cs @@ -180,8 +180,8 @@ public void TestMockingVersionProvider() [DataRow("2023-09-30T22:00:00+00:00", EdifactFormatVersion.FV2310)] [DataRow("2024-03-31T22:00:00+00:00", EdifactFormatVersion.FV2310)] [DataRow("2024-04-02T22:00:00+00:00", EdifactFormatVersion.FV2404)] - [DataRow("2024-09-30T22:00:00+00:00", EdifactFormatVersion.FV2410)] - [DataRow("2025-03-31T22:00:00+00:00", EdifactFormatVersion.FV2410)] + [DataRow("2024-09-30T22:00:00+00:00", EdifactFormatVersion.FV2404)] + [DataRow("2025-03-31T22:00:00+00:00", EdifactFormatVersion.FV2404)] [DataRow("2025-04-03T22:00:00+00:00", EdifactFormatVersion.FV2504)] public void TestFormatVersionProvider( string dateTimeOffset, From bbb14228a53030c254fa6ab5be3d6682efbb9309 Mon Sep 17 00:00:00 2001 From: Joscha Metze Date: Fri, 11 Oct 2024 11:45:06 +0200 Subject: [PATCH 3/4] update edifact format versions for FV504 --- EDILibrary/EdifactFormatVersion.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/EDILibrary/EdifactFormatVersion.cs b/EDILibrary/EdifactFormatVersion.cs index 3d92762..d0dfe33 100644 --- a/EDILibrary/EdifactFormatVersion.cs +++ b/EDILibrary/EdifactFormatVersion.cs @@ -520,6 +520,8 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.UTILMDS => version switch { + "S2.1" => EdifactFormatVersion.FV2504, + "S2.0" => EdifactFormatVersion.FV2504, "S1.1a" => EdifactFormatVersion.FV2404, "S1.1" => EdifactFormatVersion.FV2310, _ => GetCurrent(), @@ -534,6 +536,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.PARTIN => version switch { + "1.0e" => EdifactFormatVersion.FV2504, "1.0d" => EdifactFormatVersion.FV2404, "1.0c" => EdifactFormatVersion.FV2310, "1.0a" => EdifactFormatVersion.FV2210, @@ -541,6 +544,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.IFTSTA => version switch { + "2.0f" => EdifactFormatVersion.FV2504, "2.0e" => EdifactFormatVersion.FV2310, "2.0d" => EdifactFormatVersion.FV2210, "2.0c" => EdifactFormatVersion.FV2110, @@ -548,12 +552,14 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.APERAK => version switch { + "2.1i" => EdifactFormatVersion.FV2504, "2.1h" => EdifactFormatVersion.FV2210, "2.1f" => EdifactFormatVersion.FV2110, _ => GetCurrent(), }, EdifactFormat.COMDIS => version switch { + "1.0e" => EdifactFormatVersion.FV2504, "1.0d" => EdifactFormatVersion.FV2404, "1.0c" => EdifactFormatVersion.FV2310, "1.0b" => EdifactFormatVersion.FV2210, @@ -574,6 +580,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.INVOIC => version switch { + "2.8d" => EdifactFormatVersion.FV2504, "2.8c" => EdifactFormatVersion.FV2404, "2.8b" => EdifactFormatVersion.FV2310, "2.8a" => EdifactFormatVersion.FV2304, @@ -589,6 +596,8 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.ORDERS => version switch { + "1.4a" => EdifactFormatVersion.FV2504, + "1.4" => EdifactFormatVersion.FV2504, "1.3" => EdifactFormatVersion.FV2310, "1.2b" => EdifactFormatVersion.FV2304, "1.2a" => EdifactFormatVersion.FV2210, @@ -597,6 +606,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.ORDRSP => version switch { + "1.4" => EdifactFormatVersion.FV2504, "1.3" => EdifactFormatVersion.FV2310, "1.2b" => EdifactFormatVersion.FV2304, "1.2a" => EdifactFormatVersion.FV2210, @@ -605,6 +615,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.PRICAT => version switch { + "2.0d" => EdifactFormatVersion.FV2504, "2.0c" => EdifactFormatVersion.FV2310, "2.0b" => EdifactFormatVersion.FV2304, "2.0a" => EdifactFormatVersion.FV2210, @@ -613,6 +624,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.QUOTES => version switch { + "1.3a" => EdifactFormatVersion.FV2504, "1.3" => EdifactFormatVersion.FV2310, "1.2" => EdifactFormatVersion.FV2210, "1.1b" => EdifactFormatVersion.FV2110, @@ -629,6 +641,7 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.REQOTE => version switch { + "1.3a" => EdifactFormatVersion.FV2504, "1.3" => EdifactFormatVersion.FV2310, "1.2" => EdifactFormatVersion.FV2210, "1.1d" => EdifactFormatVersion.FV2110, @@ -636,6 +649,8 @@ public EdifactFormatVersion GetFormatVersion(EdifactFormat format, string versio }, EdifactFormat.UTILTS => version switch { + "1.1e" => EdifactFormatVersion.FV2504, + "1.1d" => EdifactFormatVersion.FV2504, "1.1c" => EdifactFormatVersion.FV2404, "1.1b" => EdifactFormatVersion.FV2310, "1.1a" => EdifactFormatVersion.FV2210, From 28e57071e34499e9efe6e17c55828ed63e10b51a Mon Sep 17 00:00:00 2001 From: Joscha Metze Date: Fri, 11 Oct 2024 11:46:21 +0200 Subject: [PATCH 4/4] update comment --- EDILibrary/EdifactFormatVersion.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EDILibrary/EdifactFormatVersion.cs b/EDILibrary/EdifactFormatVersion.cs index d0dfe33..c8e94cf 100644 --- a/EDILibrary/EdifactFormatVersion.cs +++ b/EDILibrary/EdifactFormatVersion.cs @@ -432,7 +432,7 @@ public EdifactFormatVersion GetFormatVersion(DateTimeOffset keydate) } if (keydate >= KeyDate2410) { - return EdifactFormatVersion.FV2404; + return EdifactFormatVersion.FV2404; // there was no format change FV2410, so we map this to FV2404 } if (keydate >= KeyDate2404) {