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

ZUGFeRD2PullProvider needs getDueDate() although getPaymentTermDescription() is defined #155

Closed
heisej opened this issue May 6, 2020 · 1 comment

Comments

@heisej
Copy link
Contributor

heisej commented May 6, 2020

When using getPaymentTermDescription() to specify the payment terms one still has to define getDueDate() as well.
This is caused by following lines where paymentTermsDescription is always 'null' for the first if-block. Therefore the fallback string is constructed in any case before even testing for a supplied description.

Exchanging the two if-Blocks would correct both issues and be the correct way to implement this.

if (paymentTermsDescription==null) {
paymentTermsDescription= "Zahlbar ohne Abzug bis " + germanDateFormat.format(trans.getDueDate());
}
if (trans.getPaymentTermDescription()!=null) {
paymentTermsDescription=trans.getPaymentTermDescription();
}

@jstaerk
Copy link
Collaborator

jstaerk commented May 7, 2020

that would be great, can you issue an according pull request?

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