Skip to content

Commit

Permalink
Added XRechnung 2.1 support
Browse files Browse the repository at this point in the history
closes #175
  • Loading branch information
stephanstapel committed Feb 2, 2022
1 parent 7af63d9 commit e87de42
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ZUGFeRD/Profile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ public static Profile FromString(this Profile _, string s)
case "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended": return Profile.Extended;
case "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_1.2": return Profile.XRechnung1;
case "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.0": return Profile.XRechnung;
case "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.1": return Profile.XRechnung;
case "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.2": return Profile.XRechnung;
}

return Profile.Unknown;
Expand Down Expand Up @@ -146,7 +148,7 @@ public static string EnumToString(this Profile profile, ZUGFeRDVersion version)
case Profile.Comfort: return "urn:cen.eu:en16931:2017";
case Profile.Extended: return "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended";
case Profile.XRechnung1: return "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_1.2";
case Profile.XRechnung: return "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.0";
case Profile.XRechnung: return "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.1";

This comment has been minimized.

Copy link
@TomcatBB

TomcatBB Feb 3, 2022

Contributor

wouldn´t it be good to make here a Date dependent Check so that on 01.08.2022 we dont need a new Release for supporting Version 2.2.0 ?

This comment has been minimized.

Copy link
@stephanstapel

stephanstapel Feb 3, 2022

Author Owner

Good point, I also thought about that. That'll make the code less obvious so I chose the simpler way. Another concern was that this would help until August 2022, but how about the releases after that?!

This comment has been minimized.

Copy link
@TomcatBB

TomcatBB Feb 3, 2022

Contributor

i would find it a good solution when the Profile XRechnung always gives the correct Version at that point of Date, so its always the currently valid one. And when a breaking change Release like Version 3.0.0 arises a Profile named XRechnung2 could be then support the last 2.x Version, like it is now done for XRechnung 1.x.
And with the Date dependent Versions in Profile XRechnung everyone could easily see the Valid Ranges for the different XRechnung Versions for the current Major Version.

This comment has been minimized.

Copy link
@TomcatBB

TomcatBB Feb 7, 2022

Contributor

@stephanstapel have you seen my comment here? And when do you plan a new release with the 2.1.1 XRechnung support?

This comment has been minimized.

Copy link
@stephanstapel

stephanstapel Feb 7, 2022

Author Owner

Yes, I have seen it. I can issue a release anytime soon if necessary.

This comment has been minimized.

Copy link
@TomcatBB

TomcatBB Feb 7, 2022

Contributor

ok then when possible can you do this today?

and what do you think to directly implement the Date Check so that nobody needs to think on changing the code on 01.08.2022?

default: throw new Exception("Unsupported profile for ZUGFeRD version 21");
}
default:
Expand Down

0 comments on commit e87de42

Please sign in to comment.