diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
index 607ba92..ad83656 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
@@ -13,6 +13,7 @@ import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
import org.imixs.workflow.faces.util.ResourceBundleHandler;
+import jakarta.ejb.EJB;
import jakarta.inject.Inject;
/**
@@ -63,7 +64,8 @@ public class InvoicePlugin extends AbstractPlugin {
@ConfigProperty(name = "invoice.position.pattern", defaultValue = INVOICE_POSITIONS_PATTERN_DEFAULT)
String invoicePositionsPattern;
- @Inject
+ // @Inject
+ @EJB
KreditorDebitorService kreditorService;
@Inject
diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/KreditorDebitorService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/KreditorDebitorService.java
index b2cb814..bad5ef9 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/KreditorDebitorService.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/KreditorDebitorService.java
@@ -30,17 +30,16 @@ package com.alexanderlogistics;
import java.util.List;
import java.util.logging.Logger;
-import javax.annotation.security.DeclareRoles;
-import javax.annotation.security.RolesAllowed;
-import javax.annotation.security.RunAs;
-
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.QueryException;
-import jakarta.ejb.EJB;
+import jakarta.annotation.security.DeclareRoles;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.annotation.security.RunAs;
import jakarta.ejb.Singleton;
+import jakarta.inject.Inject;
/**
* Der KreditorService wird verwendet um einen Kreditor zu finden oder neue
@@ -64,7 +63,7 @@ public class KreditorDebitorService {
@SuppressWarnings("unused")
private static Logger logger = Logger.getLogger(KreditorDebitorService.class.getName());
- @EJB
+ @Inject
DocumentService documentService;
/**
diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportService.java
index 14e7308..a3cb1b6 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportService.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/OPListExportService.java
@@ -31,8 +31,6 @@ import java.util.Collection;
import java.util.Date;
import java.util.logging.Logger;
-import javax.annotation.security.RunAs;
-
import org.eclipse.microprofile.config.inject.ConfigProperty;
import org.imixs.archive.core.SnapshotService;
import org.imixs.workflow.FileData;
@@ -40,6 +38,7 @@ import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.exceptions.QueryException;
+import jakarta.annotation.security.RunAs;
import jakarta.ejb.Singleton;
import jakarta.inject.Inject;
diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/ZahlungseingangService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/ZahlungseingangService.java
index 2c5eb3c..542a180 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/ZahlungseingangService.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/ZahlungseingangService.java
@@ -32,10 +32,6 @@ import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
-import javax.annotation.security.DeclareRoles;
-import javax.annotation.security.RolesAllowed;
-import javax.annotation.security.RunAs;
-
import org.imixs.workflow.ItemCollection;
import org.imixs.workflow.engine.DocumentService;
import org.imixs.workflow.engine.WorkflowService;
@@ -44,6 +40,9 @@ import org.imixs.workflow.exceptions.ModelException;
import org.imixs.workflow.exceptions.PluginException;
import org.imixs.workflow.exceptions.ProcessingErrorException;
+import jakarta.annotation.security.DeclareRoles;
+import jakarta.annotation.security.RolesAllowed;
+import jakarta.annotation.security.RunAs;
import jakarta.ejb.Singleton;
import jakarta.inject.Inject;
diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/api/CargosoftMigrationRestService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/api/CargosoftMigrationRestService.java
index f69e381..b131dd8 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/api/CargosoftMigrationRestService.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/api/CargosoftMigrationRestService.java
@@ -38,10 +38,6 @@ import java.util.List;
import java.util.TimeZone;
import java.util.logging.Logger;
-import javax.ws.rs.GET;
-import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.MediaType;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.ParserConfigurationException;
@@ -70,6 +66,10 @@ import com.alexanderlogistics.xml.CargosoftXMLInvoiceImportService;
import jakarta.ejb.Stateless;
import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import jakarta.ws.rs.Produces;
+import jakarta.ws.rs.core.MediaType;
/**
** Dieser Service korrigiert falsch importierte Cargosoft daten.
diff --git a/office-alexander-logistics-app/src/test/java/com/alexanderlogistics/sepa/TestSEPATransform.java b/office-alexander-logistics-app/src/test/java/com/alexanderlogistics/sepa/TestSEPATransform.java
index 1c22701..430be8c 100644
--- a/office-alexander-logistics-app/src/test/java/com/alexanderlogistics/sepa/TestSEPATransform.java
+++ b/office-alexander-logistics-app/src/test/java/com/alexanderlogistics/sepa/TestSEPATransform.java
@@ -54,7 +54,7 @@ public class TestSEPATransform {
@Test
public void testBankPolski() throws IOException {
String MODEL_PATH_XML = "sepa/beispiel-daten.xml";
- String MODEL_PATH_XSL = "sepa/sepa-2.0.8-pl.xsl";
+ String MODEL_PATH_XSL = "sepa/sepa-2.0.9-pl.xsl";
try {
XSLTester.transform(MODEL_PATH_XML, MODEL_PATH_XSL, "../reports/sepa/result_sepa02.xml");
} catch (Exception e) {
diff --git a/reports/sepa/beispiel-daten.xml b/reports/sepa/beispiel-daten.xml
index b192448..370a7ad 100644
--- a/reports/sepa/beispiel-daten.xml
+++ b/reports/sepa/beispiel-daten.xml
@@ -58,7 +58,7 @@
Rechnungseingang
-
- Invoice Example-1
+ Invoice Example-1 Test_123
-
XXXADEMM
@@ -86,7 +86,10 @@
2020-07-07T00:00:00+02:00
-
- 202007000175
+ 2020_XX07000175
+
+ -
+ 4711
-
290.40
@@ -136,7 +139,10 @@
2020-07-07T00:00:00+02:00
-
- 202007000175
+
+
+ -
+ 4711
-
292.44
diff --git a/reports/sepa/sepa-2.0.9-pl.imixs-report b/reports/sepa/sepa-2.0.9-pl.imixs-report
new file mode 100644
index 0000000..91fe440
--- /dev/null
+++ b/reports/sepa/sepa-2.0.9-pl.imixs-report
@@ -0,0 +1,196 @@
+
- 2024-01-11T14:31:52.923+01:00
- true
- 2024-08-26T12:38:07.329+02:00
- 1
- a36c52d3-25bc-4c43-8c41-e90e2fd47432-1724668687336
- a36c52d3-25bc-4c43-8c41-e90e2fd47432
- 8
- $uniqueid$modelversion$workflowgroup$taskid$workflowsummaryinvoice.numberinvoice.dateinvoice.totalinvoice.currencycdtr.namecdtr.ibancdtr.bicdbtr.namedbtr.ibandbtr.bicpayment.typenumsequencenumber
- UTF-8
- SEPA export executed by the SepaScheduler. See the XSL definition for details.
- sepa
- type:"workitem" AND $taskid:5500
- ReportEntity
- <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<xsl:stylesheet
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ version="2.0">
+ <xsl:strip-space elements="*" />
+ <xsl:output method="xml" indent="yes" encoding="UTF-8" standalone="yes" />
+
+ <xsl:template match="/">
+ <xsl:variable name="now" select="current-dateTime()" />
+
+ <Document
+ xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd">
+ <CstmrCdtTrfInitn>
+
+ <!-- generate header info -->
+ <!-- compute count of invoices -->
+ <xsl:variable name="count"
+ select="count(/data/document[starts-with(normalize-space(item[@name = '$modelversion']/value),'rechnungseingang')]/item[@name='$uniqueid']/value)" />
+ <!-- compute total amount -->
+ <xsl:variable name="totalsum"
+ select="xs:decimal(sum(/data/document[starts-with(normalize-space(item[@name = '$modelversion']/value),'rechnungseingang')]/item[@name='invoice.total']/value))" />
+ <!-- round to 2 digits -->
+ <xsl:variable name="total"
+ select="format-number(xs:decimal(round-half-to-even($totalsum, 2)), '0.00')" />
+
+ <!-- shortcut for the sepa export document -->
+ <xsl:variable name="exportWorkitem"
+ select="/data/document[normalize-space(item[@name = '$workflowgroup']/value) = 'SEPA-Export']" />
+
+ <GrpHdr>
+ <MsgId>
+ <xsl:value-of
+ select="replace($exportWorkitem/item[@name='$uniqueid']/value, '-', '')" />
+ </MsgId>
+ <CreDtTm>
+ <xsl:value-of
+ select="format-dateTime($now, '[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]')" />
+ </CreDtTm>
+ <NbOfTxs>
+ <xsl:value-of select="$count" />
+ </NbOfTxs>
+ <CtrlSum>
+ <!-- round to 2 digits -->
+ <xsl:value-of select="$total" />
+ </CtrlSum>
+ <InitgPty>
+ <Nm>
+ <xsl:value-of
+ select="$exportWorkitem/item[@name='dbtr.name']/value" />
+ </Nm>
+ </InitgPty>
+ </GrpHdr>
+
+ <PmtInf>
+ <PmtInfId>
+ <xsl:value-of
+ select="replace($exportWorkitem/item[@name='$uniqueid']/value, '-', '')" />
+ <xsl:text>-1</xsl:text>
+ </PmtInfId>
+ <PmtMtd>TRF</PmtMtd>
+ <NbOfTxs>
+ <xsl:value-of select="$count" />
+ </NbOfTxs>
+ <CtrlSum>
+ <!-- round to 2 digits -->
+ <xsl:value-of select="$total" />
+ </CtrlSum>
+ <PmtTpInf>
+ <SvcLvl>
+ <Cd>SEPA</Cd>
+ </SvcLvl>
+ </PmtTpInf>
+ <ReqdExctnDt>
+ <xsl:value-of
+ select="format-dateTime($now, '[Y0001]-[M01]-[D01]')" />
+ </ReqdExctnDt>
+ <Dbtr>
+ <Nm>
+ <xsl:value-of
+ select="$exportWorkitem/item[@name='dbtr.name']/value" />
+ </Nm>
+ </Dbtr>
+ <DbtrAcct>
+ <Id>
+ <IBAN>
+ <xsl:value-of
+ select="replace($exportWorkitem/item[@name='dbtr.iban']/value, ' ', '')" />
+ </IBAN>
+ </Id>
+ </DbtrAcct>
+ <DbtrAgt>
+ <FinInstnId>
+ <BIC>
+ <xsl:value-of
+ select="replace($exportWorkitem/item[@name='dbtr.bic']/value, ' ', '')" />
+ </BIC>
+ </FinInstnId>
+ </DbtrAgt>
+ <!--
+ SHAR – Charges are shared between debtor and creditor
+ SLEV – Charges are handled according to service level
+ -->
+ <ChrgBr>SHAR</ChrgBr>
+ <!-- generate CdtTrfTxInf for each invoice -->
+ <xsl:apply-templates
+ select="/data/document[starts-with(normalize-space(item[@name = '$modelversion']/value),'rechnungseingang')]" />
+ </PmtInf>
+ </CstmrCdtTrfInitn>
+ </Document>
+ </xsl:template>
+
+
+ <!-- This template builds sepa header info -->
+ <xsl:template
+ match="/data/document[normalize-space(item[@name = '$workflowgroup']/value) = 'SEPA-Export']">
+ <!-- not in use -->
+ </xsl:template>
+
+
+ <!-- This template builds sepa payment info for each invoice -->
+ <xsl:template
+ match="/data/document[starts-with(normalize-space(item[@name = '$modelversion']/value),'rechnungseingang')]">
+
+ <!-- round to 2 digits - geht nur mit sum funktion -->
+ <xsl:variable
+ name="wert2"
+ select="format-number(xs:decimal(round-half-to-even(item[@name='invoice.total']/value, 2)), '0.00')" />
+
+ <CdtTrfTxInf
+ xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03">
+ <PmtId>
+ <EndToEndId>NOTPROVIDED</EndToEndId>
+ </PmtId>
+ <Amt>
+ <InstdAmt>
+ <xsl:attribute name="Ccy"><xsl:value-of
+ select="item[@name='invoice.currency']/value" /></xsl:attribute>
+ <!-- round to 2 digits -->
+ <xsl:value-of select="$wert2" />
+ </InstdAmt>
+ </Amt>
+ <CdtrAgt>
+ <FinInstnId>
+ <BIC>
+ <xsl:value-of select="replace(item[@name='cdtr.bic']/value, ' ', '')" />
+ </BIC>
+ </FinInstnId>
+ </CdtrAgt>
+ <Cdtr>
+ <!-- MAX70 -->
+ <Nm>
+ <!-- <xsl:value-of select="substring(item[@name='cdtr.name']/value, 1, 70)" /> -->
+ <!-- entfernen der non ascii zeichen
+ <xsl:value-of
+ select="substring(replace(item[@name='cdtr.name']/value, '\P{IsBasicLatin}', ''), 1, 70)" />
+ -->
+
+ <xsl:value-of
+ select="substring(translate(
+ normalize-space(item[@name='cdtr.name']/value),
+ translate(item[@name='cdtr.name']/value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZĄĆĘŁÓŚŹŻŃabcdefghijklmnopqrstuvwxyząćęłóśźżń0123456789 /-?:().,''+''{}.', ''),''), 1, 70)" />
+ </Nm>
+ </Cdtr>
+ <CdtrAcct>
+ <Id>
+ <IBAN>
+ <xsl:value-of select="replace(item[@name='cdtr.iban']/value, ' ', '')" />
+ </IBAN>
+ </Id>
+ </CdtrAcct>
+ <RmtInf>
+ <!-- Max140Text -->
+ <Ustrd>
+ <xsl:choose>
+ <xsl:when test="string-length(item[@name='invoice.number']/value) > 0">
+ <xsl:value-of
+ select="substring(translate(
+ normalize-space(item[@name='invoice.number']/value),
+ translate(item[@name='invoice.number']/value, 'ABCDEFGHIJKLMNOPQRSTUVWXYZĄĆĘŁÓŚŹŻŃabcdefghijklmnopqrstuvwxyząćęłóśźżń0123456789 /-?:().,''+''{}.', ''),''), 1, 140)" />
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- fallback -->
+ <xsl:value-of
+ select="substring(item[@name='sequencenumber']/value, 1, 140)" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </Ustrd>
+ </RmtInf>
+ </CdtTrfTxInf>
+
+ </xsl:template>
+
+</xsl:stylesheet>
- /office-alexander-logistics/reports/sepa/sepa-2.0.5.xsl
\ No newline at end of file
diff --git a/reports/sepa/sepa-2.0.9-pl.xsl b/reports/sepa/sepa-2.0.9-pl.xsl
new file mode 100644
index 0000000..ef23565
--- /dev/null
+++ b/reports/sepa/sepa-2.0.9-pl.xsl
@@ -0,0 +1,196 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -1
+
+ TRF
+
+
+
+
+
+
+
+
+
+ SEPA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SHAR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NOTPROVIDED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file