-
-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
45 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -88,10 +88,11 @@ public void testXREdgeExport() { | |
Invoice i = new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()) | ||
.setSender(new TradeParty(orgname,"teststr","55232","teststadt","DE").setEmail("[email protected]").addTaxID("DE4711").addVATID("DE0815").setContact(new Contact("Hans Test","+49123456789","[email protected]")).addBankDetails(new BankDetails("DE12500105170648489890","COBADEFXXX"))) | ||
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").setEmail("[email protected]")) | ||
.addCashDiscount(new CashDiscount(new BigDecimal(2),7)) | ||
.addCashDiscount(new CashDiscount(new BigDecimal(3),14)) | ||
.setReferenceNumber("991-01484-64")//leitweg-id | ||
// not using any VAT, this is also a test of zero-rated goods: | ||
.setNumber(number).setPaymentTermDescription("#SKONTO#TAGE=14#PROZENT=2.25#\n" + | ||
"#SKONTO#TAGE=28#PROZENT=1.00#\n").addItem(new Item(new Product("Testprodukt", "", "C62", BigDecimal.ZERO), amount, new BigDecimal(1.0))) | ||
.setNumber(number).addItem(new Item(new Product("Testprodukt", "", "C62", BigDecimal.ZERO), amount, new BigDecimal(1.0))) | ||
.embedFileInXML(fe1); | ||
|
||
|
||
|
@@ -101,6 +102,7 @@ public void testXREdgeExport() { | |
zf2p.generateXML(i); | ||
String theXML = new String(zf2p.getXML(), StandardCharsets.UTF_8); | ||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice")); | ||
assertTrue(theXML.contains("#SKONTO#")); | ||
assertThat(theXML).valueByXPath("count(//*[local-name()='IncludedSupplyChainTradeLineItem'])") | ||
.asInt() | ||
.isEqualTo(1); //2 errors are OK because there is a known bug | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters