neuer Sepa Workflow (manual)

This commit is contained in:
Ralph Soika 2024-01-11 14:03:17 +01:00
parent f9bb7c69dc
commit 510493e849
5 changed files with 143 additions and 48 deletions

View file

@ -26,6 +26,13 @@ pos.type=Leistungsart
pos.net=Netto
pos.gross=Brutto
creditor_name=Kreditor
invoicenumber=Rechnungsnummer
invoicedate=Rechnungsdatum
amount=Betrag
ERROR_CDTR_INVALID=Die Kreditorennummer ist nicht gültig
ERROR_BOOKING_PERIOD=Eingabefehler - Bitte geben Sie eine gültige Buchungsperiode ein! Prüfen Sie auch die Spalte BP in der Positionstabelle.
ERROR_MAIN_BOOKING_PERIOD=Eingabefehler - Bitte überprüfen Sie die Hauptbuchungsperiode mit den Buchungsperioden der einzelnen Positionen.

View file

@ -26,6 +26,11 @@ pos.type=Type
pos.net=Net
pos.gross=Gross
creditor_name=Creditor
invoicenumber=Invoice No.
invoicedate=Invoice Date
amount=Amount
ERROR_CDTR_INVALID=The creditor number is not valid
ERROR_BOOKING_PERIOD=Input error - Please enter a valid booking period! Also check the BP column in the position table.
ERROR_MAIN_BOOKING_PERIOD=Input errors - Please check the main booking period with the booking periods of each item.

View file

@ -0,0 +1,87 @@
<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>
<dl>
<dt>BIC</dt>
<dd>
<h:outputText value="#{workitem.item['dbtr.bic']}" />
</dd>
</dl>
</div>
<div class="imixs-form-section">
<h3>Invoices</h3>
<table class="">
<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>
</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['cdtr.name.cargosoft']}
<f:param name="id" value="#{invoice.item['$uniqueid']}" />
</h:link>
</td>
<td>#{invoice.item['invoice.number']}</td>
<td>
<h:outputText value="#{invoice.item['invoice.date']}">
<f:convertDateTime pattern="#{message.datePatternShort}" timeZone="#{message.timeZone}" />
</h:outputText>
</td>
<td style="text-align: right;">
<h:outputText value="#{invoice.item['invoice.total']}">
<f:convertNumber minFractionDigits="2" locale="de" />
</h:outputText>
</td>
<td>#{invoice.item['invoice.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')}">
<f:convertNumber minFractionDigits="2" locale="de" />
</h:outputText>
</strong></td>
<td><strong>#{invoice.item['_currency']}</strong></td>
<td />
<td />
</tr>
</table>
</div>
</ui:composition>

View file

@ -1,5 +1,7 @@
package com.alexanderlogistics;
import static org.junit.Assert.fail;
import java.text.DateFormat;
import java.text.DecimalFormat;
import java.text.ParseException;
@ -43,33 +45,34 @@ public class TestFormat {
total = 0.5;
logger.info(decimalFormat.format(total));
}
/*
* 52329,42;"H";"EUR";0,000000;0,00;"";"8017";"14174";"";"0702";"191674";"";"";"R EX-GCA-2212-004";0;"";"";"";0;"";"";"";"Faelligkeit";"20230408";"";"";"";"";"";"";"Zahlungsbedingung";"08";"";"";"";"";"90";"";"";"DE815871706";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"SO";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";0;"01012023";""
* 52329,42;"H";"EUR";0,000000;0,00;"";"8017";"14174";"";"0702";"191674";"";
* "";"R EX-GCA-2212-004";0;"";"";"";0;"";"";"";"Faelligkeit";"20230408";"";"";
* "";"";"";"";"Zahlungsbedingung";"08";"";"";"";"";"90";"";"";"DE815871706";"";
* "";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";""
* ;"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";
* "";"";"";"SO";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";"";0;"01012023"
* ;""
*
*/
@Test
public void testDatum() {
SimpleDateFormat dateFormatter = new SimpleDateFormat("yyyyMMdd");
String testDate="20230408";
String testDate = "20230408";
try {
Date dateResult=dateFormatter.parse(testDate);
System.out.println("Result1 Date="+dateResult);
testDate=DatevImportAdapter.csvVal("20230408");
System.out.println("Result2 Date="+dateResult);
Date dateResult = dateFormatter.parse(testDate);
System.out.println("Result1 Date=" + dateResult);
testDate = DatevImportAdapter.csvVal("20230408");
System.out.println("Result2 Date=" + dateResult);
} catch (ParseException e) {
// TODO Auto-generated catch block
e.printStackTrace();
Assert.fail();
}
}
@Test
@ -81,54 +84,50 @@ public class TestFormat {
kurs = 0;
logger.info(rateFormat.format(kurs));
}
@Test
public void testRegex() {
String text="RG-EX-SAL-2211-036";
String expr="\\bEX-SAL";
String text = "RG-EX-SAL-2211-036";
String expr = "\\bEX-SAL";
Pattern p = Pattern.compile(expr);
p = Pattern.compile(expr);
Matcher m = p.matcher(text);
if (m.find()) {
System.out.println("Ich bin ein Held");
if (!m.find()) {
fail();
}
}
@Test
public void testRegex2() {
String text="R IM-GCA-2210-031";
String expr="\\bIM-GCA";
String text = "R IM-GCA-2210-031";
String expr = "\\bIM-GCA";
Pattern p = Pattern.compile(expr);
p = Pattern.compile(expr);
Matcher m = p.matcher(text);
if (m.find()) {
System.out.println("Ich bin ein Held");
} else {
System.out.println("Ich bin Kein Held");
if (!m.find()) {
fail();
}
}
@Test
public void testSMTPMailAddress() {
Assert.assertTrue(InvoiceUtil.validateEmail("info@imixs.com"));
Assert.assertFalse(InvoiceUtil.validateEmail("in fo@imixs.com"));
Assert.assertFalse(InvoiceUtil.validateEmail("SM PSP Queries <PSP.Queries@dssmith.com>"));
Assert.assertTrue(InvoiceUtil.validateEmail("PSP.Queries@dssmith.com"));
Assert.assertTrue(InvoiceUtil.validateEmail("accounts-sg@swiftmarine.global"));
Assert.assertTrue(InvoiceUtil.validateEmail("info@imixs.com"));
Assert.assertFalse(InvoiceUtil.validateEmail("in fo@imixs.com"));
Assert.assertFalse(InvoiceUtil.validateEmail("SM PSP Queries <PSP.Queries@dssmith.com>"));
Assert.assertTrue(InvoiceUtil.validateEmail("PSP.Queries@dssmith.com"));
Assert.assertTrue(InvoiceUtil.validateEmail("accounts-sg@swiftmarine.global"));
}
}

View file

@ -172,7 +172,7 @@
<bpmn2:task id="Task_7" imixs:processid="1000" name="Payment Run Open">
<bpmn2:extensionElements>
<imixs:item name="txtworkflowsummary" type="xs:string">
<imixs:value><![CDATA[SEPA-Lauf <itemvalue format="EEEE, d. MMMM yyyy" locale="de_DE">$created</itemvalue> (<itemvalue>dbtr.name</itemvalue>)]]></imixs:value>
<imixs:value><![CDATA[SEPA <itemvalue format="dd.MM.yyyy" locale="de_DE">$created</itemvalue> (<itemvalue>dbtr.name</itemvalue>)]]></imixs:value>
</imixs:item>
<imixs:item name="keyupdateacl" type="xs:boolean">
<imixs:value>true</imixs:value>
@ -193,7 +193,7 @@
<imixs:item name="txttype" type="xs:string">
<imixs:value><![CDATA[workitem]]></imixs:value>
</imixs:item>
<imixs:item name="txtworkflowabstract" type="CDATA">
<imixs:item name="txtworkflowabstract" type="xs:string">
<imixs:value><![CDATA[<strong>SEPA-Lauf</strong></br>
<strong>Corporate: </strong><itemvalue>dbtr.name</itemvalue></br>
<strong>Erstellt am: </strong><itemvalue format="EEE, MMM d, yyyy" locale="de_DE">$created</itemvalue></br>
@ -756,9 +756,6 @@ The SEPA Export process runs on a scheduled basis (e.g. once a day)</bpmn2:text>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="Task_7" id="BPMNShape_Task_7">
<dc:Bounds height="50.0" width="110.0" x="560.0" y="349.0"/>
<bpmndi:BPMNLabel id="BPMNLabel_33" labelStyle="BPMNLabelStyle_1">
<dc:Bounds height="14.0" width="103.0" x="563.0" y="367.0"/>
</bpmndi:BPMNLabel>
</bpmndi:BPMNShape>
<bpmndi:BPMNShape bpmnElement="EndEvent_3" id="BPMNShape_EndEvent_2">
<dc:Bounds height="36.0" width="36.0" x="1410.0" y="356.0"/>