Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importer returns standard ubl for CreditNote: Why not EStandard ubl_creditnote? #632

Open
melo0187 opened this issue Dec 20, 2024 · 2 comments

Comments

@melo0187
Copy link
Contributor

Since UBL has entirely different types for Invoice and CreditNote it would facilitate further processing (e.g. with https://github.com/phax/ph-ubl) a lot if ZUGFeRDInvoiceImporter's method for returning the standard would return ubl for UBL Invoices and ubl_creditnote for UBL CreditNote.

The enum EStandard already contains the entry ubl_creditnote, which is why I was expecting to get this as return from getStandard() for CreditNote documents and not ubl.

} else if (rootNode.equals("CreditNote")) {
return EStandard.ubl;

@jstaerk
Copy link
Collaborator

jstaerk commented Jan 7, 2025

i guess I just overlooked that instance, do the tests still run when corrected?

@melo0187
Copy link
Contributor Author

melo0187 commented Jan 8, 2025

i guess I just overlooked that instance, do the tests still run when corrected?

TL;DR: I believe they do.

In an attempt to provide a quick answer to the question I pulled the latest master to run the test.
First this required fixing compile errors in ZF2EdgeTest, because it claims to override getPaymentMeansCode and getPaymentMeansInformation, which do not exist.
Then I did actually see a test failure in testEEISI_300_cii_Import(org.mustangproject.ZUGFeRD.ZF2ImporterTest).
However, this test fails already on master as is.
Returning EStandard.ubl_creditnote for rootNode.equals("CreditNote") does not add any test failures.

So in conclusion I think it is safe to correct the returned EStandard for CreditNotes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants