diff --git a/EDILibrary/EdifactFormatVersion.cs b/EDILibrary/EdifactFormatVersion.cs index 376fd67..c8e94cf 100644 --- a/EDILibrary/EdifactFormatVersion.cs +++ b/EDILibrary/EdifactFormatVersion.cs @@ -432,7 +432,7 @@ public EdifactFormatVersion GetFormatVersion(DateTimeOffset keydate) } if (keydate >= KeyDate2410) { - return EdifactFormatVersion.FV2410; + return EdifactFormatVersion.FV2404; // there was no format change FV2410, so we map this to FV2404 } if (keydate >= KeyDate2404) { @@ -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, 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,