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 d42d42a..6590495 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
@@ -47,12 +47,14 @@ public class TestSEPATransform {
/**
* XSL Transformation for SEPA file for Bank Polski
*
+ * We also test the two-digits case. 10,5 need to become 10,50
+ *
* @throws IOException
*/
@Test
public void testBankPolski() throws IOException {
String MODEL_PATH_XML = "sepa/beispiel-daten.xml";
- String MODEL_PATH_XSL = "sepa/sepa-2.0.5-pl.xsl";
+ String MODEL_PATH_XSL = "sepa/sepa-2.0.6-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 6ca8e01..33f056c 100644
--- a/reports/sepa/beispiel-daten.xml
+++ b/reports/sepa/beispiel-daten.xml
@@ -1,13 +1,55 @@
-
+
+
-
210
-
- bf073e72-512c-4d60-af77-4427f0872036
+ bf073e72asdf-512c-4d60-af77-40872036
+
+ -
+ sepa-export-de-1.0
+
+ -
+ SEPA-Export
+
+ -
+ SEPA Export (EUR)
+
+ -
+ 3453540000
+
+ -
+ XXXADEMM
+
+ -
+ DE74 5555 0000 0000 0552 73
+
+ -
+ Supplier 2 Eyy XXXXXXXXX
+
+ -
+ AAXADEMM
+
+ -
+ SA11 5555 0000 0000 0552 73
+
+ -
+ Targo Bank
+
+
+
+
+
+
+ -
+ 210
+
+ -
+ bf073e72-512c-4d60-af77-4427f0872031
-
rechnungseingang-3.0
@@ -25,7 +67,8 @@
DE74 5555 0000 0000 0282 73
-
- Supplier 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Eyy XXXXXXXXX
+ Supplier 1
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Eyy XXXXXXXXX
-
@@ -46,12 +89,60 @@
202007000175
-
- 86.87
+ 290.40
-
-
-
+
+
+
+ -
+ 210
+
+ -
+ bf073e72-512c-4d60-af77-4427f0872035
+
+ -
+ rechnungseingang-3.0
+
+ -
+ Rechnungseingang
+
+ -
+ Invoice Example-1
+
+ -
+ XXXADEMM
+
+ -
+ DE74 5555 0000 0000 0282 73
+
+ -
+ Supplier 1
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx Eyy XXXXXXXXX
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+ EUR
+
+ -
+ 2020-07-07T00:00:00+02:00
+
+ -
+ 202007000175
+
+ -
+ 292.44
+
+
+
-
210
@@ -99,65 +190,9 @@
202007000175
-
- 50.00
-
-
-
-
-
-
-
-
-
-
-
-
- -
- SEPA-Export
-
- -
- sepa-export-de-1.0.0
-
- -
- 1000
-
- -
- 1000
-
- -
- a8a5a0fa-48bd-49d4-987d-bda597c66055
-
- -
- OOBADEFFXXX
-
- -
- DE07 500 4 0000 0582 5070 42
-
- -
- Invoice: 6b3aedd7-209c-4b4a-b771-37783257db78
- added.
-
- Invoice: 45229284-20f9-4ff4-8efb-249eb0251ebb
- added.
-
- Invoice: 9cf48434-8c39-438f-b053-14afd7e70032
- added.
-
- Invoice: 78e89726-b7b2-41fe-9964-7f62c3837f01
- added.
-
-
- -
- Muster GmbH
-
- -
- 6b3aedd7-209c-4b4a-b771-37783257db78
- 45229284-20f9-4ff4-8efb-249eb0251ebb
- 9cf48434-8c39-438f-b053-14afd7e70032
- 78e89726-b7b2-41fe-9964-7f62c3837f01
-
- -
- Muster AG
+ 73.06
+
+
\ No newline at end of file
diff --git a/reports/sepa/result_sepa01.xml b/reports/sepa/result_sepa01.xml
index 4e7fb37..e69de29 100644
--- a/reports/sepa/result_sepa01.xml
+++ b/reports/sepa/result_sepa01.xml
@@ -1,91 +0,0 @@
-
-
-
-
- a8a5a0fa48bd49d4987dbda597c66055
- 2024-02-26T11:07:43
- 2
- 136.87
-
- Muster AG
-
-
-
- a8a5a0fa48bd49d4987dbda597c66055-1
- TRF
- 2
- 136.87
-
-
- SEPA
-
-
- 2024-02-26
-
- Muster AG
-
-
-
- DE07500400000582507042
-
-
-
-
- OOBADEFFXXX
-
-
- SLEV
-
-
- NOTPROVIDED
-
-
- 86.87
-
-
-
- XXXADEMM
-
-
-
- Supplier 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E
-
-
-
- DE74555500000000028273
-
-
-
- Invoice Example-1
-
-
-
-
- NOTPROVIDED
-
-
- 50
-
-
-
- XXXADEMM
-
-
-
- Supplier 2 Eyy XXXXXXXXX
-
-
-
- DE74555500000000055273
-
-
-
- 3453540000 / 202007000175
-
-
-
-
-
diff --git a/reports/sepa/result_sepa02.xml b/reports/sepa/result_sepa02.xml
index 3fedf86..15c28c5 100644
--- a/reports/sepa/result_sepa02.xml
+++ b/reports/sepa/result_sepa02.xml
@@ -5,36 +5,36 @@
xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.03 pain.001.001.03.xsd">
- a8a5a0fa48bd49d4987dbda597c66055
- 2024-02-26T11:15:26
- 2
- 136.87
+ bf073e72asdf512c4d60af7740872036
+ 2024-03-04T08:50:19
+ 3
+ 655.90
- Muster AG
+ Targo Bank
- a8a5a0fa48bd49d4987dbda597c66055-1
+ bf073e72asdf512c4d60af7740872036-1
TRF
- 2
- 136.87
+ 3
+ 655.90
SEPA
- 2024-02-26
+ 2024-03-04
- Muster AG
+ Targo Bank
- DE07500400000582507042
+ SA11555500000000055273
- OOBADEFFXXX
+ AAXADEMM
SHAR
@@ -43,7 +43,7 @@
NOTPROVIDED
- 86.87
+ 290.40
@@ -51,7 +51,8 @@
- Supplier 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E
+ Supplier 1
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -67,7 +68,32 @@
NOTPROVIDED
- 50
+ 292.44
+
+
+
+ XXXADEMM
+
+
+
+ Supplier 1
+ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
+
+
+
+ DE74555500000000028273
+
+
+
+ Invoice Example-1
+
+
+
+
+ NOTPROVIDED
+
+
+ 73.06
diff --git a/reports/sepa/sepa-2.0.5.xsl b/reports/sepa/sepa-2.0.5.xsl
index f123311..3d64820 100644
--- a/reports/sepa/sepa-2.0.5.xsl
+++ b/reports/sepa/sepa-2.0.5.xsl
@@ -7,7 +7,7 @@
-
+
@@ -26,7 +26,7 @@
select="xs:decimal(sum(/data/document[starts-with(normalize-space(item[@name = '$modelversion']/value),'rechnungseingang')]/item[@name='invoice.total']/value))" />
+ select="format-number(xs:decimal(round-half-to-even($totalsum, 2)), '0.00')" />
-
+
+
+
@@ -57,14 +59,15 @@
-1
+ select="replace($exportWorkitem/item[@name='$uniqueid']/value, '-', '')" />
+ -1
TRF
-
+
@@ -72,8 +75,10 @@
SEPA
-
+
+
+
-
-
@@ -115,25 +118,24 @@
-
-
-
-
-
+
+
+
NOTPROVIDED
+ select="item[@name='invoice.currency']/value" />
@@ -162,15 +164,18 @@
-
-
- /
-
-
-
-
-
-
+
+
+ /
+
+
+
+
+
+
diff --git a/reports/sepa/sepa-2.0.6-pl.imixs-report b/reports/sepa/sepa-2.0.6-pl.imixs-report
new file mode 100644
index 0000000..77a1cd7
--- /dev/null
+++ b/reports/sepa/sepa-2.0.6-pl.imixs-report
@@ -0,0 +1,187 @@
+- 2024-01-11T14:31:52.923+01:00
- true
- 2024-03-04T08:51:06.719+01:00
- 1
- a36c52d3-25bc-4c43-8c41-e90e2fd47432-1709538666722
- a36c52d3-25bc-4c43-8c41-e90e2fd47432
- 5
- $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)" />
+ </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='numsequencenumber']/value) > 0">
+ <!-- neues format buchungsnummer / rechn.nr -->
+ <xsl:value-of
+ select="item[@name='numsequencenumber']/value" /><xsl:text> / </xsl:text><xsl:value-of
+ select="item[@name='invoice.number']/value" />
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- fallback -->
+ <xsl:value-of
+ select="substring(item[@name='$workflowsummary']/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.6-pl.xsl b/reports/sepa/sepa-2.0.6-pl.xsl
new file mode 100644
index 0000000..cb74114
--- /dev/null
+++ b/reports/sepa/sepa-2.0.6-pl.xsl
@@ -0,0 +1,187 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -1
+
+ TRF
+
+
+
+
+
+
+
+
+
+ SEPA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SHAR
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NOTPROVIDED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/reports/sepa/sepa-2.0.6.imixs-report b/reports/sepa/sepa-2.0.6.imixs-report
new file mode 100644
index 0000000..00f501b
--- /dev/null
+++ b/reports/sepa/sepa-2.0.6.imixs-report
@@ -0,0 +1,185 @@
+- 2024-02-23T11:19:03.589+01:00
- true
- 2024-03-04T08:59:11.721+01:00
- c685dc1b-82f3-4914-8dd8-109d45de9cc0-1709539151729
- c685dc1b-82f3-4914-8dd8-109d45de9cc0
- 2
- $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.003.03"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.003.03 pain.001.003.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>
+ <ChrgBr>SLEV</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.003.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)" />
+ </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='numsequencenumber']/value) > 0">
+ <!-- neues format buchungsnummer / rechn.nr -->
+ <xsl:value-of
+ select="item[@name='numsequencenumber']/value" /><xsl:text> / </xsl:text><xsl:value-of
+ select="item[@name='invoice.number']/value" />
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- fallback -->
+ <xsl:value-of
+ select="substring(item[@name='$workflowsummary']/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.6.xsl b/reports/sepa/sepa-2.0.6.xsl
new file mode 100644
index 0000000..3d64820
--- /dev/null
+++ b/reports/sepa/sepa-2.0.6.xsl
@@ -0,0 +1,185 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -1
+
+ TRF
+
+
+
+
+
+
+
+
+
+ SEPA
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ SLEV
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ NOTPROVIDED
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file