Check if street in the address of the recipient is null

Fixes #222
This commit is contained in:
Daniel Murygin
2021-02-08 10:12:33 +01:00
parent f7a4635285
commit e90d1e12fd

View File

@@ -156,9 +156,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
}
xml += " <ram:PostalTradeAddress>\n"
+ " <ram:PostcodeCode>" + XMLTools.encodeXML(party.getZIP())
+ "</ram:PostcodeCode>\n"
+ " <ram:LineOne>" + XMLTools.encodeXML(party.getStreet())
+ "</ram:PostcodeCode>\n";
if (party.getStreet() != null) {
xml += " <ram:LineOne>" + XMLTools.encodeXML(party.getStreet())
+ "</ram:LineOne>\n";
}
if (party.getAdditionalAddress() != null) {
xml += " <ram:LineTwo>" + XMLTools.encodeXML(party.getAdditionalAddress())
+ "</ram:LineTwo>\n";