diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
index de5d12e..687cf92 100644
--- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
+++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/InvoicePlugin.java
@@ -15,13 +15,16 @@ import org.imixs.workflow.exceptions.PluginException;
*
* Konkret geht es darum, das im Status 5200 in den ChildItems keine leeren
* Zeilen vorkommen dürfen.
+ *
+ * Im Status 5000 muss immer der payment.type ausgewählt werden. Dies wird vom Plugin explizit geprüft
*
* @author rsoika
* @version 1.0
*
*/
public class InvoicePlugin extends AbstractPlugin {
-
+
+ public static final int TASK_ERFASSUNG = 5000;
public static final int TASK_SACHPRUEFUNG = 5200;
public static final int EVENT_FREIGEBEN = 20;
@@ -43,6 +46,16 @@ public class InvoicePlugin extends AbstractPlugin {
@Override
public ItemCollection run(ItemCollection workitem, ItemCollection documentActivity) throws PluginException {
+ // Payment.type muss immer eingetragne werden!
+ if (workitem.getTaskID() >=TASK_ERFASSUNG) {
+ if (workitem.getItemValueString("payment.type").trim().isEmpty()) {
+ // throw a plugin exception!
+ throw new PluginException(InvoicePlugin.class.getName(), ERROR_MISSING_DATA,
+ "Eingabefehler - Bitte wählen Sie eine Zahlungsart aus!");
+ }
+ }
+
+
// die prüfung der positionsnummern und Category erfolgt nur im Status
// Sachprüfung (5200) und nur beim Freigeben (20)!
if (workitem.getTaskID() == TASK_SACHPRUEFUNG && workitem.getEventID() == EVENT_FREIGEBEN) {
diff --git a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_exchange_rate.xhtml b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_exchange_rate.xhtml
index 862f01b..9814644 100644
--- a/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_exchange_rate.xhtml
+++ b/office-alexander-logistics-app/src/main/webapp/pages/workitems/forms/alexander/sub_exchange_rate.xhtml
@@ -14,7 +14,7 @@
-
+
diff --git a/reports/rechnungen-offen-nosepa.imixs-report b/reports/rechnungen-offen-nosepa.imixs-report
new file mode 100644
index 0000000..412efd5
--- /dev/null
+++ b/reports/rechnungen-offen-nosepa.imixs-report
@@ -0,0 +1,2 @@
+- $created<format locale="DE">dd.MM.yyyy hh:mm</format>$modified<format locale="DE">dd.MM.yyyy hh:mm</format>invoice.numberinvoice.date<format locale="DE">dd.MM.yyyy</format>invoice.totalinvoice.currencypayment.type$uniqueid$workflowgroup$taskid$workflowsummarycdtr.namecdtr.ibancdtr.bic
- UTF-8
- SEPA export executed by the SepaScheduler. See the XSL definition for details.
- Offene Rechnungen-no sepa-bugfix
- type:"workitem" AND $taskid:[5001 TO 5990]
+AND $created:[20210308T11:00:00 TO 20210309T13:00:00]
- <?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[normalize-space(item[@name = '$workflowgroup']/value) = 'Rechnungseingang']/item[@name='$uniqueid']/value)" /> <!-- compute total amount --> <xsl:variable name="totalsum" select="xs:decimal(sum(/data/document[normalize-space(item[@name = '$workflowgroup']/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[normalize-space(item[@name = '$workflowgroup']/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[normalize-space(item[@name = '$workflowgroup']/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> <Nm> <xsl:value-of select="item[@name='cdtr.name']/value" /> </Nm> </Cdtr> <CdtrAcct> <Id> <IBAN> <xsl:value-of select="replace(item[@name='cdtr.iban']/value, ' ', '')" /> </IBAN> </Id> </CdtrAcct> <RmtInf> <Ustrd> <xsl:value-of select="item[@name='$workflowsummary']/value" /> </Ustrd> </RmtInf> </CdtTrfTxInf> </xsl:template></xsl:stylesheet>
\ No newline at end of file
diff --git a/reports/rechnungen-offen.imixs-report b/reports/rechnungen-offen.imixs-report
new file mode 100644
index 0000000..61b50ec
--- /dev/null
+++ b/reports/rechnungen-offen.imixs-report
@@ -0,0 +1 @@
+- $created<format locale="DE">dd.MM.yyyy hh:mm</format>$modified<format locale="DE">dd.MM.yyyy hh:mm</format>invoice.numberinvoice.date<format locale="DE">dd.MM.yyyy</format>invoice.totalinvoice.currencypayment.type$uniqueid$workflowgroup$taskid$workflowsummarycdtr.namecdtr.ibancdtr.bic
- UTF-8
- SEPA export executed by the SepaScheduler. See the XSL definition for details.
- Offene Rechnungen
- type:"workitem" AND $taskid:[5001 TO 5400]
- <?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[normalize-space(item[@name = '$workflowgroup']/value) = 'Rechnungseingang']/item[@name='$uniqueid']/value)" /> <!-- compute total amount --> <xsl:variable name="totalsum" select="xs:decimal(sum(/data/document[normalize-space(item[@name = '$workflowgroup']/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[normalize-space(item[@name = '$workflowgroup']/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[normalize-space(item[@name = '$workflowgroup']/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> <Nm> <xsl:value-of select="item[@name='cdtr.name']/value" /> </Nm> </Cdtr> <CdtrAcct> <Id> <IBAN> <xsl:value-of select="replace(item[@name='cdtr.iban']/value, ' ', '')" /> </IBAN> </Id> </CdtrAcct> <RmtInf> <Ustrd> <xsl:value-of select="item[@name='$workflowsummary']/value" /> </Ustrd> </RmtInf> </CdtTrfTxInf> </xsl:template></xsl:stylesheet>
\ No newline at end of file
diff --git a/workflow/posteingang-de-1.0.0.bpmn b/workflow/deprecated/posteingang-de-1.0.0.bpmn
similarity index 100%
rename from workflow/posteingang-de-1.0.0.bpmn
rename to workflow/deprecated/posteingang-de-1.0.0.bpmn
diff --git a/workflow/posteingang-de-1.0.1.bpmn b/workflow/deprecated/posteingang-de-1.0.1.bpmn
similarity index 100%
rename from workflow/posteingang-de-1.0.1.bpmn
rename to workflow/deprecated/posteingang-de-1.0.1.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.1.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.1.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.1.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.1.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.2.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.2.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.2.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.2.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.3.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.3.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.3.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.3.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.4.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.4.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.4.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.4.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.5.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.5.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.5.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.5.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.6.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.6.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.6.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.6.bpmn
diff --git a/workflow/rechnungseingang-de-1.0.7.bpmn b/workflow/deprecated/rechnungseingang-de-1.0.7.bpmn
similarity index 100%
rename from workflow/rechnungseingang-de-1.0.7.bpmn
rename to workflow/deprecated/rechnungseingang-de-1.0.7.bpmn