diff --git a/reports/sepa/PL/sepa-2.0.12-pl_bankmillennium.imixs-report b/reports/sepa/PL/sepa-2.0.12-pl_bankmillennium.imixs-report
new file mode 100644
index 0000000..27e2c29
--- /dev/null
+++ b/reports/sepa/PL/sepa-2.0.12-pl_bankmillennium.imixs-report
@@ -0,0 +1,199 @@
+- 2024-01-11T14:31:52.923+01:00
- true
- 2025-08-21T16:26:41.675+02:00
- 1
- 215e5da3-48ec-4947-9bd5-dc78f810eb52-1755786401682
- 215e5da3-48ec-4947-9bd5-dc78f810eb52
- 7
- $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_millennium
- 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>
+ <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>
+ <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
+ -->
+
+ <!-- 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>
+ <PmtTpInf>
+ <InstrPrty>NORM</InstrPrty>
+ </PmtTpInf>
+ <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>
+ <ChrgBr>SHAR</ChrgBr>
+ <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, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 /-?:().,''+''{}.', ''),''), 1, 70)" />
+ </Nm>
+ <PstlAdr>
+ <Ctry>
+ <xsl:choose>
+ <xsl:when test="not(item[@name='invoice.country'])">PL</xsl:when>
+ <xsl:when test="item[@name='invoice.country']/value = ''">PL</xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="item[@name='invoice.country']/value" />
+ </xsl:otherwise>
+ </xsl:choose>
+ </Ctry>
+ </PstlAdr>
+ </Cdtr>
+ <CdtrAcct>
+ <Id>
+ <IBAN>
+ <xsl:value-of select="replace(item[@name='cdtr.iban']/value, ' ', '')" />
+ </IBAN>
+ </Id>
+ </CdtrAcct>
+ <Purp>
+ <Prtry>FRGN</Prtry>
+ </Purp>
+ <RmtInf>
+ <!-- Max140Text -->
+ <Ustrd>
+ <xsl:variable name="sequenceNumber" select="item[@name='sequencenumber']/value" />
+ <xsl:variable name="invoiceNumber" select="item[@name='invoice.number']/value" />
+ <xsl:variable name="combinedInfo">
+ <xsl:value-of select="$sequenceNumber" />
+ <xsl:if
+ test="$sequenceNumber != '' and $invoiceNumber != ''">/</xsl:if>
+ <xsl:value-of
+ select="$invoiceNumber" />
+ </xsl:variable>
+ <xsl:value-of
+ select="substring(translate(
+ normalize-space($combinedInfo),
+ translate($combinedInfo, 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789 /-?:().,''+''{}.', ''),''), 1, 140)" />
+ </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/PL/sepa-2.0.12-pl_bankmillennium.xsl b/reports/sepa/PL/sepa-2.0.12-pl_bankmillennium.xsl
new file mode 100644
index 0000000..91b323e
--- /dev/null
+++ b/reports/sepa/PL/sepa-2.0.12-pl_bankmillennium.xsl
@@ -0,0 +1,199 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -1
+
+ TRF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NOTPROVIDED
+
+
+ NORM
+
+
+
+
+
+
+
+
+ SHAR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ PL
+ PL
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ FRGN
+
+
+
+
+
+
+
+
+ /
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/workflow/pl/sepa-export-manual-pl-3.0.2.bpmn b/workflow/pl/sepa-export-manual-pl-3.0.2.bpmn
index 1ec323e..943bb2d 100644
--- a/workflow/pl/sepa-export-manual-pl-3.0.2.bpmn
+++ b/workflow/pl/sepa-export-manual-pl-3.0.2.bpmn
@@ -54,7 +54,7 @@
-
+
The linked invoice workitem will be added to thhe $workitemref
@@ -64,7 +64,7 @@
-
+
IntermediateCatchEvent_6
@@ -579,7 +579,7 @@ result.isValid=true;
-
+
@@ -608,6 +608,9 @@ result.isValid=true;
SEPA-Body]]>
+
+
+
SequenceFlow_1
@@ -688,7 +691,7 @@ result.isValid=true;
false
-
+
+
+
+
SequenceFlow_11
@@ -928,7 +934,7 @@ result.isValid=true;
-
+
@@ -1066,7 +1072,7 @@ result.isValid=true;
-
+