Merge pull request #909 from langfr/issue/ShipToEmailWarning

ShipToTradeParty should not contain URIUniversalCommunication
This commit is contained in:
Jochen Staerk
2025-08-11 09:29:56 +02:00
committed by GitHub
3 changed files with 5 additions and 1 deletions

View File

@@ -219,7 +219,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
xml += "<ram:CountryID>" + XMLTools.encodeXML(party.getCountry())
+ "</ram:CountryID>"
+ "</ram:PostalTradeAddress>";
if (party.getUriUniversalCommunicationID() != null && party.getUriUniversalCommunicationIDScheme() != null) {
if (party.getUriUniversalCommunicationID() != null && party.getUriUniversalCommunicationIDScheme() != null && (!isShipToTradeParty)) {
xml += "<ram:URIUniversalCommunication>" +
"<ram:URIID schemeID=\"" + party.getUriUniversalCommunicationIDScheme() + "\">" +
XMLTools.encodeXML(party.getUriUniversalCommunicationID())

View File

@@ -106,6 +106,7 @@ public class XRTest extends TestCase {
Invoice i = new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date())
.setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").setEmail("sender@example.com").addTaxID("DE4711").addVATID("DE0815").setContact(new Contact("Hans Test", "+49123456789", "test@example.org")).addBankDetails(new BankDetails("DE12500105170648489890", "COBADEFXXX").setAccountName("kontoInhaber")))
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").setEmail("recipient@sample.org"))
.setDeliveryAddress(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").setEmail("recipient@sample.org"))
.addCashDiscount(new CashDiscount(new BigDecimal(2), 7))
.addCashDiscount(new CashDiscount(new BigDecimal(3), 14))
.setReferenceNumber("991-01484-64")//leitweg-id