Allow setting Contact for recipient TradeParty in XRechnung

fixes ZUGFeRD/mustangproject#216
This commit is contained in:
Sewan Aleanakian
2021-01-27 13:34:02 +01:00
parent 4933a69369
commit 45475bee2e

View File

@@ -129,7 +129,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
}
xml += " <ram:Name>" + XMLTools.encodeXML(party.getName()) + "</ram:Name>\n";
if ((party.getContact() != null) && (isSender || profile == Profiles.getByName("Extended"))) {
if ((party.getContact() != null) && (isSender || profile == Profiles.getByName("Extended") || profile == Profiles.getByName("XRechnung"))) {
xml = xml + "<ram:DefinedTradeContact>\n" + " <ram:PersonName>" + XMLTools.encodeXML(party.getContact().getName())
+ "</ram:PersonName>\n";
if (party.getContact().getPhone() != null) {