Enable suport for PayeeTradeParty / PayeeParty.

This commit is contained in:
langfr
2024-08-29 10:13:18 +01:00
parent 0f55d35d05
commit 989870b28d
7 changed files with 84 additions and 9 deletions

View File

@@ -95,6 +95,7 @@ public class XRTest extends TestCase {
.setReferenceNumber("991-01484-64")//leitweg-id
// not using any VAT, this is also a test of zero-rated goods:
.setNumber(number).addItem(new Item(new Product("Testprodukt", "", "C62", BigDecimal.ZERO), amount, new BigDecimal(1.0)))
.setPayee( new TradeParty().setName("VR Factoring GmbH").setID("DE813838785").setLegalOrganisation(new LegalOrganisation("0199", "391200LDDFJDMIPPMZ54")))
.embedFileInXML(fe1);
@@ -109,6 +110,9 @@ public class XRTest extends TestCase {
.asInt()
.isEqualTo(1); //2 errors are OK because there is a known bug
assertThat(theXML).valueByXPath("count(//*[local-name()='PayeeTradeParty'])")
.asInt()
.isEqualTo(1);
assertThat(theXML).valueByXPath("//*[local-name()='DuePayableAmount']")
.asDouble()

View File

@@ -139,6 +139,9 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
assertEquals("DE", invoice.getSender().getCountry());
assertEquals("Stadthausen", invoice.getSender().getLocation());
assertTrue(invoice.getPayee() != null);
assertEquals("VR Factoring GmbH", invoice.getPayee().getName());
TransactionCalculator tc = new TransactionCalculator(invoice);
assertEquals(new BigDecimal("571.04"), tc.getGrandTotal());
@@ -285,6 +288,8 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
TransactionCalculator tc = new TransactionCalculator(invoice);
assertEquals(new BigDecimal("1.00"), tc.getGrandTotal());
assertTrue(invoice.getPayee() != null);
assertEquals("VR Factoring GmbH", invoice.getPayee().getName());
}
/**

View File

@@ -66,6 +66,11 @@
</cac:PartyLegalEntity>
</cac:Party>
</cac:AccountingCustomerParty>
<cac:PayeeParty>
<cac:PartyName>
<cbc:Name>VR Factoring GmbH</cbc:Name>
</cac:PartyName>
</cac:PayeeParty>
<cac:Delivery>
<cbc:ActualDeliveryDate>2017-05-07</cbc:ActualDeliveryDate>
</cac:Delivery>