From d0dc2167ff50a607e27693af92fb062299e4ada7 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Wed, 5 Jun 2024 09:19:18 +0200 Subject: [PATCH] =?UTF-8?q?verbesserter=20XML=20import=20-=20skip=20r?= =?UTF-8?q?=C3=BCckstellungen?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- RELEASENOTES.md | 2 +- ...argosoftXMLInvoiceImportImportService.java | 22 +- workflow/rechnungsausgang-de-1.0.7.bpmn | 4063 +++++++++++++++++ 3 files changed, 4085 insertions(+), 2 deletions(-) create mode 100644 workflow/rechnungsausgang-de-1.0.7.bpmn diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 671e411..2f97af6 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -4,7 +4,7 @@ ### 1.2.19 (Development) - Neue XML Invoice Schnittstelle - - Mahnwesen englisch (noch nicht begonnen!) + - Mahnwesen englisch ### 1.2.18 diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportImportService.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportImportService.java index 4f734ae..3c6433e 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportImportService.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/xml/CargosoftXMLInvoiceImportImportService.java @@ -114,6 +114,7 @@ public class CargosoftXMLInvoiceImportImportService { private static Logger logger = Logger.getLogger(CargosoftXMLInvoiceImportImportService.class.getName()); public static final String OPTION_MANDANT_ID = "mandant.id"; public static final String DATE_FORMAT = "yyyy-MM-dd'T'HH:mm:ss"; + public static final String REGEX_IMPORTTEXTPATTERN = "^R[1-8] .*$"; @EJB WorkflowService workflowService; @@ -443,11 +444,17 @@ public class CargosoftXMLInvoiceImportImportService { } // Row Positions lesen - // InvoiceRows/InvoiceRow readXMLRows(doc, workitem); + // Jetzt noch das Space mapping mahnlaufService.mapInvoiceTextToSpace(workitem, spacePosMappings); + // Rückstellungen ignorieren + if (isRueckStellung(workitem)) { + // Ignore invoice! + return null; + } + // Finally we attache the pdf file and the XML conent to the workitem. attacheFiles(doc, workitem); @@ -458,6 +465,19 @@ public class CargosoftXMLInvoiceImportImportService { return workitem; } + /** + * Prüft ob die Rechnung eine Rückstellung ist also mit R1 bis R8 beginnt + * + * ^R[1-8] . + * + * @param workitem + * @return + */ + private boolean isRueckStellung(ItemCollection workitem) { + String text = workitem.getItemValueString("invoice.text"); + return text.matches(REGEX_IMPORTTEXTPATTERN); + } + /** * Reads a tag value from the xml tree and set the value into the given * workitem. diff --git a/workflow/rechnungsausgang-de-1.0.7.bpmn b/workflow/rechnungsausgang-de-1.0.7.bpmn new file mode 100644 index 0000000..ff60fbb --- /dev/null +++ b/workflow/rechnungsausgang-de-1.0.7.bpmn @@ -0,0 +1,4063 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<itemvalue>$workflowstatus</itemvalue> + +]]> + + + In case you have already made the payment, please disregard this notice. If you require any information regarding your account, please do not hesitate to contact us.

+

Thank you for your cooperation.

+

 

+

Kind regards
Alexander Global Logistics GmbH

+ +]]>
+
+ + + + + + + + + + + + + Task_2 + ExclusiveGateway_1 + StartEvent_1 + IntermediateCatchEvent_6 + EventBasedGateway_1 + IntermediateCatchEvent_13 + IntermediateThrowEvent_11 + IntermediateThrowEvent_8 + IntermediateCatchEvent_1 + IntermediateCatchEvent_5000-20 + Task_8 + Task_6 + Task_5 + IntermediateCatchEvent_23 + IntermediateCatchEvent_27 + EndEvent_1 + EndEvent_3 + EndEvent_2 + IntermediateCatchEvent_3 + ExclusiveGateway_5 + IntermediateCatchEvent_18 + IntermediateCatchEvent_17 + IntermediateCatchEvent_2 + IntermediateCatchEvent_5 + + task_dzaodw + event_Ti0jRg + event_BwVRZg + textAnnotation_cgK8ew + + + IntermediateCatchEvent_22 + Task_7 + Task_1 + IntermediateThrowEvent_12 + Task_3 + IntermediateCatchEvent_4 + EventBasedGateway_3 + EventBasedGateway_4 + IntermediateThrowEvent_1 + IntermediateCatchEvent_29 + IntermediateCatchEvent_9 + IntermediateCatchEvent_21 + Task_4 + IntermediateCatchEvent_14 + ExclusiveGateway_3 + IntermediateThrowEvent_6 + IntermediateCatchEvent_20 + IntermediateCatchEvent_10 + ExclusiveGateway_4 + IntermediateCatchEvent_15 + IntermediateCatchEvent_19 + IntermediateCatchEvent_8 + IntermediateCatchEvent_25 + EventBasedGateway_5 + IntermediateCatchEvent_5005-10 + IntermediateCatchEvent_28 + IntermediateThrowEvent_10 + IntermediateCatchEvent_11 + IntermediateCatchEvent_24 + IntermediateCatchEvent_26 + IntermediateThrowEvent_9 + Task_5005 + IntermediateThrowEvent_7 + IntermediateThrowEvent_4 + IntermediateThrowEvent_5 + IntermediateCatchEvent_16 + + task_Y7VnSQ + event_hICMqQ + task_t0lAhQ + event_OzrjzA + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + SequenceFlow_22 + SequenceFlow_27 + + + + SequenceFlow_0 + SequenceFlow_21 + SequenceFlow_20 + SequenceFlow_33 + + + + + + + SequenceFlow_0 + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_38 + SequenceFlow_36 + SequenceFlow_24 + sequenceFlow_IKuaHQ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_38 + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_33 + SequenceFlow_14 + SequenceFlow_15 + SequenceFlow_39 + SequenceFlow_37 + SequenceFlow_22 + sequenceFlow_btGV1A + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + SequenceFlow_20 + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_52 + SequenceFlow_11 + SequenceFlow_47 + + + SequenceFlow_47 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Mahnwesen]]> + + + + + + + + + + + + false + + + + SequenceFlow_21 + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_27 + SequenceFlow_4 + SequenceFlow_18 + SequenceFlow_35 + SequenceFlow_34 + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_59 + SequenceFlow_31 + SequenceFlow_1 + SequenceFlow_44 + SequenceFlow_69 + + + SequenceFlow_61 + + + + SequenceFlow_39 + SequenceFlow_17 + SequenceFlow_65 + SequenceFlow_13 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_52 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_59 + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_3 + SequenceFlow_29 + SequenceFlow_68 + sequenceFlow_1KoKlw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mahnlauf-de-1.0 +1000 +100 +/pages/workitems/workitem.jsf?id=dunning.ref +]]> + + + + + + + + + + + + false + + + + + + + + + + + + SequenceFlow_4 + + + DataOutput_1 + + + DataOutput_1 + + + + + SequenceFlow_18 + SequenceFlow_25 + SequenceFlow_64 + SequenceFlow_9 + + sequenceFlow_oglT1w + + + + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 +2. Dunning +]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_67 + SequenceFlow_29 + + + + + + + + + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 +Last Dunning]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_30 + SequenceFlow_31 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_42 + SequenceFlow_8 + + + + + + + + + + SequenceFlow_42 + + + + + SequenceFlow_50 + + + + + + + + SequenceFlow_7 + + + + + + + + SequenceFlow_8 + SequenceFlow_10 + SequenceFlow_12 + + + + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_10 + SequenceFlow_11 + + + + (parseFloat(workitem['invoice.saldo'][0]) == parseFloat('0.0')) + + + + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_12 + SequenceFlow_14 + + + + + + + + + + SequenceFlow_16 + + + + + + + + SequenceFlow_17 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + SequenceFlow_34 + SequenceFlow_15 + + + + + + SequenceFlow_25 + + + + + + + + + + + + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 7 +1. Dunning + +]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_35 + SequenceFlow_37 + SequenceFlow_36 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mahnlauf-de-1.0 +1000 +100 +/pages/workitems/workitem.jsf?id=dunning.ref +]]> + + + + + + + + + + + + false + + + + + + + + + + + + SequenceFlow_41 + + + DataOutput_3 + + + DataOutput_3 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + mahnlauf-de-1.0 +1000 +100 +/pages/workitems/workitem.jsf?id=dunning.ref +]]> + + + + + + + + + + + + false + + + + + + + + + + + + + + DataOutput_4 + + + DataOutput_4 + + + sequenceFlow_ZD07Xw + + + + + + + + cdtr.name invoice.number]]> + + + + + + + + + cdtr.name +Rechnungsnummer: invoice.number +Betrag: invoice.total invoice.currency + + +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5]]> + + + + + + + + + + + + false + + + + + + + + SequenceFlow_1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sequenceFlow_IKuaHQ + sequenceFlow_U0JMVg + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home +]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + sequenceFlow_1KoKlw + sequenceFlow_KaO3rw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home + + invoice.reminder + @daily +]]> + + + + + + + + + + + + true + + + + + + + + + + + + + + + + + + + SequenceFlow_44 + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_49 + SequenceFlow_53 + SequenceFlow_57 + SequenceFlow_54 + + + + + Wollen Sie den Vorgang wirklich an Inkasso leiten? +/pages/workitems/workitem.jsf?id=debtcollection.ref]]> + + + + + + + + + SequenceFlow_40 + SequenceFlow_49 + + + DataOutput_5 + + + DataOutput_5 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_53 + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_60 + SequenceFlow_61 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_54 + SequenceFlow_55 + + + + SequenceFlow_55 + SequenceFlow_56 + SequenceFlow_58 + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_58 + SequenceFlow_60 + + + + + + invoice.saldo]]> + + + + + + SequenceFlow_56 + SequenceFlow_57 + + + + + + + + + + + + + + + + (parseFloat(workitem['invoice.saldo'][0]) == parseFloat('0.0')) + + + + + + + + + + SequenceFlow_40 + + + + + + + + SequenceFlow_62 + + + + + + + + SequenceFlow_63 + + + + + + + + SequenceFlow_64 + + + + + + + + SequenceFlow_65 + + + + + + + + SequenceFlow_24 + SequenceFlow_50 + SequenceFlow_63 + SequenceFlow_67 + + sequenceFlow_Z2zL5g + + + + + + SequenceFlow_68 + SequenceFlow_30 + SequenceFlow_7 + SequenceFlow_62 + + sequenceFlow_i1zqtw + + + + + + SequenceFlow_69 + SequenceFlow_16 + SequenceFlow_70 + + + + + + + SequenceFlow_70 + + + + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_9 + SequenceFlow_13 + SequenceFlow_5 + + + + + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_5 + SequenceFlow_19 + + + SequenceFlow_19 + + + + + + + + + + + + + Trigger über ZahlungseingangsSaldoAdapter + + + + + + + Triggered by MahnlaufExecuteAdapter + +Wiedervorlage wird um 7 bzw. 5 Tage erhöht + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + + + + + + + + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_38 + SequenceFlow_36 + SequenceFlow_41 + SequenceFlow_24 + sequenceFlow_U0JMVg + sequenceFlow_Z2zL5g + SequenceFlow_41 + sequenceFlow_30tT9w + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_38 + sequenceFlow_30tT9w + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + + + + + + + + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + SequenceFlow_3 + SequenceFlow_29 + SequenceFlow_68 + sequenceFlow_KaO3rw + sequenceFlow_i1zqtw + sequenceFlow_Giue7g + sequenceFlow_ZD07Xw + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ]]> + + + + + + + + + + + + false + + + + SequenceFlow_3 + sequenceFlow_Giue7g + + + + + + + + + + + + + + + + + + + + txtlastcomment]]> + + + + + + + + + _imginvoice.number dbtr.number dbtr.name (invoice.currency invoice.total) ]]> + + + true + + + + + + + + + + + + + + + $workflowgroup - $workflowstatus]]> + sequenceFlow_mDjqOA + sequenceFlow_ZUVE9w + + + + sequenceFlow_mDjqOA + + + + + + + + + + + + + + _subject]]> + + + + + + + + + _amount (Brutto € _amount_brutto) +_description]]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + home]]> + + + + + + + + + + + + false + + + + + + + SequenceFlow_13 + sequenceFlow_btGV1A + sequenceFlow_ZUVE9w + sequenceFlow_oglT1w + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +