-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #148
- Loading branch information
Showing
3 changed files
with
1,266 additions
and
48 deletions.
There are no files selected for viewing
109 changes: 61 additions & 48 deletions
109
imixs-adapters-sepa/src/main/webapp/sepa_export_manual.xhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,86 +1,99 @@ | ||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" | ||
xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:f="http://java.sun.com/jsf/core" | ||
xmlns:c="http://java.sun.com/jsp/jstl/core" | ||
xmlns:h="http://java.sun.com/jsf/html" | ||
xmlns:i="http://java.sun.com/jsf/composite/imixs" | ||
<ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" | ||
xmlns:f="http://java.sun.com/jsf/core" xmlns:c="http://java.sun.com/jsp/jstl/core" | ||
xmlns:h="http://java.sun.com/jsf/html" xmlns:i="http://java.sun.com/jsf/composite/imixs" | ||
xmlns:marty="http://java.sun.com/jsf/composite/marty"> | ||
|
||
|
||
|
||
<div class="imixs-form-section-2"> | ||
<dl> | ||
<dt>IBAN</dt> | ||
<dd> | ||
<h:outputText value="#{workitem.item['dbtr.iban']}" /> | ||
</dd> | ||
</dl> | ||
|
||
<h3>#{workitem.item['name']}</h3> | ||
|
||
<dl> | ||
<dt>BIC</dt> | ||
<dd> | ||
<h:outputText value="#{workitem.item['dbtr.bic']}" /> | ||
</dd> | ||
<ui:fragment rendered="#{! empty workitem.item['cdtr.iban']}"> | ||
<dl> | ||
<dt>Cdtr IBAN</dt> | ||
<dd> | ||
<h:outputText value="#{workitem.item['cdtr.iban']}" /> | ||
</dd> | ||
</dl> | ||
<dl> | ||
<dt>Cdtr BIC</dt> | ||
<dd> | ||
<h:outputText value="#{workitem.item['cdtr.bic']}" /> | ||
</dd> | ||
</dl> | ||
</ui:fragment> | ||
<ui:fragment rendered="#{! empty workitem.item['dbtr.iban']}"> | ||
<dl> | ||
<dt>Dbtr IBAN</dt> | ||
<dd> | ||
<h:outputText value="#{workitem.item['dbtr.iban']}" /> | ||
</dd> | ||
</dl> | ||
<dl> | ||
<dt>Dbtr BIC</dt> | ||
<dd> | ||
<h:outputText value="#{workitem.item['dbtr.bic']}" /> | ||
</dd> | ||
|
||
</dl> | ||
</dl> | ||
</ui:fragment> | ||
</div> | ||
|
||
|
||
|
||
<div class="imixs-form-section"> | ||
<h3>Invoices</h3> | ||
<table class=""> | ||
<h3>Zahlungen</h3> | ||
<table class="" style="width:100%;"> | ||
<tr> | ||
<th style="">#{custom.creditor_name}</th> | ||
<th style="">#{custom.invoicenumber}</th> | ||
<th style="">#{custom.invoicedate}</th> | ||
<th style="">#{custom.amount}</th> | ||
<th style=""></th> | ||
<th style="">IBAN</th> | ||
<th style="">BIC</th> | ||
<th style="">Betrag EUR</th> | ||
<th style=""></th> | ||
</tr> | ||
<c:forEach items="#{workitem.itemList['$workitemref']}" var="id"> | ||
|
||
<!-- load inovice data by documentController: #{documentController.load(id)} --> | ||
<ui:param name="invoice" value="#{documentController.getDocument()}"></ui:param> | ||
|
||
<tr> | ||
<td><h:link outcome="/pages/workitems/workitem"> | ||
#{invoice.item['_kreditor']} | ||
<f:param name="id" value="#{invoice.item['$uniqueid']}" /> | ||
</h:link> | ||
<td> | ||
<h:link outcome="/pages/workitems/workitem"> | ||
#{invoice.item['$workflowsummary']} | ||
<f:param name="id" value="#{invoice.item['$uniqueid']}" /> | ||
</h:link> | ||
</td> | ||
|
||
|
||
<td>#{invoice.item['_invoicenumber']}</td> | ||
<td><h:outputText value="#{invoice.item['_invoicedate']}"> | ||
<f:convertDateTime pattern="#{message.datePatternShort}" | ||
timeZone="#{message.timeZone}" /> | ||
</h:outputText></td> | ||
<td style="text-align: right;"><h:outputText | ||
value="#{invoice.item['_amount_brutto']}"> | ||
|
||
<td>#{invoice.item['dbtr.iban']}</td> | ||
<td>#{invoice.item['dbtr.bic']}</td> | ||
|
||
|
||
<td style="text-align: right;"> | ||
<h:outputText value="#{invoice.item['invoice.total']}"> | ||
<f:convertNumber minFractionDigits="2" locale="de" /> | ||
</h:outputText></td> | ||
</h:outputText> | ||
</td> | ||
|
||
<td>#{invoice.item['_currency']}</td> | ||
<td>#{invoice.item ['cdtr.iban']}</td> | ||
<td>#{invoice.item['cdtr.bic']}</td> | ||
</tr> | ||
</c:forEach> | ||
|
||
<tr style="border-top: 1px solid #ccc;"> | ||
<td /> | ||
<td /> | ||
<td><strong>Summary</strong></td> | ||
<td style="text-align: right;"><strong><h:outputText | ||
value="#{sepaController.calculateSum(workitem.itemList['$workitemref'], '_amount_brutto')}"> | ||
<td style="text-align: right;"><strong> | ||
<h:outputText | ||
value="#{sepaController.calculateSum(workitem.itemList['$workitemref'], 'invoice.total')}"> | ||
<f:convertNumber minFractionDigits="2" locale="de" /> | ||
</h:outputText></strong></td> | ||
<td><strong>#{invoice.item['_currency']}</strong></td> | ||
</h:outputText> | ||
</strong></td> | ||
|
||
<td /> | ||
<td /> | ||
</tr> | ||
</table> | ||
</div> | ||
|
||
|
||
</ui:composition> | ||
|
||
</ui:composition> |
210 changes: 210 additions & 0 deletions
210
imixs-adapters-sepa/src/reports/sepa-2.0.4.imixs-report
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,210 @@ | ||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
<document xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<item name="attributes"> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">$uniqueid</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">$modelversion</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">$workflowgroup</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">$taskid</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">$workflowsummary</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">invoice.number</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">invoice.date</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">invoice.total</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">invoice.currency</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">cdtr.name</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">cdtr.iban</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">cdtr.bic</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">dbtr.name</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">dbtr.iban</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">dbtr.bic</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
<value xsi:type="xmlItem"> | ||
<value xsi:type="xs:string">payment.type</value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
<value xsi:type="xs:string"></value> | ||
</value> | ||
</item> | ||
<item name="contenttype"> | ||
<value xsi:type="xs:string"></value> | ||
</item> | ||
<item name="encoding"> | ||
<value xsi:type="xs:string">UTF-8</value> | ||
</item> | ||
<item name="txtdescription"> | ||
<value xsi:type="xs:string">SEPA export executed by the SepaScheduler. See the XSL | ||
definition for details. </value> | ||
</item> | ||
<item name="txtname"> | ||
<value xsi:type="xs:string">sepa</value> | ||
</item> | ||
<item name="type"> | ||
<value xsi:type="xs:string">ReportEntity</value> | ||
</item> | ||
<item name="txtquery"> | ||
<value xsi:type="xs:string">type:"workitem" AND $taskid:5800 </value> | ||
</item> | ||
<item name="xsl"> | ||
<value xsi:type="xs:string"><?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="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')]"> <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="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:value-of select="substring(item[@name='$workflowsummary']/value, 1, 140)" /> | ||
</Ustrd> </RmtInf> </CdtTrfTxInf> | ||
</xsl:template></xsl:stylesheet></value> | ||
</item> | ||
<item name="xslresource"> | ||
<value xsi:type="xs:string">/imixs-adapters-sepa/src/reports/sepa-2.0.3.xsl</value> | ||
</item> | ||
</document> |
Oops, something went wrong.