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

Add support for BuyerOrderReferencedDocument on line level #470

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

J-N-K
Copy link
Contributor

@J-N-K J-N-K commented Sep 10, 2024

Closes #466

Copy link
Contributor Author

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\library\src\main\java\org\mustangproject\ZUGFeRD\ZUGFeRDInvoiceImporter.java doesn't require modification because this is already handled by Item.

Comment on lines +322 to +330
public Item addBuyerOrderReferencedDocumentLineID(String s) {
buyerOrderReferencedDocumentLineID = s;
return this;
}

@Deprecated(since = "2.14.0")
public Item addReferencedLineID(String s) {
referencedLineID = s;
return addBuyerOrderReferencedDocumentLineID(s);
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed this method to align it with the getter (which is part of the interface) and also be more consistent. I have kept and deprecated the old method for backward compatibility.

+ "<ram:LineID>" + XMLTools.encodeXML(currentItem.getBuyerOrderReferencedDocumentLineID()) + "</ram:LineID>"
+ "</ram:BuyerOrderReferencedDocument>";
if ((currentItem.getBuyerOrderReferencedDocumentLineID() != null) || (currentItem.getBuyerOrderReferencedDocumentID() != null)) {
xml += "<ram:BuyerOrderReferencedDocument> ";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a general comment: wouldn't it make sense to use StringBuilder in this class instead of creating a new String object with each step?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes stringbuilder would make sense

@jstaerk
Copy link
Collaborator

jstaerk commented Oct 5, 2024

apologies for the late reaction, do you have time to resolve the conflicts?

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

Successfully merging this pull request may close these issues.

BuyerOrderReferencedDocument / IssuerAssignedID
2 participants