phax / ph-ubl

Java library for reading and writing UBL 2.0, 2.1, 2.2, 2.3 and 2.4 documents
Apache License 2.0
111 stars 40 forks source link

Open PEPPOL support #21

Closed horiaradu closed 5 years ago

horiaradu commented 5 years ago

Is there any support for generating / reading Open PEPPOL formats of documents?

phax commented 5 years ago

Yes, PEPPOL UBL is a "profile" or "subset" of UBL 2.1 so easily usable. So all PEPPOL documents adhere to the UBL 2.1 XSDs and adds additional Schematron rules on top of it. Does that answer your question?

horiaradu commented 5 years ago

Thanks a lot for the reply, maybe you can share a snippet / example showing how I can use a UBL21Writer to produce a PEPPOL UBL?

phax commented 5 years ago

I don't have code to create a valid PEPPOL invoice from scratch, but I have code to create an "arbitrary" invoice at https://github.com/phax/ph-ubl/blob/master/ph-ubl21/src/test/java/com/helger/ubl21/CreateInvoiceFromScratchFuncTest.java and example PEPPOL files reside at https://github.com/OpenPEPPOL/peppol-bis-invoice-3/tree/master/rules/examples You can than test your UBL Instances online at https://peppol.helger.com/public/locale-en_US/menuitem-validation-bis2

phax commented 5 years ago

Do you need more input, or can this issue be closed?

horiaradu commented 5 years ago

Thanks a lot for the quick reply. I've looked over the PEPPOL standard and used the InvoiceType to construct a compliant document.

I believe this can be closed. If I run into any issues, I will write :)

phax commented 5 years ago

Thanks for the feedback and good luck. You might consider giving https://github.com/phax/ph-bdve a look, to validate your instances before sending them out.