From b50911474df75cc6eaec119eac21a0f580f3fa65 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Thu, 15 Apr 2021 10:52:47 +0200 Subject: [PATCH] update sepa export neue betreff zeile --- reports/sepa/sepa-2.0.4.imixs-report | 1 + reports/sepa/sepa-2.0.4.xsl | 176 +++++++++++++++++++++ reports/sepa/sepa-rechnungseingang.out.xml | 91 +++++++++++ reports/sepa/sepa-rechnungseingang.xml | 163 +++++++++++++++++++ 4 files changed, 431 insertions(+) create mode 100644 reports/sepa/sepa-2.0.4.imixs-report create mode 100644 reports/sepa/sepa-2.0.4.xsl create mode 100644 reports/sepa/sepa-rechnungseingang.out.xml create mode 100644 reports/sepa/sepa-rechnungseingang.xml diff --git a/reports/sepa/sepa-2.0.4.imixs-report b/reports/sepa/sepa-2.0.4.imixs-report new file mode 100644 index 0000000..2ae0982 --- /dev/null +++ b/reports/sepa/sepa-2.0.4.imixs-report @@ -0,0 +1 @@ +$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 <?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="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="$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')]"> <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> <xsl:value-of select="item[@name='invoice.total']/value" /> </InstdAmt> </Amt> <CdtrAgt> <FinInstnId> <BIC> <xsl:value-of select="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.4.xsl \ No newline at end of file diff --git a/reports/sepa/sepa-2.0.4.xsl b/reports/sepa/sepa-2.0.4.xsl new file mode 100644 index 0000000..455fb1b --- /dev/null +++ b/reports/sepa/sepa-2.0.4.xsl @@ -0,0 +1,176 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1 + + TRF + + + + + + + + + + SEPA + + + + + + + + + + + + + + + + + + + + + + + SLEV + + + + + + + + + + + + + + + + + + + + + + + + + NOTPROVIDED + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + / + + + + + + + + + + + + + \ No newline at end of file diff --git a/reports/sepa/sepa-rechnungseingang.out.xml b/reports/sepa/sepa-rechnungseingang.out.xml new file mode 100644 index 0000000..b81c265 --- /dev/null +++ b/reports/sepa/sepa-rechnungseingang.out.xml @@ -0,0 +1,91 @@ + + + + + a8a5a0fa48bd49d4987dbda597c66055 + 2021-04-15T10:50:52 + 2 + 136.87 + + Muster AG + + + + a8a5a0fa48bd49d4987dbda597c66055-1 + TRF + 2 + 136.87 + + + SEPA + + + 2021-04-15 + + Muster AG + + + + DE07500400000582507042 + + + + + OOBADEFFXXX + + + SLEV + + + NOTPROVIDED + + + 86.87 + + + + XXXADEMM + + + + Supplier 1 xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx E + + + + DE74555500000000028273 + + + + Invoice Example-1 + + + + + NOTPROVIDED + + + 50.00 + + + + XXXADEMM + + + + Supplier 2 Eyy XXXXXXXXX + + + + DE74555500000000055273 + + + + 3453540000 / 202007000175 + + + + + diff --git a/reports/sepa/sepa-rechnungseingang.xml b/reports/sepa/sepa-rechnungseingang.xml new file mode 100644 index 0000000..6ca8e01 --- /dev/null +++ b/reports/sepa/sepa-rechnungseingang.xml @@ -0,0 +1,163 @@ + + + + + + 210 + + + bf073e72-512c-4d60-af77-4427f0872036 + + + 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 + + + 86.87 + + + + + + + + 210 + + + bf073e72asdf-512c-4d60-af77-4427f0872036 + + + rechnungseingang-sachrechnung-de-1.0 + + + Sachrechnungseingang + + + Invoice Example-2 + + + 3453540000 + + + XXXADEMM + + + DE74 5555 0000 0000 0552 73 + + + Supplier 2 Eyy XXXXXXXXX + + + + + + + + + + + + EUR + + + 2020-07-07T00:00:00+02:00 + + + 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 + + + \ No newline at end of file