easybill / e-invoicing

A library for PHP to generate and read EN16931 conform structured XML data.
MIT License
3 stars 2 forks source link

Lower the scope of the lib to just EN16931 #3

Closed BolZer closed 3 months ago

mschering commented 3 months ago

HI,

I just implemented this lib 2 days ago :) Do I understand correctly that I now have to use another lib for ZUGFeRD?

Best regards, Merijn

BolZer commented 3 months ago

HI,

I just implemented this lib 2 days ago :) Do I understand correctly that I now have to use another lib for ZUGFeRD?

Best regards, Merijn

Hi @mschering. That's unfortunate. With this lib you get the barebone of the EN16931 e-invoice. This includes the CII syntax which ZUGFeRD / factur-X uses and the UBL-Syntax which Peppol BIS Billing and XRechnung uses.

You're able to generate those formats with this lib. The only thing that is currently missing to the previous iteration are the helpers (i. E. the ENUM of the different ZUGFeRD profiles) and of course the factory that helped with setting the correct customization id for ZUGFeRD, XRechnung and Peppol.

You could take a look at the https://packagist.org/packages/easybill/zugferd-php. That repository is dedicated to ZUGFeRD. The CII models are identical. In your implementation you may only need to change the namespaces of the use-statements and it should be fine.

However, we may add CIUS specific things (like the profile ids) in the future. It was important that the scope was a bit smaller as we use this library in our main project and the feature set was a bit bloated. On top the structure of the lib was not DRY, as the CII and UBL models were copied in different namespaces.

I'm sorry for the trouble.

mschering commented 3 months ago

No need to be sorry! I took a risk using an unreleased lib. I will look into the zugferd-php lib as that is my main requirement right now. I thought using this lib I was ready for supporting Peppol BIS and XRechnung too.

Thanks!

BolZer commented 3 months ago

No need to be sorry! I took a risk using an unreleased lib. I will look into the zugferd-php lib as that is my main requirement right now. I thought using this lib I was ready for supporting Peppol BIS and XRechnung too.

Thanks!

No problem. You can keep an eye on this lib. It's still possible to generate XRechnung, Peppol and ZUGFeRD with this lib. Our plan is to include the specific CIUS things (kinda like the previous interation), as we will probably use this lib instead of the zugferd-php lib in the future.

BolZer commented 3 months ago

@mschering FYI: If you take a look at the tests of this lib you can still see that ZUGFeRD and XRechnung is possible.

This one is ZUGFeRD with the EN16931 profile: https://github.com/easybill/e-invoicing/blob/main/tests/Integration/CIITest.php

This one is XRechnung 3.0 as UBL document: https://github.com/easybill/e-invoicing/blob/main/tests/Integration/UBLTest.php

mschering commented 3 months ago

Thanks! So what benefits does the other zugferd-php lib have over this one?

BolZer commented 3 months ago

Thanks! So what benefits does the other zugferd-php lib have over this one?

There're not many benefits. Maybe none, depending on your viewpoint. The only benefits, that come to my mind, are: You are able to generate ZUGFeRD 1.0 (not much of a benefit). There're more dedicated tests for ZUGFeRD and the different Profiles. The API of the lib is stable.

However, we will put our effort in this library. It is the successor of the zugferd-php lib, or will be :)

It may support in the future the EDIFACT format on top of CII and UBL and will include ENUMS for different things like currency, country and other codes which were defined in EN16931. Thats EN16931 specific things.

We will include CIUS specific helpers (ZUGFeRD, XRechnung and Peppol BIS (and maybe PINT) in the future too, as we will use this lib to generate our e-invoices.

mschering commented 3 months ago

OK, thanks. Then I will stick with this lib. I want to support XRechnung and Peppol BIS in the future too.