From 6725d3d8459e491a9308e82411235f3f232c9de7 Mon Sep 17 00:00:00 2001 From: Ralph Soika Date: Tue, 1 Dec 2020 16:22:37 +0100 Subject: [PATCH] cargosoft schnittstelle --- office-alexander-logistics-app/pom.xml | 6 +- .../CargosoftExportAdapter.java | 2 +- pom.xml | 6 +- .../cargosoft/cargosoft-1.0.0.imixs-report | 1 + .../cargosoft/{test => }/cargosoft-1.0.0.xsl | 5 +- reports/cargosoft/test/simple.out.xml | 64 +++++++++++++++++++ workflow/cargosoft-export-1.0.0.bpmn | 20 +++--- 7 files changed, 89 insertions(+), 15 deletions(-) create mode 100644 reports/cargosoft/cargosoft-1.0.0.imixs-report rename reports/cargosoft/{test => }/cargosoft-1.0.0.xsl (97%) create mode 100644 reports/cargosoft/test/simple.out.xml diff --git a/office-alexander-logistics-app/pom.xml b/office-alexander-logistics-app/pom.xml index d22f107..3e91a21 100644 --- a/office-alexander-logistics-app/pom.xml +++ b/office-alexander-logistics-app/pom.xml @@ -45,7 +45,7 @@ - docker-wildfly-debug + debug @@ -60,10 +60,10 @@ - + - + diff --git a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CargosoftExportAdapter.java b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CargosoftExportAdapter.java index cfa645f..39fc1dd 100644 --- a/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CargosoftExportAdapter.java +++ b/office-alexander-logistics-app/src/main/java/com/alexanderlogistics/CargosoftExportAdapter.java @@ -29,7 +29,7 @@ import org.imixs.workflow.exceptions.PluginException; * *
  * {@code
-        cargosoft-export
+        cargosoft
        
    }
  * 
diff --git a/pom.xml b/pom.xml index 1bd4ed7..09e12eb 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ yyyyMMddHHmmss - 5.2.5 + 5.2.7-SNAPSHOT 4.1.8 4.4.1-SNAPSHOT 2.2.4-SNAPSHOT @@ -78,6 +78,10 @@ docker
+ + debug + + kubernetes diff --git a/reports/cargosoft/cargosoft-1.0.0.imixs-report b/reports/cargosoft/cargosoft-1.0.0.imixs-report new file mode 100644 index 0000000..1306c7b --- /dev/null +++ b/reports/cargosoft/cargosoft-1.0.0.imixs-report @@ -0,0 +1 @@ +$uniqueid$workflowgroup$taskid$workflowsummaryinvoice.numberinvoice.dateinvoice.totalinvoice.currencycdtr.namecdtr.ibancdtr.bicdbtr.namedbtr.ibandbtr.bicpayment.typeUTF-8Cargosoft Export - only the XSL Template is needed here!cargosoft<?xml version="1.0" encoding="UTF-8" standalone="yes"?><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"> <xsl:strip-space elements="*" /> <xsl:output method="xml" indent="yes" encoding="UTF-8" standalone="yes" /> <xsl:template match="/"> <xsl:variable name="date" select="/data/document/item[@name='$modified']/value" /> <Invoices version="2020.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <Message> <SenderID>Imixs-Office-Workflow</SenderID> <ReceiverID>Cargosoft</ReceiverID> <MessageID><xsl:value-of select="/data/document/item[@name='$uniqueid']/value" /></MessageID> <MessageDate> <DateTime><xsl:value-of select="$date" /></DateTime> </MessageDate> </Message> <xsl:apply-templates select="/data/document[normalize-space(item[@name = '$workflowgroup']/value) = 'Cargosoft-Export']" /> </Invoices> </xsl:template> <!-- This template builds invoice info --> <xsl:template match="/data/document[normalize-space(item[@name = '$workflowgroup']/value) = 'Cargosoft-Export']"> <xsl:variable name="date" select="item[@name='$modified']/value"/> <xsl:variable name="currency" select="item[@name='invoice.currency']/value"/> <Invoice> <InvoiceHeader> <Client> <Codes> <!-- Als Typ muss „cs“ übermittelt werden und im Code wird dann der Cargosoft Mandant erwartet. --> <Code Type="cs">001</Code> </Codes> </Client> <!-- Hier muss eine eindeutige Belegnummer für jeden einzelnen Beleg übermittelt werden. Es muss sich um eine Nummer handeln, die pro Beleg hochgezählt wird und darf sich nicht überschneiden mit dem CargoSoft Belegnummernkreis. Daher den Nummernkreis vorher mit CargoSoft absprechen. --> <InvoiceNumber><xsl:value-of select="item[@name='numsequencenumber']/value" /></InvoiceNumber> <InvoiceType> <Codes> <Code Type="cs">INVOICE</Code> </Codes> </InvoiceType> <InvoiceCurrency> <Codes> <Code Type="cs"><xsl:value-of select="$currency" /></Code> </Codes> </InvoiceCurrency> <InvoiceAmount> <NetAmount> <Amount> <Currency> <Codes> <Code Type="cs"><xsl:value-of select="$currency" /></Code> </Codes> </Currency> <Value><xsl:value-of select="item[@name='invoice.total']/value" /></Value> </Amount> </NetAmount> <VATInformation> <VATAmount> <Amount isDomesticCurrency="true"> <Currency> <Codes> <Code Type="cs"><xsl:value-of select="$currency" /></Code> </Codes> </Currency> <Value>0</Value> </Amount> </VATAmount> </VATInformation> </InvoiceAmount> <CollectionInvoice>false</CollectionInvoice> <Booked>false</Booked> <InvoiceDate><xsl:value-of select="item[@name='invoice.date']/value" /></InvoiceDate> <!-- <InvoiceAddress type="CN"> <Codes> <Code Type="cs">9999999</Code> </Codes> </InvoiceAddress> --> <!-- <References> <Reference type="cs">201606-ABS1425131</Reference> </References> --> </InvoiceHeader> <InvoiceRows> <xsl:for-each select="item[@name='_childitems']/value"> <InvoiceRow> <Row><xsl:value-of select="./item[@name='numpos']/value" /></Row> <FileNumber><xsl:value-of select="./item[@name='name']/value" /></FileNumber> <InvoiceAmount> <NetAmount> <Amount> <Currency> <Codes> <Code Type="cs"><xsl:value-of select="$currency" /></Code> </Codes> </Currency> <Value><xsl:value-of select="./item[@name='amount']/value" /></Value> </Amount> </NetAmount> <VATInformation> <VAT> <Codes> <Code Type="cs"><xsl:value-of select="./item[@name='tax']/value" /></Code> </Codes> </VAT> </VATInformation> </InvoiceAmount> <ActivityType> <Codes> <Code Type="cs">ACT</Code> </Codes> </ActivityType> </InvoiceRow> </xsl:for-each> </InvoiceRows> </Invoice> </xsl:template> </xsl:stylesheet>/office-alexander-logistics/reports/cargosoft/cargosoft-1.0.0.xsl \ No newline at end of file diff --git a/reports/cargosoft/test/cargosoft-1.0.0.xsl b/reports/cargosoft/cargosoft-1.0.0.xsl similarity index 97% rename from reports/cargosoft/test/cargosoft-1.0.0.xsl rename to reports/cargosoft/cargosoft-1.0.0.xsl index 0dd8d02..7a6c0bd 100644 --- a/reports/cargosoft/test/cargosoft-1.0.0.xsl +++ b/reports/cargosoft/cargosoft-1.0.0.xsl @@ -77,7 +77,7 @@ - EUR + 0 @@ -88,11 +88,14 @@ false false + +