diff --git a/reports/sepa/sepa-2.0.5-pl.imixs-report b/reports/sepa/sepa-2.0.5-pl.imixs-report index 045ce81..ff0fe30 100644 --- a/reports/sepa/sepa-2.0.5-pl.imixs-report +++ b/reports/sepa/sepa-2.0.5-pl.imixs-report @@ -1,188 +1,374 @@ -2024-01-11T14:31:52.923+01:00true2024-02-19T14:07:31.583+01:001a36c52d3-25bc-4c43-8c41-e90e2fd47432-1708348051587a36c52d3-25bc-4c43-8c41-e90e2fd474322$uniqueid$modelversion$workflowgroup$taskid$workflowsummaryinvoice.numberinvoice.dateinvoice.totalinvoice.currencycdtr.namecdtr.ibancdtr.bicdbtr.namedbtr.ibandbtr.bicpayment.typenumsequencenumberUTF-8SEPA export executed by the SepaScheduler. See the XSL definition for details. sepatype:"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 + + + + 2024-01-11T14:31:52.923+01:00 + + + + + + true + + + 2024-02-21T12:40:56.424+01:00 + + + 1 + + + + + + a36c52d3-25bc-4c43-8c41-e90e2fd47432-1708515656428 + + + a36c52d3-25bc-4c43-8c41-e90e2fd47432 + + + 3 + + + + $uniqueid + + + + + + + $modelversion + + + + + + + $workflowgroup + + + + + + + $taskid + + + + + + + $workflowsummary + + + + + + + invoice.number + + + + + + + invoice.date + + + + + + + invoice.total + + + + + + + invoice.currency + + + + + + + cdtr.name + + + + + + + cdtr.iban + + + + + + + cdtr.bic + + + + + + + dbtr.name + + + + + + + dbtr.iban + + + + + + + dbtr.bic + + + + + + + payment.type + + + + + + + numsequencenumber + + + + + + + + + + + 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.07" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.07 pain.001.001.07.xsd"> + xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.07 + pain.001.001.07.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="xs:decimal(round-half-to-even($totalsum, 2))" /> - - <!-- 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> + + <!-- 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="xs:decimal(round-half-to-even($totalsum, 2))" /> + + <!-- 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> + <BICFI> + <xsl:value-of + select="replace($exportWorkitem/item[@name='dbtr.bic']/value, ' ', '')" /> + </BICFI> + </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 + </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="wert1" select="xs:decimal(sum(item[@name='invoice.total']/value))" /> - <xsl:variable name="wert2" + <xsl:variable name="wert2" select="xs:decimal(round-half-to-even($wert1,2))" /> - <CdtTrfTxInf + <CdtTrfTxInf xmlns="urn:iso:std:iso:20022:tech:xsd:pain.001.003.03"> <PmtId> - <EndToEndId>NOTPROVIDED</EndToEndId> + <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> + <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> + <FinInstnId> + <BICFI> + <xsl:value-of select="replace(item[@name='cdtr.bic']/value, ' ', '')" /> + </BICFI> + </FinInstnId> </CdtrAgt> <Cdtr> - <!-- MAX70 --> - <Nm> - <xsl:value-of select="substring(item[@name='cdtr.name']/value, 1, 70)" /> - </Nm> + <!-- 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> + <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> + <!-- 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 + </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.5-pl.old b/reports/sepa/sepa-2.0.5-pl.old new file mode 100644 index 0000000..045ce81 --- /dev/null +++ b/reports/sepa/sepa-2.0.5-pl.old @@ -0,0 +1,188 @@ +2024-01-11T14:31:52.923+01:00true2024-02-19T14:07:31.583+01:001a36c52d3-25bc-4c43-8c41-e90e2fd47432-1708348051587a36c52d3-25bc-4c43-8c41-e90e2fd474322$uniqueid$modelversion$workflowgroup$taskid$workflowsummaryinvoice.numberinvoice.dateinvoice.totalinvoice.currencycdtr.namecdtr.ibancdtr.bicdbtr.namedbtr.ibandbtr.bicpayment.typenumsequencenumberUTF-8SEPA export executed by the SepaScheduler. See the XSL definition for details. sepatype:"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.07" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:pain.001.001.07 pain.001.001.07.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="xs:decimal(round-half-to-even($totalsum, 2))" /> + + <!-- 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="wert1" + select="xs:decimal(sum(item[@name='invoice.total']/value))" /> + <xsl:variable name="wert2" + select="xs:decimal(round-half-to-even($wert1,2))" /> + <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.5-pl.xsl b/reports/sepa/sepa-2.0.5-pl.xsl index 3d1bd17..7e28fd1 100644 --- a/reports/sepa/sepa-2.0.5-pl.xsl +++ b/reports/sepa/sepa-2.0.5-pl.xsl @@ -93,10 +93,10 @@ - + - +