konik-io / konik

A library to create, read and validate ZUGFeRD compliant invoices. Available for Java and .NET
https://konik.io
Other
46 stars 18 forks source link

Specific enums for codes like TaxRegistration #62

Closed djmj closed 5 years ago

djmj commented 5 years ago

A lot of things are straightforward to programm and very intuitive. But finding the tax registration type code was not since it is included in the big code list of class Reference.

Here some examples which would make code more user friendly and programming less error prone.

TaxRegistrationCode

This would be more user friendly if a specific enum would be created only consisting of the two possible values (FN, VAT).

Note

SubjectCode

SchemeID

Same applies to the small set of global id types for an Item like GTIN. Its just not nice having a String like "0160" in code that defines it.

Vad1mo commented 5 years ago

could give a code example how it might look like? I have some difficulties to visualize this.

djmj commented 5 years ago

Something like

public enum TaxRegistrationCode
{
    VAT,
    FC
}

new TaxRegistration("DE...", TaxRegistrationCode.VAT);
stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.