Squashed commit of the following:
commit f0a44d757de2693e5baa89ac68192ee92632e0a2 Author: langfr <frank.langelage@outlook.de> Date: Sat Sep 6 12:00:42 2025 +0100 Enable option setting Additional Document Description 2. commit 15524a2ed661fb44f782863da5d7e9fcf4f68e78 Author: langfr <frank.langelage@outlook.de> Date: Tue Sep 2 21:30:30 2025 +0100 Enable option setting Additional Document Description. Enable setting and reading Additional Document Description.
This commit is contained in:
@@ -102,7 +102,7 @@ public class XRTest extends TestCase {
|
||||
BigDecimal amount = new BigDecimal(amountStr);
|
||||
byte[] b = {12, 13};
|
||||
|
||||
FileAttachment fe1 = new FileAttachment("one.pdf", "application/pdf", "Alternative", b);
|
||||
FileAttachment fe1 = new FileAttachment("one.pdf", "application/pdf", "Alternative", b,"Beschreibung");
|
||||
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"))
|
||||
@@ -121,6 +121,7 @@ public class XRTest extends TestCase {
|
||||
zf2p.setProfile(Profiles.getByName("XRechnung"));
|
||||
zf2p.generateXML(i);
|
||||
String theXML = new String(zf2p.getXML(), StandardCharsets.UTF_8);
|
||||
System.out.println(theXML);
|
||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||
assertTrue(theXML.contains("#SKONTO#"));
|
||||
assertThat(theXML).valueByXPath("count(//*[local-name()='IncludedSupplyChainTradeLineItem'])")
|
||||
@@ -158,7 +159,7 @@ public class XRTest extends TestCase {
|
||||
assertEquals(attachedFiles.length, 1);
|
||||
|
||||
assertTrue(Arrays.equals(attachedFiles[0].getData(), b));
|
||||
|
||||
assertEquals("Beschreibung",attachedFiles[0].getDescription());
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user