Corrected intra community supply tax exemption category code
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2.1.0
|
||||||
|
=======
|
||||||
|
|
||||||
|
|
||||||
|
- Corrected intra community supply tax exemption category code
|
||||||
|
|
||||||
2.0.3
|
2.0.3
|
||||||
=======
|
=======
|
||||||
2020-12-06
|
2020-12-06
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>Mustang-CLI</artifactId>
|
<artifactId>Mustang-CLI</artifactId>
|
||||||
<name>Mustang commandline tool</name>
|
<name>e-invoices commandline tool, allowing to create(embed), split and validate Factur-X/ZUGFeRD files. Validation should also work for XRechnung/CII. </name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>2.0.4-SNAPSHOT</version>
|
<version>2.0.4-SNAPSHOT</version>
|
||||||
<repositories>
|
<repositories>
|
||||||
@@ -53,7 +53,6 @@
|
|||||||
<version>4.13.1</version>
|
<version>4.13.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
<!-- for directory validation: -->
|
<!-- for directory validation: -->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.xmlunit</groupId>
|
<groupId>org.xmlunit</groupId>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<artifactId>library</artifactId>
|
<artifactId>library</artifactId>
|
||||||
<version>2.0.4-SNAPSHOT</version>
|
<version>2.0.4-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>Library to write and read FacturX and ZUGFeRD e-invoices. </name>
|
<name>Library to write, read and validate e-invoices (Factur-X, ZUGFeRD and to a limited extend XRechnung/CII). </name>
|
||||||
<description>The Mustang project is a java library to read and write ZUGFeRD meta data inside your invoice PDFs. To write files, a provided PDF/A will be combined with generated or provided XML.
|
<description>The Mustang project is a java library to read, write and validate Factur-X/ZUGFeRD meta data inside your invoice PDFs. To write files, a provided PDF/A will be combined with generated or provided XML.
|
||||||
</description>
|
</description>
|
||||||
<url>http://www.mustangproject.org/</url>
|
<url>http://www.mustangproject.org/</url>
|
||||||
<scm>
|
<scm>
|
||||||
@@ -83,6 +83,14 @@
|
|||||||
<version>4.13.1</version>
|
<version>4.13.1</version>
|
||||||
<scope>test</scope>
|
<scope>test</scope>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
|
||||||
|
<!-- CII to UBL conversion -->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.helger</groupId>
|
||||||
|
<artifactId>en16931-cii2ubl</artifactId>
|
||||||
|
<version>1.2.5</version>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.helger</groupId>
|
<groupId>com.helger</groupId>
|
||||||
<artifactId>ph-schematron</artifactId>
|
<artifactId>ph-schematron</artifactId>
|
||||||
@@ -101,6 +109,12 @@
|
|||||||
<artifactId>xmlunit-assertj</artifactId>
|
<artifactId>xmlunit-assertj</artifactId>
|
||||||
<version>2.6.3</version>
|
<version>2.6.3</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.helger</groupId>
|
||||||
|
<artifactId>ph-commons</artifactId>
|
||||||
|
<version>9.1.1</version>
|
||||||
|
<scope>compile</scope>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<build>
|
<build>
|
||||||
|
|||||||
50
library/src/main/java/org/mustangproject/CII/CIIToUBL.java
Normal file
50
library/src/main/java/org/mustangproject/CII/CIIToUBL.java
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
package org.mustangproject.CII;
|
||||||
|
import com.helger.commons.error.list.ErrorList;
|
||||||
|
import com.helger.en16931.cii2ubl.CIIToUBL22Converter;
|
||||||
|
import com.helger.ubl21.UBL21Writer;
|
||||||
|
import com.helger.ubl22.UBL22Writer;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class CIIToUBL {
|
||||||
|
/***
|
||||||
|
* converts a CII XML file to a UBL XML file
|
||||||
|
* thanks to Philip Helger for his library
|
||||||
|
* @param input
|
||||||
|
* @param output
|
||||||
|
*/
|
||||||
|
public void convert(File input, File output) {
|
||||||
|
ErrorList occurred=new ErrorList();
|
||||||
|
CIIToUBL22Converter cc=new CIIToUBL22Converter();
|
||||||
|
Serializable aUBL = cc.convertCIItoUBL(input, occurred);
|
||||||
|
if (aUBL instanceof oasis.names.specification.ubl.schema.xsd.invoice_21.InvoiceType)
|
||||||
|
{
|
||||||
|
UBL21Writer.invoice ()
|
||||||
|
.setFormattedOutput (true)
|
||||||
|
.write ((oasis.names.specification.ubl.schema.xsd.invoice_21.InvoiceType) aUBL, output);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (aUBL instanceof oasis.names.specification.ubl.schema.xsd.creditnote_21.CreditNoteType)
|
||||||
|
{
|
||||||
|
UBL21Writer.creditNote ()
|
||||||
|
.setFormattedOutput (true)
|
||||||
|
.write ((oasis.names.specification.ubl.schema.xsd.creditnote_21.CreditNoteType) aUBL, output);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (aUBL instanceof oasis.names.specification.ubl.schema.xsd.invoice_22.InvoiceType)
|
||||||
|
{
|
||||||
|
UBL22Writer.invoice ()
|
||||||
|
.setFormattedOutput (true)
|
||||||
|
.write ((oasis.names.specification.ubl.schema.xsd.invoice_22.InvoiceType) aUBL, output);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
if (aUBL instanceof oasis.names.specification.ubl.schema.xsd.creditnote_22.CreditNoteType)
|
||||||
|
{
|
||||||
|
UBL22Writer.creditNote ()
|
||||||
|
.setFormattedOutput (true)
|
||||||
|
.write ((oasis.names.specification.ubl.schema.xsd.creditnote_22.CreditNoteType) aUBL, output);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -24,5 +24,5 @@ public class TaxCategoryCodeTypeConstants {
|
|||||||
public static final String TAXEXEMPT = "E";
|
public static final String TAXEXEMPT = "E";
|
||||||
public static final String ZEROTAXPRODUCTS = "Z";
|
public static final String ZEROTAXPRODUCTS = "Z";
|
||||||
public static final String UNTAXEDSERVICE = "O";
|
public static final String UNTAXEDSERVICE = "O";
|
||||||
public static final String INTRACOMMUNITY = "IC";
|
public static final String INTRACOMMUNITY = "K";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user