anpassugn cargosoft export - kleinbuchstaben bei dateinamen
This commit is contained in:
parent
e214385c49
commit
9bfade8805
5 changed files with 247 additions and 8 deletions
2
pom.xml
2
pom.xml
|
|
@ -31,7 +31,7 @@
|
||||||
<org.imixs.adapters.version>2.2.6</org.imixs.adapters.version>
|
<org.imixs.adapters.version>2.2.6</org.imixs.adapters.version>
|
||||||
<org.imixs.archive.version>2.2.11</org.imixs.archive.version>
|
<org.imixs.archive.version>2.2.11</org.imixs.archive.version>
|
||||||
<org.imixs.melman.version>1.0.20</org.imixs.melman.version>
|
<org.imixs.melman.version>1.0.20</org.imixs.melman.version>
|
||||||
<org.imixs.ml.version>1.1.4-SNAPSHOT</org.imixs.ml.version>
|
<org.imixs.ml.version>1.1.4</org.imixs.ml.version>
|
||||||
<microprofile.version>2.2</microprofile.version>
|
<microprofile.version>2.2</microprofile.version>
|
||||||
|
|
||||||
<custom.webResources>src/main/webapp</custom.webResources>
|
<custom.webResources>src/main/webapp</custom.webResources>
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
181
reports/cargosoft/cargosoft-1.0.6.xsl
Normal file
181
reports/cargosoft/cargosoft-1.0.6.xsl
Normal file
|
|
@ -0,0 +1,181 @@
|
||||||
|
<?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="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>
|
||||||
|
|
||||||
|
<!-- Belegart - bei Gutschriften 'CREDIT' andernfalls 'INVOICE -->
|
||||||
|
<InvoiceType>
|
||||||
|
<Codes>
|
||||||
|
<xsl:choose>
|
||||||
|
<xsl:when test="item[@name='payment.type']/value = 'credit'">
|
||||||
|
<Code Type="cs">CREDIT</Code>
|
||||||
|
</xsl:when>
|
||||||
|
<xsl:otherwise>
|
||||||
|
<Code Type="cs">INVOICE</Code>
|
||||||
|
</xsl:otherwise>
|
||||||
|
</xsl:choose>
|
||||||
|
</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='order.total.netto']/value" /></Value>
|
||||||
|
<!-- exchange rate nur ausgeben wenn vorhanden -->
|
||||||
|
<xsl:if test="string-length(item[@name='invoice.exchangerate']/value) > 0">
|
||||||
|
<ExchangeRate><xsl:value-of select="item[@name='invoice.exchangerate']/value" /></ExchangeRate>
|
||||||
|
</xsl:if>
|
||||||
|
</Amount>
|
||||||
|
</NetAmount>
|
||||||
|
<VATInformation>
|
||||||
|
<VATAmount>
|
||||||
|
<Amount>
|
||||||
|
<Currency>
|
||||||
|
<Codes>
|
||||||
|
<Code Type="cs"><xsl:value-of select="$currency" /></Code>
|
||||||
|
</Codes>
|
||||||
|
</Currency>
|
||||||
|
<Value><xsl:value-of select="item[@name='order.total.tax']/value" /></Value>
|
||||||
|
<!-- exchange rate nur ausgeben wenn vorhanden -->
|
||||||
|
<xsl:if test="string-length(item[@name='invoice.exchangerate']/value) > 0">
|
||||||
|
<ExchangeRate><xsl:value-of select="item[@name='invoice.exchangerate']/value" /></ExchangeRate>
|
||||||
|
</xsl:if>
|
||||||
|
</Amount>
|
||||||
|
</VATAmount>
|
||||||
|
</VATInformation>
|
||||||
|
</InvoiceAmount>
|
||||||
|
<CollectionInvoice>false</CollectionInvoice>
|
||||||
|
<xsl:if test="string-length(item[@name='invoice.period']/value) > 0">
|
||||||
|
<BookingPeriod><xsl:value-of select="item[@name='invoice.period']/value" /></BookingPeriod>
|
||||||
|
</xsl:if>
|
||||||
|
<Booked>false</Booked>
|
||||||
|
<InvoiceDate><xsl:value-of select="item[@name='invoice.date']/value" /></InvoiceDate>
|
||||||
|
|
||||||
|
|
||||||
|
<InvoiceAddress type="CN">
|
||||||
|
<Codes>
|
||||||
|
<Code Type="cs"><xsl:value-of select="item[@name='cdtr.number']/value" /></Code>
|
||||||
|
</Codes>
|
||||||
|
</InvoiceAddress>
|
||||||
|
|
||||||
|
<References>
|
||||||
|
<Reference type="cs"><xsl:value-of select="item[@name='invoice.number']/value" /></Reference>
|
||||||
|
</References>
|
||||||
|
|
||||||
|
<!-- Attachements -->
|
||||||
|
<xsl:if test="item[@name='$file.count']/value > 0">
|
||||||
|
<Attachments>
|
||||||
|
<xsl:for-each
|
||||||
|
select="item[@name='$file']/value/item">
|
||||||
|
<Attachment>
|
||||||
|
<xsl:attribute name="id"><xsl:value-of select="./value/item[@name='md5checksum']/value" /></xsl:attribute>
|
||||||
|
<xsl:attribute name="version">1</xsl:attribute>
|
||||||
|
<Filename><xsl:value-of select="lower-case(./@name)" /></Filename>
|
||||||
|
<Description>Imixs-Office-Workflow</Description>
|
||||||
|
<Content><xsl:value-of select="./value[2]" /></Content>
|
||||||
|
</Attachment>
|
||||||
|
</xsl:for-each>
|
||||||
|
</Attachments>
|
||||||
|
</xsl:if>
|
||||||
|
|
||||||
|
</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"><xsl:value-of select="./item[@name='category']/value" /></Code>
|
||||||
|
</Codes>
|
||||||
|
</ActivityType>
|
||||||
|
</InvoiceRow>
|
||||||
|
</xsl:for-each>
|
||||||
|
</InvoiceRows>
|
||||||
|
</Invoice>
|
||||||
|
|
||||||
|
</xsl:template>
|
||||||
|
|
||||||
|
|
||||||
|
</xsl:stylesheet>
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
<Invoices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2020.2">
|
<Invoices xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
||||||
|
version="2020.2">
|
||||||
<Message>
|
<Message>
|
||||||
<SenderID>Imixs-Office-Workflow</SenderID>
|
<SenderID>Imixs-Office-Workflow</SenderID>
|
||||||
<ReceiverID>Cargosoft</ReceiverID>
|
<ReceiverID>Cargosoft</ReceiverID>
|
||||||
|
|
@ -34,18 +36,18 @@
|
||||||
<Code Type="cs">EUR</Code>
|
<Code Type="cs">EUR</Code>
|
||||||
</Codes>
|
</Codes>
|
||||||
</Currency>
|
</Currency>
|
||||||
<Value>1035.70</Value>
|
<Value/>
|
||||||
</Amount>
|
</Amount>
|
||||||
</NetAmount>
|
</NetAmount>
|
||||||
<VATInformation>
|
<VATInformation>
|
||||||
<VATAmount>
|
<VATAmount>
|
||||||
<Amount isDomesticCurrency="true">
|
<Amount>
|
||||||
<Currency>
|
<Currency>
|
||||||
<Codes>
|
<Codes>
|
||||||
<Code Type="cs">EUR</Code>
|
<Code Type="cs">EUR</Code>
|
||||||
</Codes>
|
</Codes>
|
||||||
</Currency>
|
</Currency>
|
||||||
<Value>0</Value>
|
<Value/>
|
||||||
</Amount>
|
</Amount>
|
||||||
</VATAmount>
|
</VATAmount>
|
||||||
</VATInformation>
|
</VATInformation>
|
||||||
|
|
@ -53,6 +55,21 @@
|
||||||
<CollectionInvoice>false</CollectionInvoice>
|
<CollectionInvoice>false</CollectionInvoice>
|
||||||
<Booked>false</Booked>
|
<Booked>false</Booked>
|
||||||
<InvoiceDate>2020-10-26T00:00:00+01:00</InvoiceDate>
|
<InvoiceDate>2020-10-26T00:00:00+01:00</InvoiceDate>
|
||||||
|
<InvoiceAddress type="CN">
|
||||||
|
<Codes>
|
||||||
|
<Code Type="cs"/>
|
||||||
|
</Codes>
|
||||||
|
</InvoiceAddress>
|
||||||
|
<References>
|
||||||
|
<Reference type="cs">RE2020110040</Reference>
|
||||||
|
</References>
|
||||||
|
<Attachments>
|
||||||
|
<Attachment id="7D39B741E2CEA429883C840983F7EBDA" version="1">
|
||||||
|
<Filename>202108200934067r12.pdf</Filename>
|
||||||
|
<Description>Imixs-Office-Workflow</Description>
|
||||||
|
<Content>7D39B741E2CEA429883C840983F7EBDA7D39B741E2CEA429883C840983F7EBDA...</Content>
|
||||||
|
</Attachment>
|
||||||
|
</Attachments>
|
||||||
</InvoiceHeader>
|
</InvoiceHeader>
|
||||||
<InvoiceRows/>
|
<InvoiceRows/>
|
||||||
</Invoice>
|
</Invoice>
|
||||||
|
|
|
||||||
|
|
@ -24,12 +24,53 @@
|
||||||
<item name="$file">
|
<item name="$file">
|
||||||
<value xsi:nil="true" />
|
<value xsi:nil="true" />
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
<item name="$file">
|
||||||
|
<value xsi:type="xmlItemArray">
|
||||||
|
<item name="202108200934067R12.PDF">
|
||||||
|
<value xsi:type="xs:string">Application/PDF</value>
|
||||||
|
<value xsi:type="xs:base64Binary">7D39B741E2CEA429883C840983F7EBDA7D39B741E2CEA429883C840983F7EBDA...</value>
|
||||||
|
<value xsi:type="xmlItemArray">
|
||||||
|
<item name="$creator">
|
||||||
|
<value xsi:type="xs:string">imixs-workflow-service</value>
|
||||||
|
</item>
|
||||||
|
<item name="size">
|
||||||
|
<value xsi:type="xs:int">371126</value>
|
||||||
|
</item>
|
||||||
|
<item name="$created">
|
||||||
|
<value xsi:type="xs:dateTime">2021-08-20T10:00:00.426+02:00</value>
|
||||||
|
</item>
|
||||||
|
<item name="txtname">
|
||||||
|
<value xsi:type="xs:string">20210820093406712.PDF</value>
|
||||||
|
</item>
|
||||||
|
<item name="md5checksum">
|
||||||
|
<value xsi:type="xs:string">7D39B741E2CEA429883C840983F7EBDA</value>
|
||||||
|
</item>
|
||||||
|
<item name="text">
|
||||||
|
<value xsi:type="xs:string">
|
||||||
|
TRANSPORT GMBH NCL-Transport GmbH - Bürgermeister-Smidt-Str. 70 - 28195
|
||||||
|
Bremen Alexander Global Logistics GmbH Herr Dimitri Khoroshun Museumstr. 2-6 D -
|
||||||
|
28195 Bremen Ihre Ust. IDNr. DE250152875 Kreditor-Nr.: 70811 Debitor-Nr: 10579
|
||||||
|
Datum: 20.08.2021 Rechnung: R42882 Seite Vor? Auftrag N-34704.001.1 Ihre Ref:
|
||||||
|
XXX
|
||||||
|
</value>
|
||||||
|
</item>
|
||||||
|
<item name="namcreator">
|
||||||
|
<value xsi:type="xs:string">imixs-workflow-service</value>
|
||||||
|
</item>
|
||||||
|
</value>
|
||||||
|
</item>
|
||||||
|
</value>
|
||||||
|
</item>
|
||||||
|
|
||||||
<item name="$file.count">
|
<item name="$file.count">
|
||||||
<value xsi:type="xs:int">0</value>
|
<value xsi:type="xs:int">1</value>
|
||||||
</item>
|
</item>
|
||||||
<item name="$file.names">
|
<item name="$file.names">
|
||||||
<value xsi:nil="true" />
|
<value xsi:type="xs:string">20210820093406712.PDF</value>
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
|
|
||||||
<item name="$isauthor">
|
<item name="$isauthor">
|
||||||
<value xsi:type="xs:boolean">true</value>
|
<value xsi:type="xs:boolean">true</value>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue