junit tests

This commit is contained in:
Ralph Soika 2024-08-16 13:42:44 +02:00
parent b11a7cf3d7
commit 221181ad20
7 changed files with 777 additions and 24 deletions

View file

@ -350,7 +350,7 @@
</dependency>
<!-- JUnit Tests -->
<!-- JUnit Tests
<dependency>
<groupId>javax.json</groupId>
<artifactId>javax.json-api</artifactId>
@ -363,6 +363,7 @@
<version>1.1</version>
<scope>test</scope>
</dependency>
-->
<!-- JAX-RS 2.0 Test dependencies -->
<dependency>
<groupId>org.glassfish.jersey.core</groupId>

View file

@ -335,7 +335,7 @@ public class CargosoftXMLInvoiceImportService {
/**
* Creates and processes a new workitem with a given xml information from the
* filedata
* fileData
*
*
* @return
@ -567,27 +567,20 @@ public class CargosoftXMLInvoiceImportService {
/**
* Hilfsmethode die die ATC Nummer sucht.
* Wir gehen davon aus, das diese pro Rechnung nur einmal existieren kann.
* Wir gehen davon aus, das wir über die ChildItems diese aus dem billingtexts
* schon ermittel haben.
*
* @param doc
* @param workitem
*/
private void resolveATCNumber(Document doc, ItemCollection workitem) {
String atcNumber = null;
// Liste der BillingText-Elemente erhalten
NodeList billingTextList = doc.getElementsByTagName("BillingText");
if (billingTextList == null) {
return;
}
// Über die Liste iterieren und nach einem BillingText suchen, der mit "ATC"
// beginnt
for (int i = 0; i < billingTextList.getLength(); i++) {
Node billingTextNode = billingTextList.item(i);
if (billingTextNode.getNodeType() == Node.ELEMENT_NODE) {
String billingText = billingTextNode.getTextContent().trim();
if (billingText.startsWith("ATC")) {
atcNumber = billingText;
}
List<ItemCollection> childs = InvoiceUtil.explodeChildList(workitem);
for (ItemCollection child : childs) {
if (child.hasItem("atc.number")) {
atcNumber = child.getItemValueString("atc.number");
break;
}
}
if (atcNumber != null && !atcNumber.isEmpty()) {
@ -616,7 +609,6 @@ public class CargosoftXMLInvoiceImportService {
private void readXMLRows(Document doc, ItemCollection workitem) {
// create XPath...
List<ItemCollection> childItems = new ArrayList<>();
XPathFactory xpathFactory = XPathFactory.newInstance();
XPath xPath = xpathFactory.newXPath();
try {
@ -676,8 +668,12 @@ public class CargosoftXMLInvoiceImportService {
String activityType = (String) netActivityTypeExpr.evaluate(rowNode, XPathConstants.STRING);
childItemCol.setItemValue("category", activityType);
// Bei G = Gutschrift oder SR = Stornorechnung müssen wir das vorzeichen ändern
// Invoice Type S/H
/**
* S/H Kennzeichen auflösen
*
* Bei G = Gutschrift oder SR = Stornorechnung müssen wir das vorzeichen ändern
* Invoice Type S/H
*/
if (isGutschrift(workitem)) {
// Gutschrift
childItemCol.setItemValue("datev.shzeichen", "S");
@ -686,6 +682,27 @@ public class CargosoftXMLInvoiceImportService {
childItemCol.setItemValue("datev.shzeichen", "H");
}
/**
* Liste der BillingText-Elemente lesen....
*
* und ggf. die ATC Nummer finden....
**/
// XPath-Ausdruck für den BillingCode
XPathExpression billingCodeExpr = xPath.compile("BillingCode/Codes/Code");
String billingCode = (String) billingCodeExpr.evaluate(rowNode, XPathConstants.STRING);
childItemCol.setItemValue("BillingCode", billingCode);
// XPath-Ausdruck für die BillingTexts
XPathExpression billingTextsExpr = xPath.compile("BillingTexts/BillingText");
NodeList billingTextNodes = (NodeList) billingTextsExpr.evaluate(rowNode, XPathConstants.NODESET);
for (int bi = 0; bi < billingTextNodes.getLength(); bi++) {
String val = billingTextNodes.item(bi).getTextContent();
childItemCol.appendItemValue("BillingText", val);
// handelt es sich um eine ATC Nummer?
if (val.startsWith("ATC")) {
childItemCol.setItemValue("atc.number", val);
}
}
childItems.add(childItemCol);
}
}
@ -783,7 +800,7 @@ public class CargosoftXMLInvoiceImportService {
* @param belegNummer
* @return
*/
private boolean alreadyImported(String belegNummer) {
protected boolean alreadyImported(String belegNummer) {
String sQuery = "((type:workitem OR type:workitemarchive) AND $modelversion:rechnungsausgang* AND invoice.number:\""
+ belegNummer + "\")";

View file

@ -111,6 +111,48 @@ public class TestIMAPAuhtenticators {
}
/**
* Test IMAP connect via OAuth for email address imixs@alexander-logistics.com
*
* https://techcommunity.microsoft.com/t5/exchange/javamail-connecting-to-office-365-xoauth2-for-imap/m-p/1505026
*/
@Test
public void testOutlookAuthenticator_Imixs_plAGL() {
IMAPOutlookAuthenticator auth = new IMAPOutlookAuthenticator();
ItemCollection source = new ItemCollection();
source.setItemValue(DocumentImportService.SOURCE_ITEM_SERVER, "outlook.office365.com");
source.setItemValue(DocumentImportService.SOURCE_ITEM_PORT, "993");
source.setItemValue(DocumentImportService.SOURCE_ITEM_USER, "imixspl@alexander-logistics.com");
source.setItemValue(DocumentImportService.SOURCE_ITEM_PASSWORD, "A6x8Q~EWVUyt~gfyTHtIJf4ig.F9tajUpEEXMaCL");
Properties sourceOptions = new Properties();
sourceOptions.put("microsoft.tenantid", "51e2f038-0a96-41be-801d-bb4118aa018e");
sourceOptions.put("microsoft.clientid", "39e9eec5-6939-47dc-9729-3438a9898e63");
logger.info("Connect started....");
try {
Store store = auth.openMessageStore(source, sourceOptions);
Assert.assertNotNull(store);
Assert.assertTrue(store.isConnected());
logger.info("Connect OK");
// test open INBOX
IMAPFolder inbox = (IMAPFolder) store.getFolder("INBOX");
inbox.open(Folder.READ_WRITE);
// test messages
Message[] messages = inbox.getMessages();
logger.log(Level.INFO, "... {0} new messages found", messages.length);
} catch (MessagingException e) {
e.printStackTrace();
Assert.fail();
}
}
/**
* Test IMAP connect via Basic Authentication
* <p>

View file

@ -0,0 +1,164 @@
package com.alexanderlogistics.xml;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import java.io.IOException;
import java.io.InputStream;
import java.util.HashMap;
import java.util.List;
import javax.xml.transform.TransformerException;
import javax.xml.xpath.XPathExpressionException;
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.AccessDeniedException;
import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.ProcessingErrorException;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.Spy;
import org.mockito.junit.MockitoJUnitRunner;
import com.alexanderlogistics.InvoiceUtil;
import com.alexanderlogistics.KreditorDebitorService;
import com.alexanderlogistics.mahnlauf.MahnlaufService;
/**
* Testet den Import Vorgang anhand einer Cargosoft XML Datei
*
*
*
* @author rsoika
*/
@RunWith(MockitoJUnitRunner.class)
public class InvoiceImportTester {
@Spy
@InjectMocks
private CargosoftXMLInvoiceImportService service;
@Mock
private DocumentService documentService;
@Mock
private KreditorDebitorService kreditorDebitorService;
@Mock
private MahnlaufService mahnlaufService;
@Before
public void setUp() {
// Mock protected Methode 'alreadyImported' -> always false
Mockito.when(service.alreadyImported(Mockito.anyString())).thenReturn(false);
}
/**
* Ein Einfacher test
*
* @throws TransformerException
* @throws XPathExpressionException
* @throws ModelException
* @throws PluginException
* @throws ProcessingErrorException
* @throws AccessDeniedException
*
* @throws Exception
*/
@Test
public void testInvoiceBasic() throws Exception {
ItemCollection source = new ItemCollection();
String fileName = "001_R_224380_110136787.xml";
byte[] xmlContent = readTestFile("cargosoft/" + fileName);
assertNotNull(xmlContent);
// Act
ItemCollection result = service.createWorkitem(source, fileName, xmlContent, new HashMap<>());
// Assert
assertNotNull(result);
assertEquals("001", result.getItemValueString("mandant.id"));
// test Rows
List<ItemCollection> rows = InvoiceUtil.explodeChildList(result);
assertNotNull(rows);
assertEquals(2, rows.size());
ItemCollection row1 = rows.get(0);
ItemCollection row2 = rows.get(1);
assertEquals("EX-GCA-2408-042", row1.getItemValueString("datev.text"));
assertEquals("EX-GCA-2408-042", row2.getItemValueString("datev.text"));
}
/**
* Ein ATC test
*
* @throws IOException
*
* @throws Exception
*/
@Test
public void testInvoiceATC() throws Exception {
ItemCollection source = new ItemCollection();
String fileName = "001_R_224225_115103063.xml";
byte[] xmlContent = readTestFile("cargosoft/" + fileName);
assertNotNull(xmlContent);
// Act
ItemCollection result = service.createWorkitem(source, fileName, xmlContent, new HashMap<>());
// Assert
assertNotNull(result);
assertEquals("001", result.getItemValueString("mandant.id"));
assertEquals("ATC400012650820242452", result.getItemValueString("invoice.atc.number"));
// test Rows
List<ItemCollection> rows = InvoiceUtil.explodeChildList(result);
assertNotNull(rows);
assertEquals(2, rows.size());
ItemCollection row1 = rows.get(0);
assertEquals("IM-GCA-2408-116", row1.getItemValueString("datev.text"));
assertEquals("EUST", row1.getItemValueString("category"));
assertEquals("EUST", row1.getItemValueString("BillingCode"));
// test BillingText
List<String> billingTextList = row1.getItemValue("BillingText");
assertEquals(2, billingTextList.size());
// test ATC Number
assertEquals("ATC400012650820242452", row1.getItemValueString("atc.number"));
ItemCollection row2 = rows.get(1);
assertEquals("IM-GCA-2408-116", row2.getItemValueString("datev.text"));
assertEquals("SONST", row2.getItemValueString("category"));
}
/**
* Hilfsmethode zum einlesen einer xml test datei
*
* @return
* @throws IOException
*/
private byte[] readTestFile(String filename) throws IOException {
// Load the file from the resources folder
ClassLoader classLoader = getClass().getClassLoader();
InputStream inputStream = classLoader.getResourceAsStream(filename);
// Convert the InputStream to a String
// String xmlContent = new String(inputStream.readAllBytes(),
// StandardCharsets.UTF_8);
byte[] data = inputStream.readAllBytes();
// Optional: Close the InputStream
inputStream.close();
return data;
}
}

View file

@ -0,0 +1,257 @@
<?xml version="1.0" encoding="UTF-8"?>
<Invoices>
<Message>
<SenderID>CARGOSOFT</SenderID>
<ReceiverID>CUSTOMER</ReceiverID>
<Timezone>UTC</Timezone>
<MessageID>1</MessageID>
<MessageDate>
<DateTime>2024-08-14T11:51:03</DateTime>
</MessageDate>
</Message>
<Invoice>
<InvoiceHeader>
<Client>
<Description>Alexander Global Logistics GmbH</Description>
<Codes>
<Code Type="cs">001</Code>
</Codes>
</Client>
<Branch>
<Description>Alexander Global Logistics GmbH</Description>
<Codes>
<Code Type="cs">BRE</Code>
</Codes>
</Branch>
<InvoiceNumber>224225</InvoiceNumber>
<InvoiceType>
<Description>Ausgangsrechnung</Description>
<Codes>
<Code Type="cs">R</Code>
</Codes>
</InvoiceType>
<InvoiceCurrency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</InvoiceCurrency>
<InvoiceAmount>
<NetAmount>
<Amount isDomesticCurrency="true">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>3752.95</Value>
</Amount>
</NetAmount>
<VATInformation>
<VAT>
<Description>steuerfrei Ausfuhr</Description>
<Codes>
<Code Type="cs">0</Code>
</Codes>
<VATRate>0.0</VATRate>
</VAT>
<VATAmount>
<Amount isDomesticCurrency="true">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>0.0</Value>
</Amount>
</VATAmount>
</VATInformation>
</InvoiceAmount>
<CollectionInvoice>false</CollectionInvoice>
<BookingInformation/>
<BookingPeriod>202408</BookingPeriod>
<Cancelled>false</Cancelled>
<Correction>false</Correction>
<CostUnit>
<Description>IM-ZEL</Description>
<Codes>
<Code Type="cs">40</Code>
</Codes>
</CostUnit>
<Barcode/>
<InvoiceDate>2024-08-14T00:00:00</InvoiceDate>
<InvoiceAddress type="RECEIVER">
<Codes>
<Code Type="cs">D15445</Code>
</Codes>
<Formated>
<Name>Wancaster</Name>
<Name/>
<Name/>
<Street>Hochbuchstr. 17</Street>
<PostalCode>78253</PostalCode>
<City>Eigeltingen</City>
<Country/>
</Formated>
<References>
<Reference type="VAT-NO">DE319845483</Reference>
<Reference type="GLOBAL-ID"/>
</References>
</InvoiceAddress>
<InvoiceAddress type="BRANCH">
<Codes>
<Code Type="cs">A1972</Code>
</Codes>
<Formated>
<Name>Alexander Global Logistics GmbH</Name>
<Name>Museumstr. 2-6</Name>
<Street>Museumstr. 2-6</Street>
<PostalCode>28195</PostalCode>
<City>Bremen</City>
<Country>
<CountryCode>DE</CountryCode>
<Name>DEUTSCHLAND</Name>
</Country>
</Formated>
<References>
<Reference type="TAX-NO">460/104/05589</Reference>
<Reference type="VAT-NO">DE250152875</Reference>
<Reference type="GLOBAL-ID"/>
<Reference type="Bankverbindung1">Sparkasse Bremen</Reference>
<Reference type="Bankverbindung2">Sparkasse Bremen</Reference>
<Reference type="Bankverbindung4">USD - Account 555102599</Reference>
<Reference type="Bankverbindung5">IBAN: DE98 2905 0101 0555 1025 99</Reference>
<Reference type="SwiftCode">SWIFT: SBREDE22XXX</Reference>
<Reference type="IBAN Nummer">IBAN : DE97 2905 0101 0081 2163 92</Reference>
</References>
</InvoiceAddress>
<PaymentConditions>
<PaymentCondition>
<Description>Sofort zahlbar</Description>
<Codes>
<Code Type="cs">01</Code>
</Codes>
</PaymentCondition>
<DueDate>2024-08-14T00:00:00</DueDate>
</PaymentConditions>
<LastUpdateInformation>
<UpdateDate>2024-08-14T00:00:00</UpdateDate>
<UpdateTime>00:00:00</UpdateTime>
<User>
<Name>Mohamed Kanaan</Name>
<Email>mkanaan@alexander-logistics.com</Email>
<Telephone>+49 421 56 646-191</Telephone>
<Fax>+49 421 56 646-200</Fax>
</User>
</LastUpdateInformation>
<OrderData>
<FileNumber>IM-GCA-2408-116</FileNumber>
<OrderDirection>IMPORT</OrderDirection>
<NumberOfGoods>1</NumberOfGoods>
<DescriptionOfGoods>2023.2.6300 Terminals</DescriptionOfGoods>
<WeightOfGoods>3265.865</WeightOfGoods>
<VolumeOfGoods>0.0</VolumeOfGoods>
<NumberOfContainers20>0</NumberOfContainers20>
</OrderData>
<References>
<Reference type="invoice-layout">1004</Reference>
</References>
<Attachments>
<Attachment>
<Filename>001_224225_240814_R.pdf</Filename>
</Attachment>
</Attachments>
</InvoiceHeader>
<InvoiceRows>
<InvoiceRow>
<Row>5</Row>
<FileNumber>IM-GCA-2408-116</FileNumber>
<BillingCode>
<Codes>
<Code Type="cs">EUST</Code>
</Codes>
</BillingCode>
<BillingTexts>
<BillingText>Einfuhrumsatzsteuer laut Auslagen</BillingText>
<BillingText>ATC400012650820242452</BillingText>
</BillingTexts>
<InvoiceAmount>
<NetAmount>
<Amount isDomesticCurrency="false">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>3591.34</Value>
</Amount>
</NetAmount>
<VATInformation>
<VAT>
<Description>steuerfrei Ausfuhr</Description>
<Codes>
<Code Type="cs">0</Code>
</Codes>
<VATRate>0.0</VATRate>
</VAT>
</VATInformation>
</InvoiceAmount>
<ActivityType>
<Description>EUSt</Description>
<Codes>
<Code Type="cs">EUST</Code>
</Codes>
</ActivityType>
<SinglePrice>3591.340</SinglePrice>
</InvoiceRow>
<InvoiceRow>
<Row>10</Row>
<FileNumber>IM-GCA-2408-116</FileNumber>
<BillingCode>
<Codes>
<Code Type="cs">VP</Code>
</Codes>
</BillingCode>
<BillingTexts>
<BillingText>Vorlageprovision 4,5 %</BillingText>
<BillingText>bei einer Einhaltung einer Zahlung</BillingText>
<BillingText>binnen 8 Banktagen kann der Betrag</BillingText>
<BillingText>in Abzug gebracht werden</BillingText>
</BillingTexts>
<InvoiceAmount>
<NetAmount>
<Amount isDomesticCurrency="false">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>161.61</Value>
</Amount>
</NetAmount>
<VATInformation>
<VAT>
<Description>steuerfrei Ausfuhr</Description>
<Codes>
<Code Type="cs">0</Code>
</Codes>
<VATRate>0.0</VATRate>
</VAT>
</VATInformation>
</InvoiceAmount>
<ActivityType>
<Description>other charges</Description>
<Codes>
<Code Type="cs">SONST</Code>
</Codes>
</ActivityType>
<SinglePrice>4.500</SinglePrice>
</InvoiceRow>
</InvoiceRows>
</Invoice>
</Invoices>

View file

@ -0,0 +1,253 @@
<?xml version="1.0" encoding="UTF-8"?>
<Invoices>
<Message>
<SenderID>CARGOSOFT</SenderID>
<ReceiverID>CUSTOMER</ReceiverID>
<Timezone>UTC</Timezone>
<MessageID>1</MessageID>
<MessageDate>
<DateTime>2024-08-16T11:01:36</DateTime>
</MessageDate>
</Message>
<Invoice>
<InvoiceHeader>
<Client>
<Description>Alexander Global Logistics GmbH</Description>
<Codes>
<Code Type="cs">001</Code>
</Codes>
</Client>
<Branch>
<Description>Alexander Global Logistics GmbH</Description>
<Codes>
<Code Type="cs">BRE</Code>
</Codes>
</Branch>
<InvoiceNumber>224380</InvoiceNumber>
<InvoiceType>
<Description>Ausgangsrechnung</Description>
<Codes>
<Code Type="cs">R</Code>
</Codes>
</InvoiceType>
<InvoiceCurrency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</InvoiceCurrency>
<InvoiceAmount>
<NetAmount>
<Amount isDomesticCurrency="true">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>1150.0</Value>
</Amount>
</NetAmount>
<VATInformation>
<VAT>
<Description>steuerfrei Ausfuhr</Description>
<Codes>
<Code Type="cs">0</Code>
</Codes>
<VATRate>0.0</VATRate>
</VAT>
<VATAmount>
<Amount isDomesticCurrency="true">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>0.0</Value>
</Amount>
</VATAmount>
</VATInformation>
</InvoiceAmount>
<CollectionInvoice>false</CollectionInvoice>
<BookingInformation/>
<BookingPeriod>202408</BookingPeriod>
<Cancelled>false</Cancelled>
<Correction>false</Correction>
<CostUnit>
<Description>EX-GCA</Description>
<Codes>
<Code Type="cs">90</Code>
</Codes>
</CostUnit>
<Barcode/>
<InvoiceDate>2024-08-16T00:00:00</InvoiceDate>
<InvoiceAddress type="RECEIVER">
<Codes>
<Code Type="cs">D13680</Code>
</Codes>
<Formated>
<Name>HQ Recyclers Network e.K.</Name>
<Name/>
<Name/>
<Street>Liebigstr. 2-20</Street>
<PostalCode>22113</PostalCode>
<City>Hamburg</City>
<Country/>
</Formated>
<References>
<Reference type="VAT-NO">DE309035001</Reference>
<Reference type="GLOBAL-ID"/>
</References>
</InvoiceAddress>
<InvoiceAddress type="BRANCH">
<Codes>
<Code Type="cs">A1972</Code>
</Codes>
<Formated>
<Name>Alexander Global Logistics GmbH</Name>
<Name>Museumstr. 2-6</Name>
<Street>Museumstr. 2-6</Street>
<PostalCode>28195</PostalCode>
<City>Bremen</City>
<Country>
<CountryCode>DE</CountryCode>
<Name>DEUTSCHLAND</Name>
</Country>
</Formated>
<References>
<Reference type="TAX-NO">460/104/05589</Reference>
<Reference type="VAT-NO">DE250152875</Reference>
<Reference type="GLOBAL-ID"/>
<Reference type="Bankverbindung1">Sparkasse Bremen</Reference>
<Reference type="Bankverbindung2">Sparkasse Bremen</Reference>
<Reference type="Bankverbindung4">USD - Account 555102599</Reference>
<Reference type="Bankverbindung5">IBAN: DE98 2905 0101 0555 1025 99</Reference>
<Reference type="SwiftCode">SWIFT: SBREDE22XXX</Reference>
<Reference type="IBAN Nummer">IBAN : DE97 2905 0101 0081 2163 92</Reference>
</References>
</InvoiceAddress>
<PaymentConditions>
<PaymentCondition>
<Description>Sofort zahlbar</Description>
<Codes>
<Code Type="cs">01</Code>
</Codes>
</PaymentCondition>
<DueDate>2024-08-16T00:00:00</DueDate>
</PaymentConditions>
<LastUpdateInformation>
<UpdateDate>2024-08-16T00:00:00</UpdateDate>
<UpdateTime>00:00:00</UpdateTime>
<User>
<Name>Mathis Hoffmann</Name>
<Email>mhoffmann@alexander-logistics.com</Email>
<Telephone>+49 421 56 646-116</Telephone>
<Fax>+49 421 56 646-201</Fax>
</User>
</LastUpdateInformation>
<OrderData>
<FileNumber>EX-GCA-2408-042</FileNumber>
<OrderDirection>EXPORT</OrderDirection>
<NumberOfGoods>1</NumberOfGoods>
<DescriptionOfGoods>2023.2.6300 Terminals</DescriptionOfGoods>
<WeightOfGoods>24000.0</WeightOfGoods>
<VolumeOfGoods>0.0</VolumeOfGoods>
<NumberOfContainers20>0</NumberOfContainers20>
</OrderData>
<References>
<Reference type="invoice-layout">1004</Reference>
</References>
<Attachments>
<Attachment>
<Filename>001_224380_240816_R.pdf</Filename>
</Attachment>
</Attachments>
</InvoiceHeader>
<InvoiceRows>
<InvoiceRow>
<Row>5</Row>
<FileNumber>EX-GCA-2408-042</FileNumber>
<BillingCode>
<Codes>
<Code Type="cs">TRANS</Code>
</Codes>
</BillingCode>
<BillingTexts>
<BillingText>Rate Schwarzenbek bis Port Kelang</BillingText>
</BillingTexts>
<InvoiceAmount>
<NetAmount>
<Amount isDomesticCurrency="false">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>1100.0</Value>
</Amount>
</NetAmount>
<VATInformation>
<VAT>
<Description>steuerfrei Ausfuhr</Description>
<Codes>
<Code Type="cs">0</Code>
</Codes>
<VATRate>0.0</VATRate>
</VAT>
</VATInformation>
</InvoiceAmount>
<ActivityType>
<Description>Seefracht</Description>
<Codes>
<Code Type="cs">SEE</Code>
</Codes>
</ActivityType>
<SinglePrice>1100.000</SinglePrice>
</InvoiceRow>
<InvoiceRow>
<Row>10</Row>
<FileNumber>EX-GCA-2408-042</FileNumber>
<BillingCode>
<Codes>
<Code Type="cs">TRANS</Code>
</Codes>
</BillingCode>
<BillingTexts>
<BillingText>Telex</BillingText>
</BillingTexts>
<InvoiceAmount>
<NetAmount>
<Amount isDomesticCurrency="false">
<Currency>
<Description>EURO</Description>
<Codes>
<Code Type="cs">EUR</Code>
</Codes>
</Currency>
<Value>50.0</Value>
</Amount>
</NetAmount>
<VATInformation>
<VAT>
<Description>steuerfrei Ausfuhr</Description>
<Codes>
<Code Type="cs">0</Code>
</Codes>
<VATRate>0.0</VATRate>
</VAT>
</VATInformation>
</InvoiceAmount>
<ActivityType>
<Description>Seefracht</Description>
<Codes>
<Code Type="cs">SEE</Code>
</Codes>
</ActivityType>
<SinglePrice>50.000</SinglePrice>
</InvoiceRow>
</InvoiceRows>
</Invoice>
</Invoices>

25
pom.xml
View file

@ -267,14 +267,33 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.1</version>
<version>4.13.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-all</artifactId>
<version>1.9.5</version>
<artifactId>mockito-core</artifactId>
<version>5.8.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.eclipse.parsson</groupId>
<artifactId>jakarta.json</artifactId>
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish.jaxb</groupId>
<artifactId>jaxb-runtime</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>3.0.0</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>