-
-
Notifications
You must be signed in to change notification settings - Fork 155
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
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Jan N. Klug <[email protected]>
There was a problem hiding this 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
.
public Item addBuyerOrderReferencedDocumentLineID(String s) { | ||
buyerOrderReferencedDocumentLineID = s; | ||
return this; | ||
} | ||
|
||
@Deprecated(since = "2.14.0") | ||
public Item addReferencedLineID(String s) { | ||
referencedLineID = s; | ||
return addBuyerOrderReferencedDocumentLineID(s); | ||
} |
There was a problem hiding this comment.
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> "; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
apologies for the late reaction, do you have time to resolve the conflicts? |
Closes #466