Merge remote-tracking branch 'mustang-master/master' into forked-master
This commit is contained in:
55
History.md
55
History.md
@@ -1,21 +1,50 @@
|
|||||||
|
- correcly write charge reason codes also for non-Xrechnung #617
|
||||||
|
- correctly import additional referenced documents into invoice/corrected setting of attachments from jackson
|
||||||
|
- corrected parseException structure
|
||||||
|
- allow 1p0 as potential xmp version number
|
||||||
|
- #618 import BT-20
|
||||||
|
|
||||||
|
2.15.1
|
||||||
|
=======
|
||||||
|
2024-12-07
|
||||||
|
- #566 Failed to parse PDF - Could not reproduce the invoice
|
||||||
|
- closes #579 prepaidamount is only read in UBL
|
||||||
|
- #581 parse lineTotalAmount, TaxBasisAmount, duePayableAmount
|
||||||
|
- #576 read lineid, #578 set lineid
|
||||||
|
- log error ids, be able to access them from context
|
||||||
|
- #503 import more ubl
|
||||||
|
- allow jackson to run over more classes, e.g., DirectDebit, bean contructor for direct debit
|
||||||
|
- allow json in document includedNotes and
|
||||||
|
- #591 Import IncludedNotes also on item level
|
||||||
|
- #595 Treat all fatal XR schematron rules as errors, not as warnings.
|
||||||
|
- #577 dom4j: exclude all (optional) dependencies to avoid potential conflicts.
|
||||||
|
- #575 Fix compilation problems.
|
||||||
|
- #573 Feature/category code
|
||||||
|
- #601 exceptions in metrics
|
||||||
|
- #606 also parse BT-25
|
||||||
|
|
||||||
|
|
||||||
2.15.0
|
2.15.0
|
||||||
=======
|
=======
|
||||||
2024-
|
2024-11-18
|
||||||
- 435 use invoiceimporter as common technical basis also for zugferdimporter
|
- #435 use invoiceimporter as common technical basis also for zugferdimporter
|
||||||
- also import delivery address
|
- also import delivery address
|
||||||
- 527 metrics may raise error on some pdf files
|
- #527 metrics may raise error on some pdf files
|
||||||
- 517 read product GlobalID
|
- #517 read product GlobalID
|
||||||
- 380 Added test for input stream validation
|
- #380 Added test for input stream validation
|
||||||
- 518 corrently validate more XRechnung versions
|
- #518 corrently validate more XRechnung versions
|
||||||
- make document charges and allowances serializable
|
- make document charges and allowances serializable
|
||||||
- 523 Verapdf claims PDF-A/3s created witth visualize are invalid
|
- #523 Verapdf claims PDF-A/3s created witth visualize are invalid
|
||||||
- 530 duedate can not be set directly
|
- #530 duedate can not be set directly
|
||||||
- 532 support validation warnings!
|
- #532 support validation warnings!
|
||||||
- 534 new signature
|
- #534 new signature
|
||||||
- 538 Mustang validator always claims PDF is invalid if flavour is PDF/A-3A
|
- #538 Mustang validator always claims PDF is invalid if flavour is PDF/A-3A
|
||||||
- 555 be able to validate ubl credit notes
|
- #555 be able to validate ubl credit notes
|
||||||
- when parsing now distinguishing between the parseExceptions StructureException and ArithmetricException
|
- when parsing now distinguishing between the parseExceptions StructureException and ArithmetricException
|
||||||
- Import IncludedNotes on invoice extraction #554
|
- #554 Import IncludedNotes on invoice extraction
|
||||||
|
- #542 Visualize SpecifiedLogisticsServiceCharge
|
||||||
|
- #531 Support ZUGFeRD 2.3.2
|
||||||
|
- #480 Support netherlands Euro
|
||||||
|
|
||||||
2.14.2
|
2.14.2
|
||||||
=======
|
=======
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
should also work for XRechnung/CII.
|
should also work for XRechnung/CII.
|
||||||
</name>
|
</name>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
<properties>
|
<properties>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<maven.compiler.compilerVersion>11</maven.compiler.compilerVersion>
|
<maven.compiler.compilerVersion>11</maven.compiler.compilerVersion>
|
||||||
@@ -23,7 +23,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>validator</artifactId>
|
<artifactId>validator</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
<!-- prototypes of new mustangproject versions can be installed by referring to them and installed to the local repo from a jar file with
|
<!-- prototypes of new mustangproject versions can be installed by referring to them and installed to the local repo from a jar file with
|
||||||
mvn install:install-file -Dfile=mustang-1.5.4-SNAPSHOT.jar -DgroupId=org.mustangproject.ZUGFeRD -DartifactId=mustang -Dversion=1.5.4 -Dpackaging=jar -DgeneratePom=true
|
mvn install:install-file -Dfile=mustang-1.5.4-SNAPSHOT.jar -DgroupId=org.mustangproject.ZUGFeRD -DartifactId=mustang -Dversion=1.5.4 -Dpackaging=jar -DgeneratePom=true
|
||||||
-->
|
-->
|
||||||
|
|||||||
@@ -51,7 +51,9 @@ public class FileChecker {
|
|||||||
if ((!isPDF) && (!thisRun.shallIgnoreFileExt())) {
|
if ((!isPDF) && (!thisRun.shallIgnoreFileExt())) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(filename);
|
ZUGFeRDImporter zi = new ZUGFeRDImporter();
|
||||||
|
zi.doIgnoreCalculationErrors();
|
||||||
|
zi.setPDFFilename(filename);
|
||||||
try {
|
try {
|
||||||
if (zi.canParse()) {
|
if (zi.canParse()) {
|
||||||
thisRun.incZUGFeRDCount(zi.getVersion());
|
thisRun.incZUGFeRDCount(zi.getVersion());
|
||||||
|
|||||||
@@ -32,9 +32,10 @@ If you set up a Maven project, you can reference the mustang artifact like this:
|
|||||||
|
|
||||||
```xml
|
```xml
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>library</artifactId>
|
<artifactId>validator</artifactId>
|
||||||
<version>2.14.0</version>
|
<version>2.15.0</version>
|
||||||
|
<classifier>shaded</classifier>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -3,13 +3,13 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>library</artifactId>
|
<artifactId>library</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<name>Library to write, read and validate e-invoices (Factur-X, ZUGFeRD, Order-X, XRechnung/CII)</name>
|
<name>Library to write, read and validate e-invoices (Factur-X, ZUGFeRD, Order-X, XRechnung/CII)</name>
|
||||||
<description>FOSS Java library to read, write and validate european electronic invoices and orders in the UN/CEFACT
|
<description>FOSS Java library to read, write and validate european electronic invoices and orders in the UN/CEFACT
|
||||||
@@ -116,6 +116,12 @@
|
|||||||
<groupId>org.dom4j</groupId>
|
<groupId>org.dom4j</groupId>
|
||||||
<artifactId>dom4j</artifactId>
|
<artifactId>dom4j</artifactId>
|
||||||
<version>2.1.4</version>
|
<version>2.1.4</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<!-- CII to UBL conversion -->
|
<!-- CII to UBL conversion -->
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|||||||
@@ -1,12 +1,16 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* (absolute) allowances on item and document level
|
* (absolute) allowances on item and document level
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class Allowance extends Charge {
|
public class Allowance extends Charge {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|||||||
@@ -2,11 +2,14 @@ package org.mustangproject;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IZUGFeRDTradeSettlementPayment;
|
import org.mustangproject.ZUGFeRD.IZUGFeRDTradeSettlementPayment;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* provides e.g. the IBAN to transfer money to :-)
|
* provides e.g. the IBAN to transfer money to :-)
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
||||||
/**
|
/**
|
||||||
* the bank account number
|
* the bank account number
|
||||||
@@ -15,15 +18,17 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
/**
|
/**
|
||||||
* BIC, I believe it's optional
|
* BIC, I believe it's optional
|
||||||
*/
|
*/
|
||||||
protected String BIC=null;
|
protected String BIC = null;
|
||||||
/**
|
/**
|
||||||
* the "name" of the bank account (holder)
|
* the "name" of the bank account (holder)
|
||||||
*/
|
*/
|
||||||
protected String accountName=null;
|
protected String accountName = null;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* bean constructor
|
* bean constructor
|
||||||
*/
|
*/
|
||||||
public BankDetails() { }
|
public BankDetails() {
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* constructor for IBAN only :-)
|
* constructor for IBAN only :-)
|
||||||
@@ -32,6 +37,7 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
public BankDetails(String IBAN) {
|
public BankDetails(String IBAN) {
|
||||||
this.IBAN = IBAN;
|
this.IBAN = IBAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* constructor for normal use :-)
|
* constructor for normal use :-)
|
||||||
* @param IBAN the IBAN as string
|
* @param IBAN the IBAN as string
|
||||||
@@ -55,6 +61,7 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
* identify the IBAN. Of course you will specify your own IBAN in full length but
|
* identify the IBAN. Of course you will specify your own IBAN in full length but
|
||||||
* if you deduct from a customer's account you may e.g. leave out the first or last
|
* if you deduct from a customer's account you may e.g. leave out the first or last
|
||||||
* digits so that nobody spying on the invoice gets to know the complete number
|
* digits so that nobody spying on the invoice gets to know the complete number
|
||||||
|
*
|
||||||
* @param IBAN the "IBAN ID", i.e. the IBAN or parts of it
|
* @param IBAN the "IBAN ID", i.e. the IBAN or parts of it
|
||||||
* @return fluent setter
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
@@ -81,9 +88,10 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
|
||||||
* getOwn... methods will be removed in the future in favor of Tradeparty (e.g. Sender) class
|
/*
|
||||||
* */
|
I'd really like to get rid of all those getOwn... methods some time but in this case they are in the interface :-(
|
||||||
|
*/
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@JsonIgnore
|
@JsonIgnore
|
||||||
@@ -101,11 +109,12 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* set Holder
|
* set Holder
|
||||||
|
*
|
||||||
* @param name account name (usually account holder if != sender)
|
* @param name account name (usually account holder if != sender)
|
||||||
* @return fluent setter
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
public BankDetails setAccountName(String name) {
|
public BankDetails setAccountName(String name) {
|
||||||
accountName=name;
|
accountName = name;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -115,5 +124,4 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.TransactionCalculator;
|
import org.mustangproject.ZUGFeRD.TransactionCalculator;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@@ -9,13 +11,21 @@ import org.slf4j.LoggerFactory;
|
|||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class CalculatedInvoice extends Invoice implements Serializable {
|
public class CalculatedInvoice extends Invoice implements Serializable {
|
||||||
|
|
||||||
protected BigDecimal grandTotal=null;
|
protected BigDecimal lineTotalAmount=null;
|
||||||
|
protected BigDecimal duePayable=null;
|
||||||
|
protected BigDecimal grandTotal=null;
|
||||||
|
protected BigDecimal taxBasis=null;
|
||||||
|
|
||||||
public void calculate() {
|
public void calculate() {
|
||||||
TransactionCalculator tc=new TransactionCalculator(this);
|
TransactionCalculator tc=new TransactionCalculator(this);
|
||||||
grandTotal=tc.getGrandTotal();
|
grandTotal=tc.getGrandTotal();
|
||||||
|
lineTotalAmount=tc.getValue();
|
||||||
|
duePayable=tc.getDuePayable();
|
||||||
|
taxBasis= tc.getTaxBasis();
|
||||||
}
|
}
|
||||||
public BigDecimal getGrandTotal() {
|
public BigDecimal getGrandTotal() {
|
||||||
if (grandTotal==null) {
|
if (grandTotal==null) {
|
||||||
@@ -27,4 +37,37 @@ public class CalculatedInvoice extends Invoice implements Serializable {
|
|||||||
grandTotal=grand;
|
grandTotal=grand;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
public BigDecimal getTaxBasis() {
|
||||||
|
if (taxBasis==null) {
|
||||||
|
calculate();
|
||||||
|
}
|
||||||
|
return taxBasis;
|
||||||
|
}
|
||||||
|
public CalculatedInvoice setTaxBasis(BigDecimal basis) {
|
||||||
|
taxBasis=basis;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDuePayable() {
|
||||||
|
if (duePayable==null) {
|
||||||
|
calculate();
|
||||||
|
}
|
||||||
|
return duePayable;
|
||||||
|
}
|
||||||
|
public CalculatedInvoice setDuePayable(BigDecimal due) {
|
||||||
|
duePayable=due;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getLineTotalAmount() {
|
||||||
|
if (lineTotalAmount==null) {
|
||||||
|
calculate();
|
||||||
|
}
|
||||||
|
return lineTotalAmount;
|
||||||
|
}
|
||||||
|
public CalculatedInvoice setLineTotalAmount(BigDecimal total) {
|
||||||
|
lineTotalAmount=total;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IZUGFeRDCashDiscount;
|
import org.mustangproject.ZUGFeRD.IZUGFeRDCashDiscount;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -7,6 +9,8 @@ import java.math.BigDecimal;
|
|||||||
/***
|
/***
|
||||||
* A class to represent discounts for early payments ("Skonto")
|
* A class to represent discounts for early payments ("Skonto")
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class CashDiscount implements IZUGFeRDCashDiscount {
|
public class CashDiscount implements IZUGFeRDCashDiscount {
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -31,6 +35,31 @@ public class CashDiscount implements IZUGFeRDCashDiscount {
|
|||||||
this.days = days;
|
this.days = days;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* bean contructor
|
||||||
|
*/
|
||||||
|
public CashDiscount() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public BigDecimal getPercent() {
|
||||||
|
return percent;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CashDiscount setPercent(BigDecimal percent) {
|
||||||
|
this.percent = percent;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getDays() {
|
||||||
|
return days;
|
||||||
|
}
|
||||||
|
|
||||||
|
public CashDiscount setDays(Integer days) {
|
||||||
|
this.days = days;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* @return this particular cash discount as cross industry invoice XML
|
* @return this particular cash discount as cross industry invoice XML
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IAbsoluteValueProvider;
|
import org.mustangproject.ZUGFeRD.IAbsoluteValueProvider;
|
||||||
import org.mustangproject.ZUGFeRD.IZUGFeRDAllowanceCharge;
|
import org.mustangproject.ZUGFeRD.IZUGFeRDAllowanceCharge;
|
||||||
|
|
||||||
@@ -9,6 +11,8 @@ import java.math.BigDecimal;
|
|||||||
/***
|
/***
|
||||||
* Absolute and relative charges for document and item level
|
* Absolute and relative charges for document and item level
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class Charge implements IZUGFeRDAllowanceCharge {
|
public class Charge implements IZUGFeRDAllowanceCharge {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,15 +20,19 @@
|
|||||||
*/
|
*/
|
||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.w3c.dom.NamedNodeMap;
|
import org.w3c.dom.NamedNodeMap;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A schemed classification for products. The scheme can be anything defined in UNTDID 7143.
|
* A schemed classification for products. The scheme can be anything defined in UNTDID 7143.
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class ClassCode {
|
public class ClassCode {
|
||||||
private final String listID;
|
private String listID;
|
||||||
private final String code;
|
private String code;
|
||||||
private String listVersionID;
|
private String listVersionID;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -54,6 +58,13 @@ public class ClassCode {
|
|||||||
this(listID, code, null);
|
this(listID, code, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* bean constructor
|
||||||
|
*/
|
||||||
|
public ClassCode() {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Set the version for the scheme returned by {@link #getListID()}
|
* Set the version for the scheme returned by {@link #getListID()}
|
||||||
* @param listVersionID the scheme version
|
* @param listVersionID the scheme version
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableContact;
|
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableContact;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
@@ -11,6 +12,7 @@ import org.w3c.dom.NodeList;
|
|||||||
* @see TradeParty
|
* @see TradeParty
|
||||||
*/
|
*/
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class Contact implements IZUGFeRDExportableContact {
|
public class Contact implements IZUGFeRDExportableContact {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -20,14 +20,18 @@
|
|||||||
*/
|
*/
|
||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IDesignatedProductClassification;
|
import org.mustangproject.ZUGFeRD.IDesignatedProductClassification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An implementation of {@link IDesignatedProductClassification} for describing a {@link org.mustangproject.Product}
|
* An implementation of {@link IDesignatedProductClassification} for describing a {@link org.mustangproject.Product}
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class DesignatedProductClassification implements IDesignatedProductClassification {
|
public class DesignatedProductClassification implements IDesignatedProductClassification {
|
||||||
private final ClassCode classCode;
|
private ClassCode classCode;
|
||||||
private String className;
|
private String className;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -50,6 +54,13 @@ public class DesignatedProductClassification implements IDesignatedProductClassi
|
|||||||
this(classCode, null);
|
this(classCode, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Bean constructor for schemed product descriptor
|
||||||
|
*/
|
||||||
|
public DesignatedProductClassification() {
|
||||||
|
classCode = null;// we need this constructor for jackson, i.e. to be able to JSON
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ClassCode getClassCode() {
|
public ClassCode getClassCode() {
|
||||||
return classCode;
|
return classCode;
|
||||||
|
|||||||
@@ -1,20 +1,32 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IZUGFeRDTradeSettlementDebit;
|
import org.mustangproject.ZUGFeRD.IZUGFeRDTradeSettlementDebit;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* provides e.g. the IBAN to transfer money to :-)
|
* provides e.g. the IBAN to transfer money to :-)
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class DirectDebit implements IZUGFeRDTradeSettlementDebit {
|
public class DirectDebit implements IZUGFeRDTradeSettlementDebit {
|
||||||
/**
|
/**
|
||||||
* Debited account identifier (BT-91)
|
* Debited account identifier (BT-91)
|
||||||
*/
|
*/
|
||||||
protected final String IBAN;
|
protected String IBAN;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mandate reference identifier (BT-89)
|
* Mandate reference identifier (BT-89)
|
||||||
*/
|
*/
|
||||||
protected final String mandate;
|
protected String mandate;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* bean constructor
|
||||||
|
*/
|
||||||
|
public DirectDebit() {
|
||||||
|
this.IBAN = "";
|
||||||
|
this.mandate = "";
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* constructor for normal use :-)
|
* constructor for normal use :-)
|
||||||
@@ -35,8 +47,18 @@ public class DirectDebit implements IZUGFeRDTradeSettlementDebit {
|
|||||||
return this.IBAN;
|
return this.IBAN;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DirectDebit setIBAN(String iBAN) {
|
||||||
|
this.IBAN = iBAN;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getMandate() {
|
public String getMandate() {
|
||||||
return this.mandate;
|
return this.mandate;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public DirectDebit setMandate(String mandate) {
|
||||||
|
this.mandate = mandate;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class FileAttachment {
|
public class FileAttachment {
|
||||||
|
|
||||||
protected String filename;
|
protected String filename;
|
||||||
@@ -8,12 +13,20 @@ public class FileAttachment {
|
|||||||
protected String description;
|
protected String description;
|
||||||
protected byte[] data;
|
protected byte[] data;
|
||||||
|
|
||||||
|
|
||||||
|
/***
|
||||||
|
* bean contructor
|
||||||
|
*/
|
||||||
|
public FileAttachment() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public FileAttachment(String filename, String mimetype, String relation, byte[] data) {
|
public FileAttachment(String filename, String mimetype, String relation, byte[] data) {
|
||||||
this.filename = filename;
|
this.filename = filename;
|
||||||
this.mimetype = mimetype;
|
this.mimetype = mimetype;
|
||||||
this.relation = relation;
|
this.relation = relation;
|
||||||
this.data = data;
|
this.data = data;
|
||||||
description = "Additional file attachment";
|
this.description = "Additional file attachment";
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getDescription() {
|
public String getDescription() {
|
||||||
@@ -60,8 +73,4 @@ public class FileAttachment {
|
|||||||
this.data = data;
|
this.data = data;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,68 +1,100 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A grouping of business terms to indicate accounting-relevant free texts including a qualification of these.
|
* A grouping of business terms to indicate accounting-relevant free texts including a qualification of these.
|
||||||
*/
|
*/
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class IncludedNote {
|
public class IncludedNote {
|
||||||
private final String content;
|
private String content;
|
||||||
private final SubjectCode subjectCode;
|
|
||||||
|
|
||||||
private static final String INCLUDE_START = "<ram:IncludedNote>";
|
private SubjectCode subjectCode;
|
||||||
private static final String INCLUDE_END = "</ram:IncludedNote>";
|
|
||||||
private static final String CONTENT_START = "<ram:Content>";
|
|
||||||
private static final String CONTENT_END = "</ram:Content>";
|
|
||||||
private static final String SUBJECT_CODE_START = "<ram:SubjectCode>";
|
|
||||||
private static final String SUBJECT_CODE_END = "</ram:SubjectCode>";
|
|
||||||
|
|
||||||
private IncludedNote(String content, SubjectCode subjectCode) {
|
private static final String INCLUDE_START = "<ram:IncludedNote>";
|
||||||
this.content = content;
|
private static final String INCLUDE_END = "</ram:IncludedNote>";
|
||||||
this.subjectCode = subjectCode;
|
private static final String CONTENT_START = "<ram:Content>";
|
||||||
}
|
private static final String CONTENT_END = "</ram:Content>";
|
||||||
|
private static final String SUBJECT_CODE_START = "<ram:SubjectCode>";
|
||||||
|
private static final String SUBJECT_CODE_END = "</ram:SubjectCode>";
|
||||||
|
|
||||||
public static IncludedNote generalNote(String content) {
|
public IncludedNote(String content, SubjectCode subjectCode) {
|
||||||
return new IncludedNote(content, SubjectCode.AAI);
|
this.content = content;
|
||||||
}
|
this.subjectCode = subjectCode;
|
||||||
public static IncludedNote regulatoryNote(String content) {
|
}
|
||||||
return new IncludedNote(content, SubjectCode.REG);
|
|
||||||
}
|
|
||||||
public static IncludedNote legalNote(String content) {
|
|
||||||
return new IncludedNote(content, SubjectCode.ABL);
|
|
||||||
}
|
|
||||||
public static IncludedNote customsNote(String content) {
|
|
||||||
return new IncludedNote(content, SubjectCode.CUS);
|
|
||||||
}
|
|
||||||
public static IncludedNote sellerNote(String content) {
|
|
||||||
return new IncludedNote(content, SubjectCode.SUR);
|
|
||||||
}
|
|
||||||
public static IncludedNote taxNote(String content) {
|
|
||||||
return new IncludedNote(content, SubjectCode.TXD);
|
|
||||||
}
|
|
||||||
public static IncludedNote introductionNote(String content) {
|
|
||||||
return new IncludedNote(content, SubjectCode.ACY);
|
|
||||||
}
|
|
||||||
public static IncludedNote discountBonusNote(String content) {
|
|
||||||
return new IncludedNote(content, SubjectCode.AAK);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static IncludedNote unspecifiedNote(String content) {
|
/**
|
||||||
return new IncludedNote(content, null);
|
* bean constructor
|
||||||
}
|
*/
|
||||||
|
public IncludedNote() {
|
||||||
|
|
||||||
public String getContent() {
|
}
|
||||||
return content;
|
|
||||||
}
|
public static IncludedNote generalNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.AAI);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote regulatoryNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.REG);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote legalNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.ABL);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote customsNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.CUS);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote sellerNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.SUR);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote taxNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.TXD);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote introductionNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.ACY);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote discountBonusNote(String content) {
|
||||||
|
return new IncludedNote(content, SubjectCode.AAK);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static IncludedNote unspecifiedNote(String content) {
|
||||||
|
return new IncludedNote(content, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getContent() {
|
||||||
|
return content;
|
||||||
|
}
|
||||||
|
|
||||||
|
public SubjectCode getSubjectCode() {
|
||||||
|
return subjectCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public IncludedNote setSubjectCode(SubjectCode subjectCode) {
|
||||||
|
this.subjectCode = subjectCode;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IncludedNote setContent(String content) {
|
||||||
|
this.content = content;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public String toCiiXml() {
|
||||||
|
String result = INCLUDE_START + CONTENT_START +
|
||||||
|
XMLTools.encodeXML(getContent()) + CONTENT_END;
|
||||||
|
if (getSubjectCode() != null) {
|
||||||
|
result += SUBJECT_CODE_START + getSubjectCode() + SUBJECT_CODE_END;
|
||||||
|
}
|
||||||
|
return result + INCLUDE_END;
|
||||||
|
}
|
||||||
|
|
||||||
public SubjectCode getSubjectCode() {
|
|
||||||
return subjectCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String toCiiXml(){
|
|
||||||
String result = INCLUDE_START + CONTENT_START +
|
|
||||||
XMLTools.encodeXML(getContent() )+ CONTENT_END;
|
|
||||||
if (getSubjectCode() != null) {
|
|
||||||
result += SUBJECT_CODE_START + getSubjectCode() + SUBJECT_CODE_END;
|
|
||||||
}
|
|
||||||
return result + INCLUDE_END;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,10 +21,7 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.*;
|
import org.mustangproject.ZUGFeRD.*;
|
||||||
@@ -66,6 +63,7 @@ public class Invoice implements IExportableTransaction {
|
|||||||
protected String despatchAdviceReferencedDocumentID = null;
|
protected String despatchAdviceReferencedDocumentID = null;
|
||||||
protected String vatDueDateTypeCode = null;
|
protected String vatDueDateTypeCode = null;
|
||||||
protected String creditorReferenceID; // required when direct debit is used.
|
protected String creditorReferenceID; // required when direct debit is used.
|
||||||
|
private BigDecimal roundingAmount=null;
|
||||||
|
|
||||||
public Invoice() {
|
public Invoice() {
|
||||||
ZFItems = new ArrayList<>();
|
ZFItems = new ArrayList<>();
|
||||||
@@ -115,6 +113,16 @@ public class Invoice implements IExportableTransaction {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* setter in case e.g. jackson tries to map attachments (normal use embedFileInXML)
|
||||||
|
* @param fileArr Array of FileAttachments
|
||||||
|
* @return fluent setter
|
||||||
|
*/
|
||||||
|
public Invoice setAdditionalReferencedDocuments(FileAttachment[] fileArr) {
|
||||||
|
xmlEmbeddedFiles = new ArrayList<>(Arrays.asList(fileArr));
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IZUGFeRDCashDiscount[] getCashDiscounts() {
|
public IZUGFeRDCashDiscount[] getCashDiscounts() {
|
||||||
return cashDiscounts.toArray(new IZUGFeRDCashDiscount[0]);
|
return cashDiscounts.toArray(new IZUGFeRDCashDiscount[0]);
|
||||||
@@ -412,6 +420,11 @@ public class Invoice implements IExportableTransaction {
|
|||||||
return includedNotes;
|
return includedNotes;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Invoice setNotesWithSubjectCode(List<IncludedNote> theList) {
|
||||||
|
includedNotes=theList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCurrency() {
|
public String getCurrency() {
|
||||||
return currency;
|
return currency;
|
||||||
@@ -467,6 +480,26 @@ public class Invoice implements IExportableTransaction {
|
|||||||
return sender;
|
return sender;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* for currency rounding differences to 5ct e.g. in Netherlands ("Rappenrundung")
|
||||||
|
* @return null if not set, otherwise BigDecimal of Euros
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public BigDecimal getRoundingAmount() {
|
||||||
|
return roundingAmount;
|
||||||
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
* set the cent e.g. to reach the next 5ct mark for currencies in certain countries
|
||||||
|
* e.g. in the Netherlands ("Rappenrundung")
|
||||||
|
* @param amount
|
||||||
|
* @return fluent setter
|
||||||
|
*/
|
||||||
|
public Invoice setRoundingAmount(BigDecimal amount) {
|
||||||
|
roundingAmount=amount;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* sets a named sender contact
|
* sets a named sender contact
|
||||||
* @deprecated use setSender
|
* @deprecated use setSender
|
||||||
@@ -524,8 +557,8 @@ public class Invoice implements IExportableTransaction {
|
|||||||
|
|
||||||
/***
|
/***
|
||||||
* this is wrong and only used from jackson
|
* this is wrong and only used from jackson
|
||||||
* @param iza
|
* @param iza the Array of allowances/charges
|
||||||
* @return
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
public Invoice setZFAllowances(Allowance[] iza) {
|
public Invoice setZFAllowances(Allowance[] iza) {
|
||||||
Allowances=new ArrayList<>();
|
Allowances=new ArrayList<>();
|
||||||
@@ -548,8 +581,8 @@ public class Invoice implements IExportableTransaction {
|
|||||||
|
|
||||||
/***
|
/***
|
||||||
* this is wrong and only used from jackson
|
* this is wrong and only used from jackson
|
||||||
* @param iza
|
* @param iza the array of charges
|
||||||
* @return
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
public Invoice setZFCharges(Charge[] iza) {
|
public Invoice setZFCharges(Charge[] iza) {
|
||||||
Charges=new ArrayList<>();
|
Charges=new ArrayList<>();
|
||||||
|
|||||||
@@ -12,7 +12,11 @@ import org.w3c.dom.NodeList;
|
|||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Collection;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* describes any invoice line
|
* describes any invoice line
|
||||||
@@ -37,6 +41,8 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
protected ArrayList<ReferencedDocument> additionalReference = null;
|
protected ArrayList<ReferencedDocument> additionalReference = null;
|
||||||
protected ArrayList<IZUGFeRDAllowanceCharge> Allowances = new ArrayList<>();
|
protected ArrayList<IZUGFeRDAllowanceCharge> Allowances = new ArrayList<>();
|
||||||
protected ArrayList<IZUGFeRDAllowanceCharge> Charges = new ArrayList<>();
|
protected ArrayList<IZUGFeRDAllowanceCharge> Charges = new ArrayList<>();
|
||||||
|
protected List<IncludedNote> includedNotes = null;
|
||||||
|
//protected HashMap<String, String> attributes = new HashMap<>();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* default constructor
|
* default constructor
|
||||||
@@ -64,11 +70,39 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
// ubl
|
// ubl
|
||||||
//we need: name description unitcode
|
//we need: name description unitcode
|
||||||
//and we additionally have vat%
|
//and we additionally have vat%
|
||||||
setProduct(new Product());
|
|
||||||
|
// Bharti's homework 20241126:Streams https://www.youtube.com/watch?v=Lf01cBzmuXw
|
||||||
|
// and Lambdas https://www.youtube.com/watch?v=HCyx31NW8xg
|
||||||
|
setProduct(new Product(itemMap.getNode("Item").get()));
|
||||||
icnm.getAsString("Name").ifPresent(product::setName);
|
icnm.getAsString("Name").ifPresent(product::setName);
|
||||||
|
icnm.getAsString("Description").ifPresent(product::setDescription);
|
||||||
|
|
||||||
|
icnm.getAsNodeMap("SellersItemIdentification").ifPresent(SellersItemIdentification -> {
|
||||||
|
SellersItemIdentification.getAsString("ID").ifPresent(product::setSellerAssignedID);
|
||||||
|
});
|
||||||
|
|
||||||
|
icnm.getAsNodeMap("BuyersItemIdentification").ifPresent(BuyersItemIdentification -> {
|
||||||
|
BuyersItemIdentification.getAsString("ID").ifPresent(product::setBuyerAssignedID);
|
||||||
|
});
|
||||||
|
|
||||||
|
// String name = icnm.getAsStringOrNull("Name");
|
||||||
|
// String val = icnm.getAsStringOrNull("Value");
|
||||||
|
// if (name != null && val != null) {
|
||||||
|
// if (attributes == null) {
|
||||||
|
// attributes = new HashMap<>();
|
||||||
|
// }
|
||||||
|
// product.attributes.put(name, val);
|
||||||
|
// }
|
||||||
|
//icnm.getNode("AdditionalItemProperty").flatMap(n ->n.getAttributes()).ifPresent(product::setAttributes);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
icnm.getAsNodeMap("ClassifiedTaxCategory").flatMap(m -> m.getAsBigDecimal("Percent"))
|
icnm.getAsNodeMap("ClassifiedTaxCategory").flatMap(m -> m.getAsBigDecimal("Percent"))
|
||||||
.ifPresent(product::setVATPercent);
|
.ifPresent(product::setVATPercent);
|
||||||
});
|
});
|
||||||
|
itemMap.getAsNodeMap("AssociatedDocumentLineDocument").ifPresent(icnm -> {
|
||||||
|
icnm.getAsString("LineID").ifPresent(this::setId);
|
||||||
|
});
|
||||||
|
|
||||||
itemMap.getAsNodeMap("Price").ifPresent(icnm -> {
|
itemMap.getAsNodeMap("Price").ifPresent(icnm -> {
|
||||||
// ubl
|
// ubl
|
||||||
@@ -83,21 +117,43 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
product.setUnit(icn.getAttributes().getNamedItem("unitCode").getNodeValue());
|
product.setUnit(icn.getAttributes().getNamedItem("unitCode").getNodeValue());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
itemMap.getAllNodes("DocumentReference").map(ReferencedDocument::fromNode)
|
||||||
|
.forEach(this::addAdditionalReference);
|
||||||
|
|
||||||
|
// ubl
|
||||||
|
|
||||||
|
itemMap.getAsNodeMap("OrderLineReference")
|
||||||
|
// ubl
|
||||||
|
.flatMap(bordNodes -> bordNodes.getAsString("LineID"))
|
||||||
|
.ifPresent(this::addReferencedLineID);
|
||||||
|
|
||||||
|
itemMap.getAsString("ID")
|
||||||
|
.ifPresent(this::setId);
|
||||||
|
|
||||||
|
|
||||||
|
itemMap.getAsString("Note")
|
||||||
|
.ifPresent(this::addNote);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
itemMap.getAsNodeMap("SpecifiedLineTradeAgreement", "SpecifiedSupplyChainTradeAgreement").ifPresent(icnm -> {
|
itemMap.getAsNodeMap("SpecifiedLineTradeAgreement", "SpecifiedSupplyChainTradeAgreement").ifPresent(icnm -> {
|
||||||
icnm.getAsNodeMap("BuyerOrderReferencedDocument")
|
icnm.getAsNodeMap("BuyerOrderReferencedDocument")
|
||||||
.flatMap(bordNodes -> bordNodes.getAsString("LineID"))
|
.flatMap(bordNodes -> bordNodes.getAsString("LineID"))
|
||||||
.ifPresent(this::addReferencedLineID);
|
.ifPresent(this::addReferencedLineID);
|
||||||
|
|
||||||
|
|
||||||
icnm.getAsNodeMap("NetPriceProductTradePrice").ifPresent(npptpNodes -> {
|
icnm.getAsNodeMap("NetPriceProductTradePrice").ifPresent(npptpNodes -> {
|
||||||
npptpNodes.getAsBigDecimal("ChargeAmount").ifPresent(this::setPrice);
|
npptpNodes.getAsBigDecimal("ChargeAmount").ifPresent(this::setPrice);
|
||||||
npptpNodes.getAsBigDecimal("BasisQuantity").ifPresent(this::setBasisQuantity);
|
npptpNodes.getAsBigDecimal("BasisQuantity").ifPresent(this::setBasisQuantity);
|
||||||
});
|
});
|
||||||
|
|
||||||
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode)
|
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).
|
||||||
.forEach(this::addReferencedDocument);
|
forEach(this::addReferencedDocument);
|
||||||
});
|
});
|
||||||
|
|
||||||
itemMap.getNode("SpecifiedTradeProduct").map(Product::new).ifPresent(this::setProduct);
|
itemMap.getNode("SpecifiedTradeProduct").map(Product::new).ifPresent(this::setProduct);//CII
|
||||||
|
itemMap.getNode("SpecifiedTradeProduct").map(Product::new).ifPresent(this::setProduct);//UBL
|
||||||
|
|
||||||
// RequestedQuantity is for Order-X, BilledQuantity for FX and ZF
|
// RequestedQuantity is for Order-X, BilledQuantity for FX and ZF
|
||||||
itemMap.getAsNodeMap("SpecifiedLineTradeDelivery", "SpecifiedSupplyChainTradeDelivery")
|
itemMap.getAsNodeMap("SpecifiedLineTradeDelivery", "SpecifiedSupplyChainTradeDelivery")
|
||||||
@@ -125,6 +181,37 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
|
|
||||||
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).forEach(this::addAdditionalReference);
|
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).forEach(this::addAdditionalReference);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
itemMap.getAsNodeMap("AssociatedDocumentLineDocument").ifPresent(adld -> {
|
||||||
|
List<IncludedNote> includedNotes = new ArrayList<>();
|
||||||
|
adld.getAllNodes("IncludedNote").forEach(item -> {
|
||||||
|
String subjectCode = "";
|
||||||
|
String content = null;
|
||||||
|
NodeList includedNodeChilds = item.getChildNodes();
|
||||||
|
for (int issueDateChildIndex = 0; issueDateChildIndex < includedNodeChilds.getLength(); issueDateChildIndex++) {
|
||||||
|
if ((includedNodeChilds.item(issueDateChildIndex).getLocalName() != null)
|
||||||
|
&& (includedNodeChilds.item(issueDateChildIndex).getLocalName().equals("Content"))) {
|
||||||
|
content = XMLTools.trimOrNull(includedNodeChilds.item(issueDateChildIndex));
|
||||||
|
}
|
||||||
|
if ((includedNodeChilds.item(issueDateChildIndex).getLocalName() != null)
|
||||||
|
&& (includedNodeChilds.item(issueDateChildIndex).getLocalName().equals("SubjectCode"))) {
|
||||||
|
subjectCode = XMLTools.trimOrNull(includedNodeChilds.item(issueDateChildIndex));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
boolean foundCode = false;
|
||||||
|
for (SubjectCode code : SubjectCode.values()) {
|
||||||
|
if (code.toString().equals(subjectCode)) {
|
||||||
|
includedNotes.add(new IncludedNote(content, code));
|
||||||
|
foundCode = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!foundCode) {
|
||||||
|
includedNotes.add(new IncludedNote(content, null));
|
||||||
|
}
|
||||||
|
});
|
||||||
|
addNotes(includedNotes);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public Item addReferencedLineID(String s) {
|
public Item addReferencedLineID(String s) {
|
||||||
@@ -145,6 +232,11 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
return lineTotalAmount;
|
return lineTotalAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Item setNotesWithSubjectCode(List<IncludedNote> theList) {
|
||||||
|
includedNotes=theList;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* should only be set by calculator classes or maybe when reading from XML
|
* should only be set by calculator classes or maybe when reading from XML
|
||||||
*
|
*
|
||||||
@@ -290,6 +382,13 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
notes = new ArrayList<>();
|
notes = new ArrayList<>();
|
||||||
}
|
}
|
||||||
notes.add(text);
|
notes.add(text);
|
||||||
|
|
||||||
|
if (includedNotes == null) {
|
||||||
|
includedNotes = new ArrayList<>();
|
||||||
|
}
|
||||||
|
includedNotes.add(IncludedNote.unspecifiedNote(text));
|
||||||
|
|
||||||
|
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -372,4 +471,19 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
return detailedDeliveryPeriodTo;
|
return detailedDeliveryPeriodTo;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IZUGFeRDExportableItem addNotes(Collection<IncludedNote> notes) {
|
||||||
|
if (notes == null) {
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
if (includedNotes == null) {
|
||||||
|
includedNotes = new ArrayList<>();
|
||||||
|
}
|
||||||
|
includedNotes.addAll(notes);
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<IncludedNote> getNotesWithSubjectCode() {
|
||||||
|
return includedNotes;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.*;
|
import org.mustangproject.ZUGFeRD.*;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
import org.w3c.dom.NodeList;
|
import org.w3c.dom.NodeList;
|
||||||
@@ -9,6 +10,7 @@ import org.w3c.dom.NodeList;
|
|||||||
* A organisation, i.e. usually a company
|
* A organisation, i.e. usually a company
|
||||||
*/
|
*/
|
||||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class LegalOrganisation implements IZUGFeRDLegalOrganisation {
|
public class LegalOrganisation implements IZUGFeRDLegalOrganisation {
|
||||||
|
|
||||||
protected SchemedID schemedID = null;
|
protected SchemedID schemedID = null;
|
||||||
|
|||||||
@@ -2,10 +2,12 @@ package org.mustangproject;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonSetter;
|
||||||
import org.mustangproject.ZUGFeRD.IDesignatedProductClassification;
|
import org.mustangproject.ZUGFeRD.IDesignatedProductClassification;
|
||||||
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableProduct;
|
import org.mustangproject.ZUGFeRD.IZUGFeRDExportableProduct;
|
||||||
import org.mustangproject.util.NodeMap;
|
import org.mustangproject.util.NodeMap;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
import org.w3c.dom.NodeList;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@@ -22,15 +24,16 @@ import java.util.Map;
|
|||||||
|
|
||||||
public class Product implements IZUGFeRDExportableProduct {
|
public class Product implements IZUGFeRDExportableProduct {
|
||||||
protected String unit, name, sellerAssignedID, buyerAssignedID;
|
protected String unit, name, sellerAssignedID, buyerAssignedID;
|
||||||
protected String description="";
|
protected String description = "";
|
||||||
protected String taxExemptionReason=null;
|
protected String taxExemptionReason = null;
|
||||||
protected String taxCategoryCode=null;
|
protected String taxCategoryCode = null;
|
||||||
protected BigDecimal VATPercent;
|
protected BigDecimal VATPercent;
|
||||||
protected boolean isReverseCharge = false;
|
protected boolean isReverseCharge = false;
|
||||||
protected boolean isIntraCommunitySupply = false;
|
protected boolean isIntraCommunitySupply = false;
|
||||||
protected SchemedID globalId = null;
|
protected SchemedID globalId = null;
|
||||||
protected String countryOfOrigin = null;
|
protected String countryOfOrigin = null;
|
||||||
protected HashMap<String, String> attributes = new HashMap<>();
|
protected HashMap<String, String> attributes = new HashMap<>();
|
||||||
|
|
||||||
protected List<IDesignatedProductClassification> classifications = new ArrayList<>();
|
protected List<IDesignatedProductClassification> classifications = new ArrayList<>();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
@@ -59,11 +62,13 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
nodeMap.getAsString("SellerAssignedID").ifPresent(this::setSellerAssignedID);
|
nodeMap.getAsString("SellerAssignedID").ifPresent(this::setSellerAssignedID);
|
||||||
nodeMap.getAsString("BuyerAssignedID").ifPresent(this::setBuyerAssignedID);
|
nodeMap.getAsString("BuyerAssignedID").ifPresent(this::setBuyerAssignedID);
|
||||||
nodeMap.getAsString("Name").ifPresent(this::setName);
|
nodeMap.getAsString("Name").ifPresent(this::setName);
|
||||||
nodeMap.getAsString("Description").ifPresent(this::setDescription);
|
nodeMap.getAsString("Description").ifPresent(this::setDescription);
|
||||||
|
|
||||||
|
|
||||||
nodeMap.getAsNodeMap("ApplicableProductCharacteristic").ifPresent(apcNodes -> {
|
nodeMap.getAsNodeMap("ApplicableProductCharacteristic").ifPresent(apcNodes -> {
|
||||||
String key = apcNodes.getAsStringOrNull("Description");
|
String key = apcNodes.getAsStringOrNull("Description");
|
||||||
String value = apcNodes.getAsStringOrNull("Value");
|
String value = apcNodes.getAsStringOrNull("Value");
|
||||||
@@ -75,6 +80,26 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//UBL
|
||||||
|
nodeMap.getAsNodeMap("AdditionalItemProperty").ifPresent(aipNodes -> {
|
||||||
|
String name = aipNodes.getAsStringOrNull("Name");
|
||||||
|
String val = aipNodes.getAsStringOrNull("Value");
|
||||||
|
if (name != null && val != null) {
|
||||||
|
if (attributes == null) {
|
||||||
|
attributes = new HashMap<>();
|
||||||
|
}
|
||||||
|
attributes.put(name, val);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
nodeMap.getAsNodeMap("CommodityClassification").ifPresent(dpcNodes -> {
|
||||||
|
String className = dpcNodes.getAsStringOrNull("ClassName");
|
||||||
|
dpcNodes.getNode("ItemClassificationCode").map(ClassCode::fromNode).ifPresent(classCode ->
|
||||||
|
classifications.add(new DesignatedProductClassification(classCode, className)));
|
||||||
|
});
|
||||||
|
|
||||||
|
//UBL
|
||||||
nodeMap.getAsNodeMap("DesignatedProductClassification").ifPresent(dpcNodes -> {
|
nodeMap.getAsNodeMap("DesignatedProductClassification").ifPresent(dpcNodes -> {
|
||||||
String className = dpcNodes.getAsStringOrNull("ClassName");
|
String className = dpcNodes.getAsStringOrNull("ClassName");
|
||||||
dpcNodes.getNode("ClassCode").map(ClassCode::fromNode).ifPresent(classCode ->
|
dpcNodes.getNode("ClassCode").map(ClassCode::fromNode).ifPresent(classCode ->
|
||||||
@@ -115,6 +140,7 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
*
|
*
|
||||||
* @return e.g. intra-commnunity supply or small business
|
* @return e.g. intra-commnunity supply or small business
|
||||||
@@ -129,7 +155,7 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
* @param taxExemptionReasonText String e.g. Kleinunternehmer gemäß §19 UStG https://github.com/ZUGFeRD/mustangproject/issues/463
|
* @param taxExemptionReasonText String e.g. Kleinunternehmer gemäß §19 UStG https://github.com/ZUGFeRD/mustangproject/issues/463
|
||||||
* @return fluent setter
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
public Product setTaxExemptionReason(String taxExemptionReasonText) {
|
public Product setTaxExemptionReason(String taxExemptionReasonText) {
|
||||||
taxExemptionReason = taxExemptionReasonText;
|
taxExemptionReason = taxExemptionReasonText;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -151,7 +177,7 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
* @param code e.g. S (normal tax), Z=zero rated, E (e.g. small business) or K (intrra community supply) see also https://github.com/ZUGFeRD/mustangproject/issues/463
|
* @param code e.g. S (normal tax), Z=zero rated, E (e.g. small business) or K (intrra community supply) see also https://github.com/ZUGFeRD/mustangproject/issues/463
|
||||||
* @return fluent setter
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
public Product setTaxCategoryCode(String code) {
|
public Product setTaxCategoryCode(String code) {
|
||||||
taxCategoryCode = code;
|
taxCategoryCode = code;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@@ -278,18 +304,22 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
* @return fluent setter
|
* @return fluent setter
|
||||||
*/
|
*/
|
||||||
public Product setVATPercent(BigDecimal VATPercent) {
|
public Product setVATPercent(BigDecimal VATPercent) {
|
||||||
this.VATPercent = VATPercent;
|
if (VATPercent == null) {
|
||||||
|
this.VATPercent = BigDecimal.ZERO;
|
||||||
|
} else {
|
||||||
|
this.VATPercent = VATPercent;
|
||||||
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getCountryOfOrigin() {
|
public String getCountryOfOrigin() {
|
||||||
return this.countryOfOrigin;
|
return this.countryOfOrigin;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Product setCountryOfOrigin(String countryOfOrigin) {
|
public Product setCountryOfOrigin(String countryOfOrigin) {
|
||||||
this.countryOfOrigin = countryOfOrigin;
|
this.countryOfOrigin = countryOfOrigin;
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -302,16 +332,16 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Product setAttributes(Map<String, String> attributes) {
|
public Product setAttributes(Map<String, String> attributes) {
|
||||||
this.attributes.clear();
|
this.attributes.clear();
|
||||||
if (attributes != null) {
|
if (attributes != null) {
|
||||||
this.attributes.putAll(attributes);
|
this.attributes.putAll(attributes);
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Product addAttribute(String name, String value ) {
|
public Product addAttribute(String name, String value) {
|
||||||
this.attributes.put(name, value);
|
this.attributes.put(name, value);
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@@ -337,6 +367,23 @@ public class Product implements IZUGFeRDExportableProduct {
|
|||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Provide Jackson a hint as to use DesignatedProductClassification for the
|
||||||
|
* IDesignatedProductClassification product classifications
|
||||||
|
*
|
||||||
|
* @param classifications the new set of classifications
|
||||||
|
* @return fluent setter
|
||||||
|
*/
|
||||||
|
@JsonSetter("classifications")
|
||||||
|
public Product setClassificationsClass(DesignatedProductClassification[] classifications) {
|
||||||
|
this.classifications.clear();
|
||||||
|
if (classifications != null) {
|
||||||
|
this.classifications.addAll(Arrays.asList(classifications));
|
||||||
|
}
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a {@link IDesignatedProductClassification} classification
|
* Add a {@link IDesignatedProductClassification} classification
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import org.mustangproject.ZUGFeRD.IReferencedDocument;
|
import org.mustangproject.ZUGFeRD.IReferencedDocument;
|
||||||
import org.mustangproject.util.NodeMap;
|
import org.mustangproject.util.NodeMap;
|
||||||
import org.w3c.dom.Node;
|
import org.w3c.dom.Node;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class ReferencedDocument implements IReferencedDocument {
|
public class ReferencedDocument implements IReferencedDocument {
|
||||||
|
|
||||||
String issuerAssignedID;
|
String issuerAssignedID;
|
||||||
@@ -22,7 +26,7 @@ public class ReferencedDocument implements IReferencedDocument {
|
|||||||
this.referenceTypeCode = referenceTypeCode;
|
this.referenceTypeCode = referenceTypeCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* sets an ID assigned by the sender
|
* sets an ID assigned by the sender
|
||||||
* @param issuerAssignedID the ID as a string :-)
|
* @param issuerAssignedID the ID as a string :-)
|
||||||
*/
|
*/
|
||||||
@@ -66,8 +70,8 @@ public class ReferencedDocument implements IReferencedDocument {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
NodeMap nodes = new NodeMap(node);
|
NodeMap nodes = new NodeMap(node);
|
||||||
return new ReferencedDocument(nodes.getAsStringOrNull("IssuerAssignedID"),
|
return new ReferencedDocument(nodes.getAsStringOrNull("IssuerAssignedID", "ID"),
|
||||||
nodes.getAsStringOrNull("TypeCode"),
|
nodes.getAsStringOrNull("TypeCode", "DocumentTypeCode"),
|
||||||
nodes.getAsStringOrNull("ReferenceTypeCode"));
|
nodes.getAsStringOrNull("ReferenceTypeCode"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,11 @@
|
|||||||
package org.mustangproject;
|
package org.mustangproject;
|
||||||
|
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
|
|
||||||
|
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||||
|
@JsonInclude(JsonInclude.Include.NON_EMPTY)
|
||||||
public class SchemedID {
|
public class SchemedID {
|
||||||
protected String scheme;
|
protected String scheme;
|
||||||
protected String id;
|
protected String id;
|
||||||
|
|||||||
@@ -36,5 +36,9 @@ public enum SubjectCode {
|
|||||||
/**
|
/**
|
||||||
* Discount and bonus agreements
|
* Discount and bonus agreements
|
||||||
*/
|
*/
|
||||||
AAK
|
AAK,
|
||||||
|
/**
|
||||||
|
* Vehicle licence number
|
||||||
|
*/
|
||||||
|
ABZ
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package org.mustangproject;
|
|||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
@@ -16,6 +17,7 @@ import org.w3c.dom.NodeList;
|
|||||||
import com.fasterxml.jackson.annotation.JsonIgnore;
|
import com.fasterxml.jackson.annotation.JsonIgnore;
|
||||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||||
|
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* A organisation, i.e. usually a company
|
* A organisation, i.e. usually a company
|
||||||
*/
|
*/
|
||||||
@@ -62,6 +64,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
protected void parseFromUBL(NodeList nodes) {
|
protected void parseFromUBL(NodeList nodes) {
|
||||||
if (nodes.getLength() > 0) {
|
if (nodes.getLength() > 0) {
|
||||||
|
|
||||||
@@ -71,8 +74,34 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
|
|
||||||
if (currentItemNode.getLocalName() != null) {
|
if (currentItemNode.getLocalName() != null) {
|
||||||
String currentUBLChild = currentItemNode.getLocalName();
|
String currentUBLChild = currentItemNode.getLocalName();
|
||||||
if (currentUBLChild.equals("Party")) {
|
// if (currentUBLChild.equals("Delivery")) {
|
||||||
|
// NodeList delivery = currentItemNode.getChildNodes();
|
||||||
|
// for (int deliveryIndex = 0; deliveryIndex < delivery.getLength(); deliveryIndex++) {
|
||||||
|
// if (delivery.item(deliveryIndex).getLocalName() != null) {
|
||||||
|
// Node currentNode = delivery.item(deliveryIndex);
|
||||||
|
// if (currentNode.getLocalName().equals("DeliveryLocation")) {
|
||||||
|
// NodeList deliveryLocation = currentNode.getChildNodes();
|
||||||
|
// for (int deliveryLocationIndex = 0; deliveryLocationIndex < deliveryLocation.getLength(); deliveryLocationIndex++) {
|
||||||
|
// if (deliveryLocation.item(deliveryLocationIndex).getLocalName() != null) {
|
||||||
|
// if (deliveryLocation.item(deliveryLocationIndex).getLocalName().equals("ID")) {
|
||||||
|
// //Node currentNode = partyID.item(partyIDIndex);
|
||||||
|
// setID(deliveryLocation.item(deliveryLocationIndex).getTextContent());
|
||||||
|
// if ((deliveryLocation.item(deliveryLocationIndex).getAttributes() != null &&
|
||||||
|
// (deliveryLocation.item(deliveryLocationIndex).getAttributes().getNamedItem("schemeID") != null))
|
||||||
|
// ) {
|
||||||
|
// SchemedID sID = new SchemedID().setScheme(deliveryLocation.item(deliveryLocationIndex).getAttributes().getNamedItem("schemeID").getTextContent());
|
||||||
|
// addGlobalID(sID);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
if (currentUBLChild.equals("Party")) {
|
||||||
NodeList party = currentItemNode.getChildNodes();
|
NodeList party = currentItemNode.getChildNodes();
|
||||||
for (int partyIndex = 0; partyIndex < party.getLength(); partyIndex++) {
|
for (int partyIndex = 0; partyIndex < party.getLength(); partyIndex++) {
|
||||||
if (party.item(partyIndex).getLocalName() != null) {
|
if (party.item(partyIndex).getLocalName() != null) {
|
||||||
@@ -90,42 +119,64 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (party.item(partyIndex).getLocalName().equals("EndpointID")) {
|
||||||
|
Node currentNode = party.item(partyIndex);
|
||||||
|
if ((currentNode.getAttributes() != null &&
|
||||||
|
(currentNode.getAttributes().getNamedItem("schemeID") != null))
|
||||||
|
&& (party.item(partyIndex).getAttributes().getNamedItem("schemeID").getNodeValue().equals("EM"))
|
||||||
|
) {
|
||||||
|
setEmail(currentNode.getTextContent());
|
||||||
|
}
|
||||||
|
|
||||||
if (currentTopElementName.equals("PartyTaxScheme")) {
|
}
|
||||||
NodeList partyTaxScheme = party.item(partyIndex).getChildNodes();
|
if (currentTopElementName.equals("PartyIdentification")) {
|
||||||
for (int partyTaxSchemeIndex = 0; partyTaxSchemeIndex < partyTaxScheme.getLength(); partyTaxSchemeIndex++) {
|
NodeList partyID = party.item(partyIndex).getChildNodes();
|
||||||
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName() != null) {
|
for (int partyIDIndex = 0; partyIDIndex < partyID.getLength(); partyIDIndex++) {
|
||||||
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName().equals("CompanyID")) {
|
if (partyID.item(partyIDIndex).getLocalName() != null) {
|
||||||
setTaxID(partyTaxScheme.item(partyTaxSchemeIndex).getTextContent());
|
if (partyID.item(partyIDIndex).getLocalName().equals("ID")) {
|
||||||
|
Node currentNode = partyID.item(partyIDIndex);
|
||||||
|
if ((currentNode.getAttributes() != null &&
|
||||||
|
(currentNode.getAttributes().getNamedItem("schemeID") != null))
|
||||||
|
) {
|
||||||
|
SchemedID sID = new SchemedID().setScheme(currentNode.getAttributes().getNamedItem("schemeID").getTextContent()).setId(currentNode.getTextContent());
|
||||||
|
addGlobalID(sID);
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
setID(currentNode.getTextContent());
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (currentTopElementName.equals("PartyTaxScheme")) {
|
||||||
|
NodeList partyTaxScheme = party.item(partyIndex).getChildNodes();
|
||||||
|
String CompanyId = null;
|
||||||
|
for (int partyTaxSchemeIndex = 0; partyTaxSchemeIndex < partyTaxScheme.getLength(); partyTaxSchemeIndex++) {
|
||||||
|
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName() != null) {
|
||||||
|
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName().equals("CompanyID")) {
|
||||||
|
CompanyId = (partyTaxScheme.item(partyTaxSchemeIndex).getTextContent());
|
||||||
|
}
|
||||||
|
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName().equals("TaxScheme")) {
|
||||||
|
NodeList taxSchemechilds = partyTaxScheme.item(partyTaxSchemeIndex).getChildNodes();
|
||||||
|
for (int taxSchemechildsIndex = 0; taxSchemechildsIndex < taxSchemechilds.getLength(); taxSchemechildsIndex++) {
|
||||||
|
if (taxSchemechilds.item(taxSchemechildsIndex).getLocalName() != null) {
|
||||||
|
if (taxSchemechilds.item(taxSchemechildsIndex).getTextContent().equals("FC") || (taxSchemechilds.item(taxSchemechildsIndex).getTextContent().equals("NOVAT"))) {
|
||||||
|
setTaxID(CompanyId);
|
||||||
|
} else {
|
||||||
|
setVATID(CompanyId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// if (currentTopElementName.equals("PartyTaxScheme")) {
|
|
||||||
// NodeList partyTaxScheme = party.item(partyIndex).getChildNodes();
|
|
||||||
// for (int partyTaxSchemeIndex = 0; partyTaxSchemeIndex < partyTaxScheme.getLength(); partyTaxSchemeIndex++) {
|
|
||||||
// if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName() != null) {
|
|
||||||
// if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName().equals("TaxScheme")) {
|
|
||||||
// NodeList taxScheme = partyTaxScheme.item(partyTaxSchemeIndex).getChildNodes();
|
|
||||||
// for (int taxSchemeIndex = 0 ; taxSchemeIndex < taxScheme.getLength(); taxSchemeIndex++) {
|
|
||||||
// if (taxScheme.item(taxSchemeIndex).getLocalName() != null) {
|
|
||||||
// if(taxScheme.item(taxSchemeIndex).getLocalName().equals("ID")){
|
|
||||||
// if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName().equals("CompanyID")) {
|
|
||||||
// setTaxID(partyTaxScheme.item(partyTaxSchemeIndex).getTextContent());
|
|
||||||
// } else {
|
|
||||||
// setVATID(partyTaxScheme.item(partyTaxSchemeIndex).getTextContent());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
/*
|
/*
|
||||||
UBL only: formally it can have a name as well but BT27 party name *should* be stored in
|
UBL only: formally it can have a name as well but BT27 party name *should* be stored in
|
||||||
so overwrite if one exists
|
so overwrite if one exists
|
||||||
@@ -133,17 +184,37 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
|
|
||||||
if (currentTopElementName.equals("PartyLegalEntity")) {
|
if (currentTopElementName.equals("PartyLegalEntity")) {
|
||||||
NodeList legal = party.item(partyIndex).getChildNodes();
|
NodeList legal = party.item(partyIndex).getChildNodes();
|
||||||
|
LegalOrganisation lo = null;
|
||||||
for (int legalChildIndex = 0; legalChildIndex < legal.getLength(); legalChildIndex++) {
|
for (int legalChildIndex = 0; legalChildIndex < legal.getLength(); legalChildIndex++) {
|
||||||
if (legal.item(legalChildIndex).getLocalName() != null) {
|
if (legal.item(legalChildIndex).getLocalName() != null) {
|
||||||
|
|
||||||
if (legal.item(legalChildIndex).getLocalName().equals("RegistrationName")) {
|
if (legal.item(legalChildIndex).getLocalName().equals("RegistrationName")) {
|
||||||
setName(legal.item(legalChildIndex).getTextContent());
|
if (lo == null) {
|
||||||
|
lo = new LegalOrganisation();
|
||||||
|
}
|
||||||
|
lo.setTradingBusinessName(legal.item(legalChildIndex).getTextContent());
|
||||||
}
|
}
|
||||||
if (legal.item(legalChildIndex).getLocalName().equals("CompanyLegalForm")) {
|
if (legal.item(legalChildIndex).getLocalName().equals("CompanyLegalForm")) {
|
||||||
setDescription(legal.item(legalChildIndex).getTextContent());
|
setDescription(legal.item(legalChildIndex).getTextContent());
|
||||||
}
|
}
|
||||||
|
if (legal.item(legalChildIndex).getLocalName().equals("CompanyID")) {
|
||||||
|
if (lo == null) {
|
||||||
|
lo = new LegalOrganisation();
|
||||||
|
}
|
||||||
|
if (legal.item(legalChildIndex).getAttributes().getNamedItem("schemeID")!=null) {
|
||||||
|
SchemedID sid = new SchemedID(legal.item(legalChildIndex).getAttributes().getNamedItem("schemeID").getNodeValue(), legal.item(legalChildIndex).getTextContent());
|
||||||
|
lo.setSchemedID(sid);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// we dont have that attribute yet in the legalorganisation: CompanyLegalForm
|
||||||
|
if (lo != null) {
|
||||||
|
setLegalOrganisation(lo);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTopElementName.equals("PostalAddress")) {
|
if (currentTopElementName.equals("PostalAddress")) {
|
||||||
|
|
||||||
NodeList postal = party.item(partyIndex).getChildNodes();
|
NodeList postal = party.item(partyIndex).getChildNodes();
|
||||||
@@ -191,8 +262,6 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("Name")) {
|
if (postal.item(postalChildIndex).getLocalName().equals("Name")) {
|
||||||
setName(postal.item(postalChildIndex).getTextContent());
|
setName(postal.item(postalChildIndex).getTextContent());
|
||||||
@@ -210,7 +279,6 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentUBLChild.equals("GlobalID")) {
|
if (currentUBLChild.equals("GlobalID")) {
|
||||||
@@ -224,57 +292,6 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
NodeList contact = nodes.item(nodeIndex).getChildNodes();
|
NodeList contact = nodes.item(nodeIndex).getChildNodes();
|
||||||
setContact(new Contact(contact));
|
setContact(new Contact(contact));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentUBLChild.equals("PostalTradeAddress")) {
|
|
||||||
NodeList postal = nodes.item(nodeIndex).getChildNodes();
|
|
||||||
for (int postalChildIndex = 0; postalChildIndex < postal.getLength(); postalChildIndex++) {
|
|
||||||
if (postal.item(postalChildIndex).getLocalName() != null) {
|
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("LineOne")) {
|
|
||||||
setStreet(postal.item(postalChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("LineTwo")) {
|
|
||||||
setAdditionalAddress(postal.item(postalChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("LineThree")) {
|
|
||||||
setAdditionalAddressExtension(postal.item(postalChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("CityName")) {
|
|
||||||
setLocation(postal.item(postalChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("PostcodeCode")) {
|
|
||||||
setZIP(postal.item(postalChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
if (postal.item(postalChildIndex).getLocalName().equals("CountryID")) {
|
|
||||||
setCountry(postal.item(postalChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
if (currentUBLChild.equals("PartyTaxScheme")) {
|
|
||||||
NodeList taxChilds = nodes.item(nodeIndex).getChildNodes();
|
|
||||||
for (int taxChildIndex = 0; taxChildIndex < taxChilds.getLength(); taxChildIndex++) {
|
|
||||||
if (taxChilds.item(taxChildIndex).getLocalName() != null) {
|
|
||||||
if ((taxChilds.item(taxChildIndex).getLocalName().equals("TaxScheme"))) {
|
|
||||||
if (taxChilds.item(taxChildIndex).getLocalName().equals("CompanyID")) {
|
|
||||||
if (taxChilds.item(taxChildIndex).getLocalName().equals("ID")) {
|
|
||||||
if (taxChilds.item(taxChildIndex).getLocalName().equals("CompanyID")) {
|
|
||||||
setVATID(taxChilds.item(taxChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
// setTaxID(partyTaxScheme.item(partyTaxSchemeIndex).getTextContent());
|
|
||||||
if (taxChilds.item(taxChildIndex).getAttributes().getNamedItem("ID").getNodeValue().equals("FC")) {
|
|
||||||
if (taxChilds.item(taxChildIndex).getLocalName().equals("CompanyID")) {
|
|
||||||
setTaxID(taxChilds.item(taxChildIndex).getTextContent());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -558,6 +575,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* primarily for invoiceimporter and JSON
|
* primarily for invoiceimporter and JSON
|
||||||
|
*
|
||||||
* @return the list of sepa mandates
|
* @return the list of sepa mandates
|
||||||
*/
|
*/
|
||||||
public List<DirectDebit> getDebitDetails() {
|
public List<DirectDebit> getDebitDetails() {
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ public class XMLTools extends XMLWriter {
|
|||||||
/***
|
/***
|
||||||
* formats a number so that at least minDecimals are displayed but at the maximum maxDecimals are there, i.e.
|
* formats a number so that at least minDecimals are displayed but at the maximum maxDecimals are there, i.e.
|
||||||
* cuts potential 0s off the end until minDecimals
|
* cuts potential 0s off the end until minDecimals
|
||||||
* @param value
|
* @param value the value to be formatted
|
||||||
* @param maxDecimals number of maximal scale
|
* @param maxDecimals number of maximal scale
|
||||||
* @param minDecimals number of minimal scale
|
* @param minDecimals number of minimal scale
|
||||||
* @return value as String with decimals in the specified range
|
* @return value as String with decimals in the specified range
|
||||||
@@ -138,7 +138,7 @@ public class XMLTools extends XMLWriter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* relplaces some entities like < , > and & with their escaped pendant like <
|
* relplaces some entities like < , > and & with their escaped pendant like &lt;
|
||||||
* @param s the string
|
* @param s the string
|
||||||
* @return the "safe" string
|
* @return the "safe" string
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -321,6 +321,15 @@ public interface IExportableTransaction {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* supplier identification assigned by the costumer
|
||||||
|
*
|
||||||
|
* @return the sender's identification
|
||||||
|
*/
|
||||||
|
default BigDecimal getRoundingAmount() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* get reference document number typically used for Invoice Corrections Will be
|
* get reference document number typically used for Invoice Corrections Will be
|
||||||
* added as IncludedNote in comfort profile
|
* added as IncludedNote in comfort profile
|
||||||
|
|||||||
@@ -28,7 +28,9 @@ package org.mustangproject.ZUGFeRD;
|
|||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
import org.mustangproject.IncludedNote;
|
||||||
import org.mustangproject.Item;
|
import org.mustangproject.Item;
|
||||||
|
|
||||||
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
|
||||||
@@ -153,4 +155,21 @@ public interface IZUGFeRDExportableItem extends IAbsoluteValueProvider{
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
*
|
||||||
|
* @return the line ID
|
||||||
|
*/
|
||||||
|
default String getId() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A grouping of business terms to indicate accounting-relevant free texts including a qualification of these.
|
||||||
|
*
|
||||||
|
* The information are written to the same xml nodes like {@link #getNotes()} but with explicit subjectCode.
|
||||||
|
* @return list of the notes
|
||||||
|
*/
|
||||||
|
default List<IncludedNote> getNotesWithSubjectCode() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -44,10 +44,20 @@ public class LineCalculator {
|
|||||||
BigDecimal multiplicator = vatPercent.divide(BigDecimal.valueOf(100));
|
BigDecimal multiplicator = vatPercent.divide(BigDecimal.valueOf(100));
|
||||||
priceGross = currentItem.getPrice(); // see https://github.com/ZUGFeRD/mustangproject/issues/159
|
priceGross = currentItem.getPrice(); // see https://github.com/ZUGFeRD/mustangproject/issues/159
|
||||||
price = priceGross.subtract(allowance).add(charge);
|
price = priceGross.subtract(allowance).add(charge);
|
||||||
itemTotalNetAmount = currentItem.getQuantity().multiply(getPrice()).divide(currentItem.getBasisQuantity(), 18, RoundingMode.HALF_UP)
|
|
||||||
|
BigDecimal quantity=BigDecimal.ZERO;
|
||||||
|
if ((currentItem!=null)&&(currentItem.getQuantity()!=null)) {
|
||||||
|
quantity=currentItem.getQuantity();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Division/Zero occurred here.
|
||||||
|
// Used the setScale only because that's also done in getBasisQuantity
|
||||||
|
BigDecimal basisQuantity = currentItem.getBasisQuantity().compareTo(BigDecimal.ZERO) == 0
|
||||||
|
? BigDecimal.ONE.setScale(4)
|
||||||
|
: currentItem.getBasisQuantity();
|
||||||
|
itemTotalNetAmount = quantity.multiply(getPrice()).divide(basisQuantity, 18, RoundingMode.HALF_UP)
|
||||||
.subtract(allowanceItemTotal).setScale(2, RoundingMode.HALF_UP);
|
.subtract(allowanceItemTotal).setScale(2, RoundingMode.HALF_UP);
|
||||||
itemTotalVATAmount = itemTotalNetAmount.multiply(multiplicator);
|
itemTotalVATAmount = itemTotalNetAmount.multiply(multiplicator);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public BigDecimal getPrice() {
|
public BigDecimal getPrice() {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ import java.util.stream.Stream;
|
|||||||
/***
|
/***
|
||||||
* The Transactioncalculator e.g. adds the line totals and applies VAT on whole
|
* The Transactioncalculator e.g. adds the line totals and applies VAT on whole
|
||||||
* invoices
|
* invoices
|
||||||
*
|
*
|
||||||
* @see LineCalculator
|
* @see LineCalculator
|
||||||
*/
|
*/
|
||||||
public class TransactionCalculator implements IAbsoluteValueProvider {
|
public class TransactionCalculator implements IAbsoluteValueProvider {
|
||||||
@@ -27,7 +27,7 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
/***
|
/***
|
||||||
* if something had already been paid in advance, this will get it from the
|
* if something had already been paid in advance, this will get it from the
|
||||||
* transaction
|
* transaction
|
||||||
*
|
*
|
||||||
* @return prepaid amount
|
* @return prepaid amount
|
||||||
*/
|
*/
|
||||||
protected BigDecimal getTotalPrepaid() {
|
protected BigDecimal getTotalPrepaid() {
|
||||||
@@ -41,19 +41,19 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
/***
|
/***
|
||||||
* the invoice total with VAT, allowances and
|
* the invoice total with VAT, allowances and
|
||||||
* charges, WITHOUT considering prepaid amount
|
* charges, WITHOUT considering prepaid amount
|
||||||
*
|
*
|
||||||
* @return the invoice total including taxes
|
* @return the invoice total including taxes
|
||||||
*/
|
*/
|
||||||
public BigDecimal getGrandTotal() {
|
public BigDecimal getGrandTotal() {
|
||||||
|
|
||||||
final BigDecimal res = getTaxBasis();
|
BigDecimal basis = getTaxBasis();
|
||||||
return getVATPercentAmountMap().values().stream().map(VATAmount::getCalculated)
|
return getVATPercentAmountMap().values().stream().map(VATAmount::getCalculated)
|
||||||
.map(p -> p.setScale(2, RoundingMode.HALF_UP)).reduce(BigDecimal.ZERO, BigDecimal::add).add(res);
|
.map(p -> p.setScale(2, RoundingMode.HALF_UP)).reduce(BigDecimal.ZERO, BigDecimal::add).add(basis);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* returns total of charges for this tax rate
|
* returns total of charges for this tax rate
|
||||||
*
|
*
|
||||||
* @param percent a specific rate, or null for any rate
|
* @param percent a specific rate, or null for any rate
|
||||||
* @return the total amount
|
* @return the total amount
|
||||||
*/
|
*/
|
||||||
@@ -77,7 +77,7 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
/***
|
/***
|
||||||
* returns a (potentially concatenated) string of charge reasons, or "Charges"
|
* returns a (potentially concatenated) string of charge reasons, or "Charges"
|
||||||
* if none are defined
|
* if none are defined
|
||||||
*
|
*
|
||||||
* @param percent a specific rate, or null for any rate
|
* @param percent a specific rate, or null for any rate
|
||||||
* @return the space separated String
|
* @return the space separated String
|
||||||
*/
|
*/
|
||||||
@@ -95,7 +95,7 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
if ((charges != null) && (charges.length > 0)) {
|
if ((charges != null) && (charges.length > 0)) {
|
||||||
for (IZUGFeRDAllowanceCharge currentCharge : charges) {
|
for (IZUGFeRDAllowanceCharge currentCharge : charges) {
|
||||||
if ((percent == null) || (currentCharge.getTaxPercent().compareTo(percent) == 0)
|
if ((percent == null) || (currentCharge.getTaxPercent().compareTo(percent) == 0)
|
||||||
&& currentCharge.getReason() != null) {
|
&& currentCharge.getReason() != null) {
|
||||||
res += currentCharge.getReason() + " ";
|
res += currentCharge.getReason() + " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -107,7 +107,7 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
/***
|
/***
|
||||||
* returns a (potentially concatenated) string of allowance reasons, or
|
* returns a (potentially concatenated) string of allowance reasons, or
|
||||||
* "Allowances", if none are defined
|
* "Allowances", if none are defined
|
||||||
*
|
*
|
||||||
* @param percent a specific rate, or null for any rate
|
* @param percent a specific rate, or null for any rate
|
||||||
* @return the space separated String
|
* @return the space separated String
|
||||||
*/
|
*/
|
||||||
@@ -122,7 +122,7 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
|
|
||||||
/***
|
/***
|
||||||
* returns total of allowances for this tax rate
|
* returns total of allowances for this tax rate
|
||||||
*
|
*
|
||||||
* @param percent a specific rate, or null for any rate
|
* @param percent a specific rate, or null for any rate
|
||||||
* @return the total amount
|
* @return the total amount
|
||||||
*/
|
*/
|
||||||
@@ -134,25 +134,25 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
/***
|
/***
|
||||||
* returns the total net value of all items, without document level
|
* returns the total net value of all items, without document level
|
||||||
* charges/allowances
|
* charges/allowances
|
||||||
*
|
*
|
||||||
* @return item sum
|
* @return item sum
|
||||||
*/
|
*/
|
||||||
protected BigDecimal getTotal() {
|
protected BigDecimal getTotal() {
|
||||||
BigDecimal dec = Stream.of(trans.getZFItems()).map(LineCalculator::new)
|
BigDecimal dec = Stream.of(trans.getZFItems()).map(LineCalculator::new)
|
||||||
.map(LineCalculator::getItemTotalNetAmount).reduce(ZERO, BigDecimal::add);
|
.map(LineCalculator::getItemTotalNetAmount).reduce(ZERO, BigDecimal::add);
|
||||||
return dec;
|
return dec;
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* returns the total net value of the invoice, including charges/allowances on
|
* returns the total net value of the invoice, including charges/allowances on
|
||||||
* document level
|
* document level
|
||||||
*
|
*
|
||||||
* @return item sum +- charges/allowances
|
* @return item sum +- charges/allowances
|
||||||
*/
|
*/
|
||||||
protected BigDecimal getTaxBasis() {
|
public BigDecimal getTaxBasis() {
|
||||||
return getTotal().add(getChargesForPercent(null).setScale(2, RoundingMode.HALF_UP))
|
return getTotal().add(getChargesForPercent(null).setScale(2, RoundingMode.HALF_UP))
|
||||||
.subtract(getAllowancesForPercent(null).setScale(2, RoundingMode.HALF_UP))
|
.subtract(getAllowancesForPercent(null).setScale(2, RoundingMode.HALF_UP))
|
||||||
.setScale(2, RoundingMode.HALF_UP);
|
.setScale(2, RoundingMode.HALF_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -167,13 +167,17 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
final String vatDueDateTypeCode = trans.getVATDueDateTypeCode();
|
final String vatDueDateTypeCode = trans.getVATDueDateTypeCode();
|
||||||
|
|
||||||
for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
for (IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
||||||
BigDecimal percent = currentItem.getProduct().getVATPercent();
|
BigDecimal percent = null;
|
||||||
|
if (currentItem.getProduct()!=null)
|
||||||
|
{
|
||||||
|
percent=currentItem.getProduct().getVATPercent();
|
||||||
|
}
|
||||||
if (percent != null) {
|
if (percent != null) {
|
||||||
LineCalculator lc = new LineCalculator(currentItem);
|
LineCalculator lc = new LineCalculator(currentItem);
|
||||||
VATAmount itemVATAmount = new VATAmount(lc.getItemTotalNetAmount(), lc.getItemTotalVATAmount(),
|
VATAmount itemVATAmount = new VATAmount(lc.getItemTotalNetAmount(), lc.getItemTotalVATAmount(),
|
||||||
currentItem.getProduct().getTaxCategoryCode(), vatDueDateTypeCode);
|
currentItem.getProduct().getTaxCategoryCode(), vatDueDateTypeCode);
|
||||||
String reasonText=currentItem.getProduct().getTaxExemptionReason();
|
String reasonText = currentItem.getProduct().getTaxExemptionReason();
|
||||||
if (reasonText!=null) {
|
if (reasonText != null) {
|
||||||
itemVATAmount.setVatExemptionReasonText(reasonText);
|
itemVATAmount.setVatExemptionReasonText(reasonText);
|
||||||
}
|
}
|
||||||
VATAmount current = hm.get(percent.stripTrailingZeros());
|
VATAmount current = hm.get(percent.stripTrailingZeros());
|
||||||
@@ -193,8 +197,8 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
VATAmount theAmount = hm.get(taxPercent.stripTrailingZeros());
|
VATAmount theAmount = hm.get(taxPercent.stripTrailingZeros());
|
||||||
if (theAmount == null) {
|
if (theAmount == null) {
|
||||||
theAmount = new VATAmount(BigDecimal.ZERO, BigDecimal.ZERO,
|
theAmount = new VATAmount(BigDecimal.ZERO, BigDecimal.ZERO,
|
||||||
currentCharge.getCategoryCode() != null ? currentCharge.getCategoryCode() : "S",
|
currentCharge.getCategoryCode() != null ? currentCharge.getCategoryCode() : "S",
|
||||||
vatDueDateTypeCode);
|
vatDueDateTypeCode);
|
||||||
}
|
}
|
||||||
theAmount.setBasis(theAmount.getBasis().add(currentCharge.getTotalAmount(this)));
|
theAmount.setBasis(theAmount.getBasis().add(currentCharge.getTotalAmount(this)));
|
||||||
BigDecimal factor = taxPercent.divide(new BigDecimal(100));
|
BigDecimal factor = taxPercent.divide(new BigDecimal(100));
|
||||||
@@ -211,8 +215,8 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
VATAmount theAmount = hm.get(taxPercent.stripTrailingZeros());
|
VATAmount theAmount = hm.get(taxPercent.stripTrailingZeros());
|
||||||
if (theAmount == null) {
|
if (theAmount == null) {
|
||||||
theAmount = new VATAmount(BigDecimal.ZERO, BigDecimal.ZERO,
|
theAmount = new VATAmount(BigDecimal.ZERO, BigDecimal.ZERO,
|
||||||
currentAllowance.getCategoryCode() != null ? currentAllowance.getCategoryCode() : "S",
|
currentAllowance.getCategoryCode() != null ? currentAllowance.getCategoryCode() : "S",
|
||||||
vatDueDateTypeCode);
|
vatDueDateTypeCode);
|
||||||
}
|
}
|
||||||
theAmount.setBasis(theAmount.getBasis().subtract(currentAllowance.getTotalAmount(this)));
|
theAmount.setBasis(theAmount.getBasis().subtract(currentAllowance.getTotalAmount(this)));
|
||||||
BigDecimal factor = taxPercent.divide(new BigDecimal(100));
|
BigDecimal factor = taxPercent.divide(new BigDecimal(100));
|
||||||
@@ -239,4 +243,11 @@ public class TransactionCalculator implements IAbsoluteValueProvider {
|
|||||||
return getAllowancesForPercent(null).setScale(2, RoundingMode.HALF_UP);
|
return getAllowancesForPercent(null).setScale(2, RoundingMode.HALF_UP);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public BigDecimal getDuePayable() {
|
||||||
|
BigDecimal res = getGrandTotal().subtract(getTotalPrepaid());
|
||||||
|
if (trans.getRoundingAmount() != null) {
|
||||||
|
res = res.add(trans.getRoundingAmount());
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -277,11 +277,11 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String reason = "";
|
String reason = "";
|
||||||
if ((allowance.getReason() != null) && (profile == Profiles.getByName("Extended") || profile == Profiles.getByName("XRechnung"))) {
|
if ((allowance.getReason() != null) && (profile == Profiles.getByName("Extended") || profile == Profiles.getByName("XRechnung")) || profile == Profiles.getByName("EN16931")) {
|
||||||
reason = "<ram:Reason>" + XMLTools.encodeXML(allowance.getReason()) + "</ram:Reason>";
|
reason = "<ram:Reason>" + XMLTools.encodeXML(allowance.getReason()) + "</ram:Reason>";
|
||||||
}
|
}
|
||||||
String reasonCode = "";
|
String reasonCode = "";
|
||||||
if ((allowance.getReasonCode() != null) && (profile == Profiles.getByName("XRechnung"))) {
|
if (allowance.getReasonCode() != null) {
|
||||||
// only in XRechnung profile
|
// only in XRechnung profile
|
||||||
reasonCode = "<ram:ReasonCode>" + allowance.getReasonCode() + "</ram:ReasonCode>";
|
reasonCode = "<ram:ReasonCode>" + allowance.getReasonCode() + "</ram:ReasonCode>";
|
||||||
}
|
}
|
||||||
@@ -334,7 +334,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
this.trans = trans;
|
this.trans = trans;
|
||||||
this.calc = new TransactionCalculator(trans);
|
this.calc = new TransactionCalculator(trans);
|
||||||
|
|
||||||
boolean hasDueDate = trans.getDueDate()!=null;
|
boolean hasDueDate = trans.getDueDate() != null;
|
||||||
final SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
final SimpleDateFormat germanDateFormat = new SimpleDateFormat("dd.MM.yyyy");
|
||||||
|
|
||||||
String exemptionReason = "";
|
String exemptionReason = "";
|
||||||
@@ -401,6 +401,10 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
int lineID = 0;
|
int lineID = 0;
|
||||||
for (final IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
for (final IZUGFeRDExportableItem currentItem : trans.getZFItems()) {
|
||||||
lineID++;
|
lineID++;
|
||||||
|
String lineIDStr = Integer.toString(lineID);
|
||||||
|
if (currentItem.getId()!=null) {
|
||||||
|
lineIDStr=currentItem.getId();
|
||||||
|
}
|
||||||
if (currentItem.getProduct().getTaxExemptionReason() != null) {
|
if (currentItem.getProduct().getTaxExemptionReason() != null) {
|
||||||
exemptionReason = "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
exemptionReason = "<ram:ExemptionReason>" + XMLTools.encodeXML(currentItem.getProduct().getTaxExemptionReason()) + "</ram:ExemptionReason>";
|
||||||
}
|
}
|
||||||
@@ -408,7 +412,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
if ((getProfile() != Profiles.getByName("Minimum")) && (getProfile() != Profiles.getByName("BasicWL"))) {
|
if ((getProfile() != Profiles.getByName("Minimum")) && (getProfile() != Profiles.getByName("BasicWL"))) {
|
||||||
xml += "<ram:IncludedSupplyChainTradeLineItem>" +
|
xml += "<ram:IncludedSupplyChainTradeLineItem>" +
|
||||||
"<ram:AssociatedDocumentLineDocument>"
|
"<ram:AssociatedDocumentLineDocument>"
|
||||||
+ "<ram:LineID>" + lineID + "</ram:LineID>"
|
+ "<ram:LineID>" + lineIDStr + "</ram:LineID>"
|
||||||
+ buildItemNotes(currentItem)
|
+ buildItemNotes(currentItem)
|
||||||
+ "</ram:AssociatedDocumentLineDocument>"
|
+ "</ram:AssociatedDocumentLineDocument>"
|
||||||
|
|
||||||
@@ -454,7 +458,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
if (currentItem.getProduct().getClassifications() != null && currentItem.getProduct().getClassifications().length > 0) {
|
if (currentItem.getProduct().getClassifications() != null && currentItem.getProduct().getClassifications().length > 0) {
|
||||||
for (IDesignatedProductClassification classification : currentItem.getProduct().getClassifications()) {
|
for (IDesignatedProductClassification classification : currentItem.getProduct().getClassifications()) {
|
||||||
xml += "<ram:DesignatedProductClassification>"
|
xml += "<ram:DesignatedProductClassification>"
|
||||||
+ "<ram:ClassCode listId=\"" + XMLTools.encodeXML(classification.getClassCode().getListID()) + "\"";
|
+ "<ram:ClassCode listId=\"" + XMLTools.encodeXML(classification.getClassCode().getListID()) + "\"";
|
||||||
if (classification.getClassCode().getListVersionID() != null) {
|
if (classification.getClassCode().getListVersionID() != null) {
|
||||||
xml += " listVersionID=\"" + XMLTools.encodeXML(classification.getClassCode().getListVersionID()) + "\"";
|
xml += " listVersionID=\"" + XMLTools.encodeXML(classification.getClassCode().getListVersionID()) + "\"";
|
||||||
}
|
}
|
||||||
@@ -856,7 +860,7 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
final String chargesTotalLine = "<ram:ChargeTotalAmount>" + currencyFormat(calc.getChargesForPercent(null)) + "</ram:ChargeTotalAmount>";
|
final String chargesTotalLine = "<ram:ChargeTotalAmount>" + currencyFormat(calc.getChargesForPercent(null)) + "</ram:ChargeTotalAmount>";
|
||||||
|
|
||||||
xml += "<ram:SpecifiedTradeSettlementHeaderMonetarySummation>";
|
xml += "<ram:SpecifiedTradeSettlementHeaderMonetarySummation>";
|
||||||
if (getProfile() != Profiles.getByName("Minimum")) {
|
if ((getProfile() != Profiles.getByName("Minimum")) && (getProfile() != Profiles.getByName("BASICWL"))) {
|
||||||
xml += "<ram:LineTotalAmount>" + currencyFormat(calc.getTotal()) + "</ram:LineTotalAmount>";
|
xml += "<ram:LineTotalAmount>" + currencyFormat(calc.getTotal()) + "</ram:LineTotalAmount>";
|
||||||
xml += chargesTotalLine
|
xml += chargesTotalLine
|
||||||
+ allowanceTotalLine;
|
+ allowanceTotalLine;
|
||||||
@@ -865,14 +869,18 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
|
|||||||
// //
|
// //
|
||||||
// currencyID=\"EUR\"
|
// currencyID=\"EUR\"
|
||||||
+ "<ram:TaxTotalAmount currencyID=\"" + trans.getCurrency() + "\">"
|
+ "<ram:TaxTotalAmount currencyID=\"" + trans.getCurrency() + "\">"
|
||||||
+ currencyFormat(calc.getGrandTotal().subtract(calc.getTaxBasis())) + "</ram:TaxTotalAmount>"
|
+ currencyFormat(calc.getGrandTotal().subtract(calc.getTaxBasis())) + "</ram:TaxTotalAmount>";
|
||||||
+ "<ram:GrandTotalAmount>" + currencyFormat(calc.getGrandTotal()) + "</ram:GrandTotalAmount>";
|
if (trans.getRoundingAmount() != null) {
|
||||||
|
xml += "<ram:RoundingAmount>" + currencyFormat(trans.getRoundingAmount()) + "</ram:RoundingAmount>";
|
||||||
|
}
|
||||||
|
|
||||||
|
xml += "<ram:GrandTotalAmount>" + currencyFormat(calc.getGrandTotal()) + "</ram:GrandTotalAmount>";
|
||||||
// //
|
// //
|
||||||
// currencyID=\"EUR\"
|
// currencyID=\"EUR\"
|
||||||
if (getProfile() != Profiles.getByName("Minimum")) {
|
if (getProfile() != Profiles.getByName("Minimum")) {
|
||||||
xml += "<ram:TotalPrepaidAmount>" + currencyFormat(calc.getTotalPrepaid()) + "</ram:TotalPrepaidAmount>";
|
xml += "<ram:TotalPrepaidAmount>" + currencyFormat(calc.getTotalPrepaid()) + "</ram:TotalPrepaidAmount>";
|
||||||
}
|
}
|
||||||
xml += "<ram:DuePayableAmount>" + currencyFormat(calc.getGrandTotal().subtract(calc.getTotalPrepaid())) + "</ram:DuePayableAmount>"
|
xml += "<ram:DuePayableAmount>" + currencyFormat(calc.getDuePayable()) + "</ram:DuePayableAmount>"
|
||||||
+ "</ram:SpecifiedTradeSettlementHeaderMonetarySummation>";
|
+ "</ram:SpecifiedTradeSettlementHeaderMonetarySummation>";
|
||||||
if (trans.getInvoiceReferencedDocumentID() != null) {
|
if (trans.getInvoiceReferencedDocumentID() != null) {
|
||||||
xml += "<ram:InvoiceReferencedDocument>"
|
xml += "<ram:InvoiceReferencedDocument>"
|
||||||
|
|||||||
@@ -262,7 +262,7 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
|||||||
* @return the Payment Terms
|
* @return the Payment Terms
|
||||||
*/
|
*/
|
||||||
public String getPaymentTerms() {
|
public String getPaymentTerms() {
|
||||||
return extractString("//*[local-name() = 'SpecifiedTradePaymentTerms']//*[local-name() = 'Description']");
|
return importedInvoice.getPaymentTermDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -343,6 +343,9 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
|||||||
* @return the sender's account IBAN code
|
* @return the sender's account IBAN code
|
||||||
*/
|
*/
|
||||||
public String getIBAN() {
|
public String getIBAN() {
|
||||||
|
if ((importedInvoice==null)||(importedInvoice.getTradeSettlement()==null)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
for (IZUGFeRDTradeSettlement settlement : importedInvoice.getTradeSettlement()) {
|
for (IZUGFeRDTradeSettlement settlement : importedInvoice.getTradeSettlement()) {
|
||||||
if (settlement instanceof IZUGFeRDTradeSettlementDebit) {
|
if (settlement instanceof IZUGFeRDTradeSettlementDebit) {
|
||||||
return ((IZUGFeRDTradeSettlementDebit) settlement).getIBAN();
|
return ((IZUGFeRDTradeSettlementDebit) settlement).getIBAN();
|
||||||
@@ -356,8 +359,6 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
|||||||
|
|
||||||
|
|
||||||
public String getHolder() {
|
public String getHolder() {
|
||||||
|
|
||||||
|
|
||||||
return extractString("//*[local-name() = 'SellerTradeParty']/*[local-name() = 'Name']");
|
return extractString("//*[local-name() = 'SellerTradeParty']/*[local-name() = 'Name']");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -366,7 +367,6 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
|||||||
* @return the total payable amount
|
* @return the total payable amount
|
||||||
*/
|
*/
|
||||||
public String getAmount() {
|
public String getAmount() {
|
||||||
|
|
||||||
return importedInvoice.getGrandTotal().toPlainString();
|
return importedInvoice.getGrandTotal().toPlainString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -655,6 +655,7 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* returns a list of LineItems
|
* returns a list of LineItems
|
||||||
|
* @deprecated use invoiceimporter getZFItems
|
||||||
*
|
*
|
||||||
* @return a List of LineItem instances
|
* @return a List of LineItem instances
|
||||||
*/
|
*/
|
||||||
@@ -742,6 +743,15 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
|
|||||||
node = getNodeByName(node.getChildNodes(), "CalculatedAmount");
|
node = getNodeByName(node.getChildNodes(), "CalculatedAmount");
|
||||||
lineItem.setTax(XMLTools.tryBigDecimal(node));
|
lineItem.setTax(XMLTools.tryBigDecimal(node));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node = getNodeByName(nn.getChildNodes(), "ApplicableTradeTax");
|
||||||
|
if (node != null) {
|
||||||
|
node = getNodeByName(node.getChildNodes(), "CategoryCode");
|
||||||
|
if(node != null){
|
||||||
|
lineItem.getProduct().setTaxCategoryCode(XMLTools.getNodeValue(node));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
node = getNodeByName(nn.getChildNodes(), "BillingSpecifiedPeriod");
|
node = getNodeByName(nn.getChildNodes(), "BillingSpecifiedPeriod");
|
||||||
if (node != null) {
|
if (node != null) {
|
||||||
final Node start = getNodeByName(node.getChildNodes(), "StartDateTime");
|
final Node start = getNodeByName(node.getChildNodes(), "StartDateTime");
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import org.apache.pdfbox.pdmodel.common.filespecification.PDEmbeddedFile;
|
|||||||
import org.mustangproject.*;
|
import org.mustangproject.*;
|
||||||
import org.mustangproject.Exceptions.ArithmetricException;
|
import org.mustangproject.Exceptions.ArithmetricException;
|
||||||
import org.mustangproject.Exceptions.StructureException;
|
import org.mustangproject.Exceptions.StructureException;
|
||||||
|
import org.mustangproject.util.NodeMap;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.w3c.dom.Document;
|
import org.w3c.dom.Document;
|
||||||
@@ -67,7 +68,6 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
protected CalculatedInvoice importedInvoice = null;
|
protected CalculatedInvoice importedInvoice = null;
|
||||||
protected boolean recalcPrice = false;
|
protected boolean recalcPrice = false;
|
||||||
protected boolean ignoreCalculationErrors = false;
|
protected boolean ignoreCalculationErrors = false;
|
||||||
protected ArrayList<FileAttachment> fileAttachments = new ArrayList<>();
|
|
||||||
|
|
||||||
public ZUGFeRDInvoiceImporter() {
|
public ZUGFeRDInvoiceImporter() {
|
||||||
//constructor for extending classes
|
//constructor for extending classes
|
||||||
@@ -101,7 +101,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
|
|
||||||
/***
|
/***
|
||||||
* return the file names of all files embedded into the PDF
|
* return the file names of all files embedded into the PDF
|
||||||
* @see for XML embedded files please use ZUGFeRDInvoiceImporter.getFileAttachmentsXML
|
* @see ZUGFeRDInvoiceImporter for XML embedded files please use ZUGFeRDInvoiceImporter.getFileAttachmentsXML
|
||||||
* @return a ArrayList of FileAttachments, empty if none
|
* @return a ArrayList of FileAttachments, empty if none
|
||||||
*/
|
*/
|
||||||
public List<FileAttachment> getFileAttachmentsPDF() {
|
public List<FileAttachment> getFileAttachmentsPDF() {
|
||||||
@@ -228,7 +228,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
* set the xml of a CII invoice
|
* set the xml of a CII invoice
|
||||||
* @param rawXML the xml string
|
* @param rawXML the xml string
|
||||||
* @param doParse automatically parse input for zugferdImporter (not ZUGFeRDInvoiceImporter)
|
* @param doParse automatically parse input for zugferdImporter (not ZUGFeRDInvoiceImporter)
|
||||||
* @throws IOException
|
* @throws IOException if parsing xml throws it (unlikely its string based)
|
||||||
*/
|
*/
|
||||||
public void setRawXML(byte[] rawXML, boolean doParse) throws IOException {
|
public void setRawXML(byte[] rawXML, boolean doParse) throws IOException {
|
||||||
this.containsMeta = true;
|
this.containsMeta = true;
|
||||||
@@ -238,7 +238,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
setDocument();
|
setDocument();
|
||||||
} catch (ParserConfigurationException | SAXException e) {
|
} catch (ParserConfigurationException | SAXException | ParseException e) {
|
||||||
LOGGER.error("Failed to parse XML", e);
|
LOGGER.error("Failed to parse XML", e);
|
||||||
throw new ZUGFeRDExportException(e);
|
throw new ZUGFeRDExportException(e);
|
||||||
}
|
}
|
||||||
@@ -248,13 +248,13 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
/***
|
/***
|
||||||
* set the xml of a CII invoice, simple version
|
* set the xml of a CII invoice, simple version
|
||||||
* @param rawXML the cii(?) as a string
|
* @param rawXML the cii(?) as a string
|
||||||
* @throws IOException
|
* @throws IOException if parsing xml throws it (unlikely its string based)
|
||||||
*/
|
*/
|
||||||
public void setRawXML(byte[] rawXML) throws IOException {
|
public void setRawXML(byte[] rawXML) throws IOException {
|
||||||
setRawXML(rawXML, true);
|
setRawXML(rawXML, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setDocument() throws ParserConfigurationException, IOException, SAXException {
|
private void setDocument() throws ParserConfigurationException, IOException, SAXException, ParseException {
|
||||||
final DocumentBuilderFactory xmlFact = DocumentBuilderFactory.newInstance();
|
final DocumentBuilderFactory xmlFact = DocumentBuilderFactory.newInstance();
|
||||||
xmlFact.setNamespaceAware(true);
|
xmlFact.setNamespaceAware(true);
|
||||||
final DocumentBuilder builder = xmlFact.newDocumentBuilder();
|
final DocumentBuilder builder = xmlFact.newDocumentBuilder();
|
||||||
@@ -267,12 +267,14 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
extractInto(importedInvoice);
|
extractInto(importedInvoice);
|
||||||
} catch (XPathExpressionException e) {
|
} catch (XPathExpressionException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
} catch (ParseException e) {
|
|
||||||
throw new RuntimeException(e);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setID(String id) {
|
||||||
|
String ud = id;
|
||||||
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* This will parse a XML into the given invoice object
|
* This will parse a XML into the given invoice object
|
||||||
* @param zpp the invoice to be altered
|
* @param zpp the invoice to be altered
|
||||||
@@ -301,13 +303,129 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
zpp.setDeliveryAddress(new TradeParty(deliveryNodes));
|
zpp.setDeliveryAddress(new TradeParty(deliveryNodes));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
List<IncludedNote> includedNotes = new ArrayList<>();
|
||||||
|
|
||||||
|
//UBL...
|
||||||
|
XPathExpression UBLNotesEx = xpath.compile("/*[local-name()=\"Invoice\"]/*[local-name()=\"Note\"]");
|
||||||
|
NodeList UBLNotesNd = (NodeList) UBLNotesEx.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
if ((UBLNotesNd != null) && (UBLNotesNd.getLength() > 0)) {
|
||||||
|
for (int nodeIndex = 0; nodeIndex < UBLNotesNd.getLength(); nodeIndex++) {
|
||||||
|
includedNotes.add(IncludedNote.generalNote(UBLNotesNd.item(nodeIndex).getTextContent()));
|
||||||
|
}
|
||||||
|
zpp.addNotes(includedNotes);
|
||||||
|
}
|
||||||
|
|
||||||
|
XPathExpression shipExUBL = xpath.compile("//*[local-name()=\"Delivery\"]");
|
||||||
|
Node deliveryNode = (Node) shipExUBL.evaluate(getDocument(), XPathConstants.NODE);
|
||||||
|
|
||||||
|
if (deliveryNode != null) {
|
||||||
|
TradeParty delivery = new TradeParty();
|
||||||
|
new NodeMap(deliveryNode).getAsNodeMap("DeliveryLocation").ifPresent(
|
||||||
|
deliveryLocationNodeMap -> {
|
||||||
|
|
||||||
|
deliveryLocationNodeMap.getNode("ID").ifPresent(s -> {
|
||||||
|
if (s.getAttributes().getNamedItem("schemeID") != null) {
|
||||||
|
SchemedID sID = new SchemedID().setScheme(s.getAttributes().getNamedItem("schemeID").getTextContent()).setId(s.getTextContent());
|
||||||
|
delivery.addGlobalID(sID);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("StreetName").ifPresent(t -> delivery.setStreet(t));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("AdditionalStreetName").ifPresent(t -> delivery.setAdditionalAddress(t));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("CityName").ifPresent(t -> delivery.setLocation(t));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("PostalZone").ifPresent(t -> delivery.setZIP(t));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsNodeMap("Country").ifPresent(t -> t.getAsString("IdentificationCode").ifPresent(u -> delivery.setCountry(u)));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsNodeMap("AddressLine").ifPresent(t -> t.getAsString("Line").ifPresent(u -> delivery.setAdditionalAddressExtension(u)));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("AdditionalStreetName").ifPresent(t -> delivery.setAdditionalAddress(t));
|
||||||
|
});
|
||||||
|
deliveryLocationNodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("AdditionalStreetName").ifPresent(t -> delivery.setAdditionalAddress(t));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
new NodeMap(deliveryNode).getAsNodeMap("DeliveryParty").ifPresent(partyMap -> {
|
||||||
|
partyMap.getAsNodeMap("PartyName").ifPresent(s -> {
|
||||||
|
s.getAsString("Name").ifPresent(t -> delivery.setName(t));
|
||||||
|
});
|
||||||
|
});
|
||||||
|
String street, name, additionalStreet, city, postal, countrySubentity, line, country = null;
|
||||||
|
/*
|
||||||
|
String idx = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"ID\"]");
|
||||||
|
street = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name()=\"Address\"]/*[local-name()=\"StreetName\"]");
|
||||||
|
additionalStreet = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"Address\"]/*[local-name() = \"AdditionalStreetName\"]");
|
||||||
|
city = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"Address\"]/*[local-name() = \"CityName\"]");
|
||||||
|
postal = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"Address\"]/*[local-name() = \"PostalZone\"]");
|
||||||
|
countrySubentity = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"Address\"]/*[local-name() = \"CountrySubentity\"]");
|
||||||
|
line = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"Address\"]//*[local-name() = \"AddressLine\"]/*[local-name() = \"Line\"]");
|
||||||
|
country = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"Address\"]//*[local-name() = \"Country\"]/*[local-name() = \"IdentificationCode\"]");
|
||||||
|
name = extractString("//*[local-name()=\"DeliveryLocation\"]/*[local-name() = \"DeliveryParty\"]//*[local-name() = \"PartyName\"]/*[local-name() = \"Name\"]");
|
||||||
|
*/
|
||||||
|
zpp.setDeliveryAddress(delivery);
|
||||||
|
/*
|
||||||
|
zpp.setDeliveryAddress(new TradeParty()
|
||||||
|
.setStreet(street)
|
||||||
|
.setAdditionalAddress(additionalStreet)
|
||||||
|
.setLocation(city)
|
||||||
|
.setZIP(postal)
|
||||||
|
.setAdditionalAddressExtension(line)
|
||||||
|
.setCountry(country)
|
||||||
|
.setName(name)
|
||||||
|
);
|
||||||
|
*/
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"BuyerTradeParty\"]|//*[local-name()=\"AccountingCustomerParty\"]/*");
|
xpr = xpath.compile("//*[local-name()=\"BuyerTradeParty\"]|//*[local-name()=\"AccountingCustomerParty\"]/*");
|
||||||
NodeList BuyerNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList BuyerNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"PayeeTradeParty\"]|//*[local-name()=\"PayeeParty\"]/*");
|
xpr = xpath.compile("//*[local-name()=\"PayeeTradeParty\"]");
|
||||||
NodeList payeeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList payeeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
|
// UBL
|
||||||
|
XPathExpression shipPayee = xpath.compile("//*[local-name()=\"PayeeParty\"]/*");
|
||||||
|
NodeList ublPayeeNodes = (NodeList) shipPayee.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
|
// if(ublPayeeNodes != null) {
|
||||||
|
// TradeParty payee = new TradeParty();
|
||||||
|
// NodeMap nodeMap = new NodeMap(ublPayeeNodes).getAsNodeMap("PayeeParty").get();
|
||||||
|
// nodeMap.getNode("ID").ifPresent(s -> {
|
||||||
|
// SchemedID sID = new SchemedID().setScheme(s.getAttributes().getNamedItem("schemeID").getTextContent()).setId(s.getTextContent());
|
||||||
|
// payee.addGlobalID(sID);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
//NodeList UBLpayeeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
zpp.setPayee(new TradeParty(ublPayeeNodes));
|
||||||
|
// TradeParty payee =new TradeParty();
|
||||||
|
// NodeMap payeeID = new NodeMap(UBLpayeeNodes).getAsNodeMap("PartyIdentification").get();
|
||||||
|
// if (payeeID !=null) {
|
||||||
|
// payeeID.getAsString("Name").ifPresent(t->payee.setName(t));
|
||||||
|
// }
|
||||||
|
// if (payeeNodes != null) {
|
||||||
|
// TradeParty payee =new TradeParty();
|
||||||
|
// NodeMap nodeMap = new NodeMap(payeeNodes).getAsNodeMap("PartyIdentification").get();
|
||||||
|
// if (nodeMap != null) {
|
||||||
|
// nodeMap.getNode("ID").ifPresent(s -> {
|
||||||
|
// SchemedID sID = new SchemedID().setScheme(s.getAttributes().getNamedItem("schemeID").getTextContent()).setId(s.getTextContent());
|
||||||
|
// payee.addGlobalID(sID);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
||||||
NodeList ExchangedDocumentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList ExchangedDocumentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
@@ -324,16 +442,47 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"PrepaidAmount\"]");
|
xpr = xpath.compile("//*[local-name()=\"TaxBasisTotalAmount\"]|//*[local-name()=\"TaxExclusiveAmount\"]");
|
||||||
|
BigDecimal expectedTaxBasis = null;
|
||||||
|
NodeList basisNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
if (basisNodes.getLength() > 0) {
|
||||||
|
expectedTaxBasis = new BigDecimal(XMLTools.trimOrNull(basisNodes.item(0)));
|
||||||
|
if (zpp instanceof CalculatedInvoice) {
|
||||||
|
// usually we would re-calculate the invoice to get expectedGrandTotal
|
||||||
|
// however, for "minimal" invoices or other invoices without lines
|
||||||
|
// this will not work
|
||||||
|
((CalculatedInvoice) zpp).setTaxBasis(expectedTaxBasis);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xpr = xpath.compile("//*[local-name()=\"TotalPrepaidAmount\"]|//*[local-name()=\"PrepaidAmount\"]");
|
||||||
NodeList prepaidNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList prepaidNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
if (prepaidNodes.getLength() > 0) {
|
if (prepaidNodes.getLength() > 0) {
|
||||||
zpp.setTotalPrepaidAmount(new BigDecimal(XMLTools.trimOrNull(prepaidNodes.item(0))));
|
zpp.setTotalPrepaidAmount(new BigDecimal(XMLTools.trimOrNull(prepaidNodes.item(0))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"LineTotalAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"LineExtensionAmount\"]");
|
||||||
|
NodeList lineTotalNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
if (lineTotalNodes.getLength() > 0) {
|
||||||
|
if (zpp instanceof CalculatedInvoice) {
|
||||||
|
((CalculatedInvoice) zpp).setLineTotalAmount(new BigDecimal(XMLTools.trimOrNull(lineTotalNodes.item(0))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"DuePayableAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"PayableAmount\"]");
|
||||||
|
NodeList lineDueNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
if (lineDueNodes.getLength() > 0) {
|
||||||
|
if (zpp instanceof CalculatedInvoice) {
|
||||||
|
((CalculatedInvoice) zpp).setDuePayable(new BigDecimal(XMLTools.trimOrNull(lineDueNodes.item(0))));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Date issueDate = null;
|
Date issueDate = null;
|
||||||
Date dueDate = null;
|
Date dueDate = null;
|
||||||
Date deliveryDate = null;
|
Date deliveryDate = null;
|
||||||
String despatchAdviceReferencedDocument = null;
|
String despatchAdviceReferencedDocument = null;
|
||||||
|
|
||||||
for (int i = 0; i < ExchangedDocumentNodes.getLength(); i++) {
|
for (int i = 0; i < ExchangedDocumentNodes.getLength(); i++) {
|
||||||
Node exchangedDocumentNode = ExchangedDocumentNodes.item(i);
|
Node exchangedDocumentNode = ExchangedDocumentNodes.item(i);
|
||||||
NodeList exchangedDocumentChilds = exchangedDocumentNode.getChildNodes();
|
NodeList exchangedDocumentChilds = exchangedDocumentNode.getChildNodes();
|
||||||
@@ -354,7 +503,6 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
List<IncludedNote> includedNotes = new ArrayList<>();
|
|
||||||
if ((item.getLocalName() != null) && (item.getLocalName().equals("IncludedNote"))) {
|
if ((item.getLocalName() != null) && (item.getLocalName().equals("IncludedNote"))) {
|
||||||
String subjectCode = "";
|
String subjectCode = "";
|
||||||
String content = null;
|
String content = null;
|
||||||
@@ -369,27 +517,48 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
subjectCode = XMLTools.trimOrNull(includedNodeChilds.item(issueDateChildIndex));
|
subjectCode = XMLTools.trimOrNull(includedNodeChilds.item(issueDateChildIndex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
switch (subjectCode){
|
switch (subjectCode) {
|
||||||
case "AAI": includedNotes.add(IncludedNote.generalNote(content)); break;
|
case "AAI":
|
||||||
case "REG": includedNotes.add(IncludedNote.regulatoryNote(content)); break;
|
includedNotes.add(IncludedNote.generalNote(content));
|
||||||
case "ABL": includedNotes.add(IncludedNote.legalNote(content)); break;
|
break;
|
||||||
case "CUS": includedNotes.add(IncludedNote.customsNote(content)); break;
|
case "REG":
|
||||||
case "SUR": includedNotes.add(IncludedNote.sellerNote(content)); break;
|
includedNotes.add(IncludedNote.regulatoryNote(content));
|
||||||
case "TXD": includedNotes.add(IncludedNote.taxNote(content)); break;
|
break;
|
||||||
case "ACY": includedNotes.add(IncludedNote.introductionNote(content)); break;
|
case "ABL":
|
||||||
case "AAK": includedNotes.add(IncludedNote.discountBonusNote(content)); break;
|
includedNotes.add(IncludedNote.legalNote(content));
|
||||||
default: includedNotes.add(IncludedNote.unspecifiedNote(content)); break;
|
break;
|
||||||
|
case "CUS":
|
||||||
|
includedNotes.add(IncludedNote.customsNote(content));
|
||||||
|
break;
|
||||||
|
case "SUR":
|
||||||
|
includedNotes.add(IncludedNote.sellerNote(content));
|
||||||
|
break;
|
||||||
|
case "TXD":
|
||||||
|
includedNotes.add(IncludedNote.taxNote(content));
|
||||||
|
break;
|
||||||
|
case "ACY":
|
||||||
|
includedNotes.add(IncludedNote.introductionNote(content));
|
||||||
|
break;
|
||||||
|
case "AAK":
|
||||||
|
includedNotes.add(IncludedNote.discountBonusNote(content));
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
includedNotes.add(IncludedNote.unspecifiedNote(content));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
zpp.addNotes(includedNotes);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
zpp.addNotes(includedNotes);
|
||||||
String rootNode = extractString("local-name(/*)");
|
String rootNode = extractString("local-name(/*)");
|
||||||
if (rootNode.equals("Invoice")) {
|
if (rootNode.equals("Invoice")) {
|
||||||
// UBL...
|
// UBL...
|
||||||
number = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"ID\"]").trim();
|
number = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"ID\"]").trim();
|
||||||
typeCode = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"InvoiceTypeCode\"]").trim();
|
typeCode = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"InvoiceTypeCode\"]").trim();
|
||||||
issueDate = new SimpleDateFormat("yyyy-MM-dd").parse(extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"IssueDate\"]").trim());
|
String issueDateStr = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"IssueDate\"]").trim();
|
||||||
|
if (issueDateStr.length()>0) {
|
||||||
|
issueDate = new SimpleDateFormat("yyyy-MM-dd").parse(issueDateStr);
|
||||||
|
}
|
||||||
String dueDt = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"DueDate\"]").trim();
|
String dueDt = extractString("//*[local-name()=\"Invoice\"]/*[local-name()=\"DueDate\"]").trim();
|
||||||
if (dueDt.length() > 0) {
|
if (dueDt.length() > 0) {
|
||||||
dueDate = new SimpleDateFormat("yyyy-MM-dd").parse(dueDt);
|
dueDate = new SimpleDateFormat("yyyy-MM-dd").parse(dueDt);
|
||||||
@@ -399,7 +568,8 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
deliveryDate = new SimpleDateFormat("yyyy-MM-dd").parse(deliveryDt);
|
deliveryDate = new SimpleDateFormat("yyyy-MM-dd").parse(deliveryDt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeDelivery\"]");
|
|
||||||
|
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeDelivery\"]|//*[local-name()=\"Delivery\"]");
|
||||||
NodeList headerTradeDeliveryNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList headerTradeDeliveryNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
for (int i = 0; i < headerTradeDeliveryNodes.getLength(); i++) {
|
for (int i = 0; i < headerTradeDeliveryNodes.getLength(); i++) {
|
||||||
@@ -471,9 +641,15 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
String currency = extractString("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]/*[local-name()=\"InvoiceCurrencyCode\"]|//*[local-name()=\"DocumentCurrencyCode\"]") ;
|
String currency = extractString("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]/*[local-name()=\"InvoiceCurrencyCode\"]|//*[local-name()=\"DocumentCurrencyCode\"]");
|
||||||
zpp.setCurrency(currency);
|
zpp.setCurrency(currency);
|
||||||
|
|
||||||
|
String paymentTermsDescription = extractString("//*[local-name()=\"SpecifiedTradePaymentTerms\"]/*[local-name()=\"Description\"]|//*[local-name()=\"PaymentTerms\"]/*[local-name()=\"Note\"]");
|
||||||
|
if ((paymentTermsDescription!=null)&&(!paymentTermsDescription.isEmpty())) {
|
||||||
|
zpp.setPaymentTermDescription(paymentTermsDescription);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]|//*[local-name()=\"ApplicableSupplyChainTradeSettlement\"]");
|
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]|//*[local-name()=\"ApplicableSupplyChainTradeSettlement\"]");
|
||||||
NodeList headerTradeSettlementNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList headerTradeSettlementNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
List<BankDetails> bankDetails = new ArrayList<>();
|
List<BankDetails> bankDetails = new ArrayList<>();
|
||||||
@@ -490,6 +666,9 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
&& (headerTradeSettlementChilds.item(settlementChildIndex).getLocalName().equals("SpecifiedTradePaymentTerms"))) {
|
&& (headerTradeSettlementChilds.item(settlementChildIndex).getLocalName().equals("SpecifiedTradePaymentTerms"))) {
|
||||||
NodeList paymentTermChilds = headerTradeSettlementChilds.item(settlementChildIndex).getChildNodes();
|
NodeList paymentTermChilds = headerTradeSettlementChilds.item(settlementChildIndex).getChildNodes();
|
||||||
for (int paymentTermChildIndex = 0; paymentTermChildIndex < paymentTermChilds.getLength(); paymentTermChildIndex++) {
|
for (int paymentTermChildIndex = 0; paymentTermChildIndex < paymentTermChilds.getLength(); paymentTermChildIndex++) {
|
||||||
|
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("Description"))) {
|
||||||
|
zpp.setPaymentTermDescription(paymentTermChilds.item(paymentTermChildIndex).getTextContent());
|
||||||
|
}
|
||||||
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("DueDateDateTime"))) {
|
if ((paymentTermChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("DueDateDateTime"))) {
|
||||||
NodeList dueDateChilds = paymentTermChilds.item(paymentTermChildIndex).getChildNodes();
|
NodeList dueDateChilds = paymentTermChilds.item(paymentTermChildIndex).getChildNodes();
|
||||||
for (int dueDateChildIndex = 0; dueDateChildIndex < dueDateChilds.getLength(); dueDateChildIndex++) {
|
for (int dueDateChildIndex = 0; dueDateChildIndex < dueDateChilds.getLength(); dueDateChildIndex++) {
|
||||||
@@ -590,10 +769,24 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if ((paymentMeansChilds.item(paymentTermChildIndex).getLocalName() != null) && (paymentTermChilds.item(paymentTermChildIndex).getLocalName().equals("DirectDebitMandateID"))) {
|
||||||
|
// directDebitMandateID = paymentTermChilds.item(paymentTermChildIndex).getTextContent();
|
||||||
|
// }
|
||||||
|
if ((paymentMeansChilds.item(meansChildIndex).getLocalName() != null)
|
||||||
|
&& (paymentMeansChilds.item(meansChildIndex).getLocalName().equals("PaymentMandate"))) {
|
||||||
|
NodeList paymentMandateChilds = paymentMeansChilds.item(meansChildIndex).getChildNodes();
|
||||||
|
for (int paymentMandateChildIndex = 0; paymentMandateChildIndex < paymentMandateChilds.getLength(); paymentMandateChildIndex++) {
|
||||||
|
if ((paymentMandateChilds.item(paymentMandateChildIndex).getLocalName() != null) && (paymentMandateChilds.item(paymentMandateChildIndex).getLocalName().equals("ID"))) {
|
||||||
|
directDebitMandateID = paymentMandateChilds.item(paymentMandateChildIndex).getTextContent();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
zpp.setDueDate(dueDate).setDeliveryDate(deliveryDate).setIssueDate(issueDate).setSender(new TradeParty(SellerNodes)).setRecipient(new TradeParty(BuyerNodes)).setNumber(number).setDocumentCode(typeCode);
|
zpp.setIssueDate(issueDate).setDueDate(dueDate).setDeliveryDate(deliveryDate).setSender(new TradeParty(SellerNodes)).setRecipient(new TradeParty(BuyerNodes)).setNumber(number).setDocumentCode(typeCode);
|
||||||
|
|
||||||
if ((directDebitMandateID != null) && (IBAN != null)) {
|
if ((directDebitMandateID != null) && (IBAN != null)) {
|
||||||
DirectDebit d = new DirectDebit(IBAN, directDebitMandateID);
|
DirectDebit d = new DirectDebit(IBAN, directDebitMandateID);
|
||||||
@@ -608,24 +801,33 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
|
|
||||||
if (buyerOrderIssuerAssignedID != null) {
|
if (buyerOrderIssuerAssignedID != null) {
|
||||||
zpp.setBuyerOrderReferencedDocumentID(buyerOrderIssuerAssignedID);
|
zpp.setBuyerOrderReferencedDocumentID(buyerOrderIssuerAssignedID);
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
zpp.setBuyerOrderReferencedDocumentID(extractString("//*[local-name()=\"OrderReference\"]/*[local-name()=\"ID\"]"));
|
zpp.setBuyerOrderReferencedDocumentID(extractString("//*[local-name()=\"OrderReference\"]/*[local-name()=\"ID\"]"));
|
||||||
}
|
}
|
||||||
if (sellerOrderIssuerAssignedID != null) {
|
if (sellerOrderIssuerAssignedID != null) {
|
||||||
zpp.setSellerOrderReferencedDocumentID(sellerOrderIssuerAssignedID);
|
zpp.setSellerOrderReferencedDocumentID(sellerOrderIssuerAssignedID);
|
||||||
|
} else {
|
||||||
|
zpp.setSellerOrderReferencedDocumentID(extractString("//*[local-name()=\"OrderReference\"]/*[local-name()=\"SalesOrderID\"]"));
|
||||||
}
|
}
|
||||||
if (despatchAdviceReferencedDocument != null) {
|
if (despatchAdviceReferencedDocument != null) {
|
||||||
zpp.setDespatchAdviceReferencedDocumentID(despatchAdviceReferencedDocument);
|
zpp.setDespatchAdviceReferencedDocumentID(despatchAdviceReferencedDocument);
|
||||||
|
} else {
|
||||||
|
zpp.setDespatchAdviceReferencedDocumentID(extractString("//*[local-name()=\"DespatchDocumentReference\"]/*[local-name()=\"ID\"]"));
|
||||||
}
|
}
|
||||||
|
zpp.setInvoiceReferencedDocumentID(extractString("//*[local-name()=\"InvoiceReferencedDocument\"]/*[local-name()=\"IssuerAssignedID\"]|//*[local-name()=\"BillingReference\"]/*[local-name()=\"InvoiceDocumentReference\"]/*[local-name()=\"ID\"]"));
|
||||||
|
|
||||||
zpp.setOwnOrganisationName(extractString("//*[local-name()=\"SellerTradeParty\"]/*[local-name()=\"Name\"]|//*[local-name()=\"AccountingSupplierParty\"]/*[local-name()=\"Party\"]/*[local-name()=\"PartyName\"]").trim());
|
zpp.setOwnOrganisationName(extractString("//*[local-name()=\"SellerTradeParty\"]/*[local-name()=\"Name\"]|//*[local-name()=\"AccountingSupplierParty\"]/*[local-name()=\"Party\"]/*[local-name()=\"PartyName\"]").trim());
|
||||||
|
|
||||||
|
String rounding = extractString("//*[local-name()=\"SpecifiedTradeSettlementHeaderMonetarySummation\"]/*[local-name()=\"RoundingAmount\"]|//*[local-name()=\"LegalMonetaryTotal\"]/*[local-name()=\"Party\"]/*[local-name()=\"PayableRoundingAmount\"]");
|
||||||
|
if ((rounding != null) && (!rounding.isEmpty())) {
|
||||||
|
zpp.setRoundingAmount(new BigDecimal(rounding.trim()));
|
||||||
|
}
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"BuyerReference\"]");
|
xpr = xpath.compile("//*[local-name()=\"BuyerReference\"]");
|
||||||
String buyerReference = null;
|
String buyerReference = null;
|
||||||
prepaidNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
lineTotalNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
if (prepaidNodes.getLength() > 0) {
|
if (lineTotalNodes.getLength() > 0) {
|
||||||
buyerReference = XMLTools.trimOrNull(prepaidNodes.item(0));
|
buyerReference = XMLTools.trimOrNull(lineTotalNodes.item(0));
|
||||||
}
|
}
|
||||||
if (buyerReference != null) {
|
if (buyerReference != null) {
|
||||||
zpp.setReferenceNumber(buyerReference);
|
zpp.setReferenceNumber(buyerReference);
|
||||||
@@ -648,7 +850,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
NodeList attachmentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList attachmentNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
for (int i = 0; i < attachmentNodes.getLength(); i++) {
|
for (int i = 0; i < attachmentNodes.getLength(); i++) {
|
||||||
FileAttachment fa = new FileAttachment(attachmentNodes.item(i).getAttributes().getNamedItem("filename").getNodeValue(), attachmentNodes.item(i).getAttributes().getNamedItem("mimeCode").getNodeValue(), "Data", Base64.getDecoder().decode(XMLTools.trimOrNull(attachmentNodes.item(i))));
|
FileAttachment fa = new FileAttachment(attachmentNodes.item(i).getAttributes().getNamedItem("filename").getNodeValue(), attachmentNodes.item(i).getAttributes().getNamedItem("mimeCode").getNodeValue(), "Data", Base64.getDecoder().decode(XMLTools.trimOrNull(attachmentNodes.item(i))));
|
||||||
fileAttachments.add(fa);
|
zpp.embedFileInXML(fa);
|
||||||
// filename = "Aufmass.png" mimeCode = "image/png"
|
// filename = "Aufmass.png" mimeCode = "image/png"
|
||||||
//EmbeddedDocumentBinaryObject cbc:EmbeddedDocumentBinaryObject mimeCode="image/png" filename="Aufmass.png"
|
//EmbeddedDocumentBinaryObject cbc:EmbeddedDocumentBinaryObject mimeCode="image/png" filename="Aufmass.png"
|
||||||
}
|
}
|
||||||
@@ -657,7 +859,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
// be read,
|
// be read,
|
||||||
// so the invoice remains arithmetically correct
|
// so the invoice remains arithmetically correct
|
||||||
// -> parse document level charges+allowances
|
// -> parse document level charges+allowances
|
||||||
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeAllowanceCharge\"]");
|
xpr = xpath.compile("//*[local-name()=\"SpecifiedTradeAllowanceCharge\"]|//*[local-name()=\"AllowanceCharge\"]");//CII and UBL
|
||||||
NodeList chargeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList chargeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
for (int i = 0; i < chargeNodes.getLength(); i++) {
|
for (int i = 0; i < chargeNodes.getLength(); i++) {
|
||||||
NodeList chargeNodeChilds = chargeNodes.item(i).getChildNodes();
|
NodeList chargeNodeChilds = chargeNodes.item(i).getChildNodes();
|
||||||
@@ -671,24 +873,34 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
if (chargeChildName != null) {
|
if (chargeChildName != null) {
|
||||||
|
|
||||||
if (chargeChildName.equals("ChargeIndicator")) {
|
if (chargeChildName.equals("ChargeIndicator")) {
|
||||||
NodeList indicatorChilds = chargeNodeChilds.item(chargeChildIndex).getChildNodes();
|
if (chargeNodeChilds.item(chargeChildIndex).getTextContent().trim().equalsIgnoreCase("false")) {
|
||||||
for (int indicatorChildIndex = 0; indicatorChildIndex < indicatorChilds.getLength(); indicatorChildIndex++) {
|
// UBL
|
||||||
if ((indicatorChilds.item(indicatorChildIndex).getLocalName() != null)
|
isCharge = false;
|
||||||
&& (indicatorChilds.item(indicatorChildIndex).getLocalName().equals("Indicator"))) {
|
} else if (chargeNodeChilds.item(chargeChildIndex).getTextContent().trim().equalsIgnoreCase("true")) {
|
||||||
isCharge = XMLTools.trimOrNull(indicatorChilds.item(indicatorChildIndex)).equalsIgnoreCase("true");
|
// still UBL
|
||||||
|
isCharge = true;
|
||||||
|
} else {
|
||||||
|
//CII
|
||||||
|
NodeList indicatorChilds = chargeNodeChilds.item(chargeChildIndex).getChildNodes();
|
||||||
|
for (int indicatorChildIndex = 0; indicatorChildIndex < indicatorChilds.getLength(); indicatorChildIndex++) {
|
||||||
|
if ((indicatorChilds.item(indicatorChildIndex).getLocalName() != null)
|
||||||
|
&& (indicatorChilds.item(indicatorChildIndex).getLocalName().equals("Indicator"))) {
|
||||||
|
isCharge = XMLTools.trimOrNull(indicatorChilds.item(indicatorChildIndex)).equalsIgnoreCase("true");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (chargeChildName.equals("ActualAmount")) {
|
|
||||||
|
} else if (chargeChildName.equals("ActualAmount") || chargeChildName.equals("Amount")) {
|
||||||
chargeAmount = XMLTools.trimOrNull(chargeNodeChilds.item(chargeChildIndex));
|
chargeAmount = XMLTools.trimOrNull(chargeNodeChilds.item(chargeChildIndex));
|
||||||
} else if (chargeChildName.equals("Reason")) {
|
} else if (chargeChildName.equals("Reason") || chargeChildName.equals("AllowanceChargeReason")) {
|
||||||
reason = XMLTools.trimOrNull(chargeNodeChilds.item(chargeChildIndex));
|
reason = XMLTools.trimOrNull(chargeNodeChilds.item(chargeChildIndex));
|
||||||
} else if (chargeChildName.equals("ReasonCode")) {
|
} else if (chargeChildName.equals("ReasonCode") || chargeChildName.equals("AllowanceChargeReasonCode")) {
|
||||||
reasonCode = XMLTools.trimOrNull(chargeNodeChilds.item(chargeChildIndex));
|
reasonCode = XMLTools.trimOrNull(chargeNodeChilds.item(chargeChildIndex));
|
||||||
} else if (chargeChildName.equals("CategoryTradeTax")) {
|
} else if (chargeChildName.equals("CategoryTradeTax") || chargeChildName.equals("TaxCategory")) {
|
||||||
NodeList taxChilds = chargeNodeChilds.item(chargeChildIndex).getChildNodes();
|
NodeList taxChilds = chargeNodeChilds.item(chargeChildIndex).getChildNodes();
|
||||||
for (int taxChildIndex = 0; taxChildIndex < taxChilds.getLength(); taxChildIndex++) {
|
for (int taxChildIndex = 0; taxChildIndex < taxChilds.getLength(); taxChildIndex++) {
|
||||||
String taxItemName = taxChilds.item(taxChildIndex).getLocalName();
|
String taxItemName = taxChilds.item(taxChildIndex).getLocalName();
|
||||||
if ((taxItemName != null) && (taxItemName.equals("RateApplicablePercent") || taxItemName.equals("ApplicablePercent"))) {
|
if ((taxItemName != null) && (taxItemName.equals("RateApplicablePercent") || taxItemName.equals("ApplicablePercent") || taxItemName.equals("Percent"))) {
|
||||||
taxPercent = XMLTools.trimOrNull(taxChilds.item(taxChildIndex));
|
taxPercent = XMLTools.trimOrNull(taxChilds.item(taxChildIndex));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -724,6 +936,7 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
TransactionCalculator tc = new TransactionCalculator(zpp);
|
TransactionCalculator tc = new TransactionCalculator(zpp);
|
||||||
String expectedStringTotalGross = tc.getGrandTotal()
|
String expectedStringTotalGross = tc.getGrandTotal()
|
||||||
.subtract(Objects.requireNonNullElse(zpp.getTotalPrepaidAmount(), BigDecimal.ZERO)).toPlainString();
|
.subtract(Objects.requireNonNullElse(zpp.getTotalPrepaidAmount(), BigDecimal.ZERO)).toPlainString();
|
||||||
@@ -821,9 +1034,10 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
*
|
*
|
||||||
* @return the file attachments embedded in XML (using base64) decoded as byte array,
|
* @return the file attachments embedded in XML (using base64) decoded as byte array,
|
||||||
* for PDF embedded files in FX use getFileAttachmentsPDF()
|
* for PDF embedded files in FX use getFileAttachmentsPDF()
|
||||||
|
* @deprecated use invoice.getAdditionalReferencedDocuments
|
||||||
*/
|
*/
|
||||||
public List<FileAttachment> getFileAttachmentsXML() {
|
public List<FileAttachment> getFileAttachmentsXML() {
|
||||||
return fileAttachments;
|
return new ArrayList<>(Arrays.asList(importedInvoice.getAdditionalReferencedDocuments()));
|
||||||
}
|
}
|
||||||
|
|
||||||
/***
|
/***
|
||||||
|
|||||||
@@ -106,7 +106,14 @@ public class NodeMap {
|
|||||||
* @return the text content of the matching node, converted to BigDecimal
|
* @return the text content of the matching node, converted to BigDecimal
|
||||||
*/
|
*/
|
||||||
public Optional<BigDecimal> getAsBigDecimal(String... localNames) {
|
public Optional<BigDecimal> getAsBigDecimal(String... localNames) {
|
||||||
return getNode(localNames).map(Node::getTextContent).map(s->new BigDecimal(s.trim()));
|
return getNode(localNames).map(Node::getTextContent).map(s->{
|
||||||
|
try {
|
||||||
|
return new BigDecimal(s.trim());
|
||||||
|
} catch (NumberFormatException e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -21,18 +21,29 @@
|
|||||||
*/
|
*/
|
||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import junit.framework.TestCase;
|
import junit.framework.TestCase;
|
||||||
|
import org.junit.Assert;
|
||||||
import org.junit.FixMethodOrder;
|
import org.junit.FixMethodOrder;
|
||||||
import org.junit.runners.MethodSorters;
|
import org.junit.runners.MethodSorters;
|
||||||
import org.mustangproject.*;
|
import org.mustangproject.*;
|
||||||
|
import org.mustangproject.ZUGFeRD.model.EventTimeCodeTypeConstants;
|
||||||
|
|
||||||
|
import javax.xml.xpath.XPathExpressionException;
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.nio.charset.StandardCharsets;
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.text.ParseException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
@FixMethodOrder(MethodSorters.NAME_ASCENDING)
|
||||||
public class DeSerializationTest extends TestCase {
|
public class DeSerializationTest extends ResourceCase {
|
||||||
public void testJackson() throws JsonProcessingException {
|
public void testJackson() throws JsonProcessingException {
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
@@ -50,6 +61,33 @@ public class DeSerializationTest extends TestCase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testInvoiceLine() throws JsonProcessingException {
|
||||||
|
File inputCII = getResourceAsFile("factur-x.xml");
|
||||||
|
boolean hasExceptions = false;
|
||||||
|
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter();
|
||||||
|
try {
|
||||||
|
zii.fromXML(new String(Files.readAllBytes(inputCII.toPath()), StandardCharsets.UTF_8));
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
CalculatedInvoice ci = new CalculatedInvoice();
|
||||||
|
try {
|
||||||
|
zii.extractInto(ci);
|
||||||
|
} catch (XPathExpressionException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
} catch (ParseException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
}
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
String jsonArray = mapper.writeValueAsString(ci);
|
||||||
|
assertFalse(hasExceptions);
|
||||||
|
assertTrue(jsonArray.contains("lineTotalAmount"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void testAllowanceRead() throws JsonProcessingException {
|
public void testAllowanceRead() throws JsonProcessingException {
|
||||||
|
|
||||||
ObjectMapper mapper = new ObjectMapper();
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
@@ -121,14 +159,85 @@ public class DeSerializationTest extends TestCase {
|
|||||||
" }\n" +
|
" }\n" +
|
||||||
" ]\n" +
|
" ]\n" +
|
||||||
"}", Invoice.class);
|
"}", Invoice.class);
|
||||||
TransactionCalculator tc=new TransactionCalculator(fromJSON);
|
TransactionCalculator tc = new TransactionCalculator(fromJSON);
|
||||||
assertEquals(tc.getGrandTotal(),new BigDecimal("234.43"));
|
assertEquals(tc.getGrandTotal(), new BigDecimal("234.43"));
|
||||||
assertEquals(fromJSON.getNumber(), fromJSON.getNumber());
|
assertEquals(fromJSON.getNumber(), fromJSON.getNumber());
|
||||||
assertEquals(fromJSON.getZFItems().length, fromJSON.getZFItems().length);
|
assertEquals(fromJSON.getZFItems().length, fromJSON.getZFItems().length);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testFull300Roundtrip() {
|
||||||
|
File inputCII = getResourceAsFile("not_validating_full_invoice_based_onTest_EeISI_300_CENfullmodel.cii.xml");
|
||||||
|
|
||||||
|
Invoice i=new Invoice();
|
||||||
|
String exText=null;
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter();
|
||||||
|
zii.doIgnoreCalculationErrors();
|
||||||
|
try {
|
||||||
|
zii.fromXML(new String(Files.readAllBytes(inputCII.toPath()), StandardCharsets.UTF_8));
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
zii.extractInto(i);
|
||||||
|
String json = mapper.writeValueAsString(i);
|
||||||
|
Invoice newInvoiceFromJSON = mapper.readValue(json, Invoice.class);
|
||||||
|
|
||||||
|
assertEquals("Test_EeISI_100",i.getNumber());
|
||||||
|
assertEquals(newInvoiceFromJSON.getNumber(),i.getNumber());
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
exText=e.getMessage();
|
||||||
|
} catch (XPathExpressionException e) {
|
||||||
|
exText=e.getMessage();
|
||||||
|
} catch (ParseException e) {
|
||||||
|
exText=e.getMessage();
|
||||||
|
}
|
||||||
|
assertNull(exText);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void testIssuerAssignedIDRoundtrip() {
|
||||||
|
String occurrenceFrom = "20201001";
|
||||||
|
String occurrenceTo = "20201005";
|
||||||
|
String contractID = "376zreurzu0983";
|
||||||
|
|
||||||
|
String orgID = "0009845";
|
||||||
|
String orgname = "Test company";
|
||||||
|
String number = "123";
|
||||||
|
String priceStr = "1.00";
|
||||||
|
String taxID = "9990815";
|
||||||
|
BigDecimal price = new BigDecimal(priceStr);
|
||||||
|
Invoice newInvoiceFromJSON = null;
|
||||||
|
boolean hasExceptions = false;
|
||||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
|
try {
|
||||||
|
SchemedID gtin = new SchemedID("0160", "2001015001325");
|
||||||
|
SchemedID gln = new SchemedID("0088", "4304171000002");
|
||||||
|
Invoice i = new Invoice().setCurrency("CHF").addNote("document level 1/2").addNote("document level 2/2").setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date())
|
||||||
|
.setSellerOrderReferencedDocumentID("9384").setBuyerOrderReferencedDocumentID("28934")
|
||||||
|
.setDetailedDeliveryPeriod(new SimpleDateFormat("yyyyMMdd").parse(occurrenceFrom), new SimpleDateFormat("yyyyMMdd").parse(occurrenceTo))
|
||||||
|
.setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").addTaxID(taxID).setEmail("sender@test.org").setID(orgID).addVATID("DE0815"))
|
||||||
|
.setDeliveryAddress(new TradeParty("just the other side of the street", "teststr.12a", "55232", "Entenhausen", "DE").addVATID("DE47110"))
|
||||||
|
.setContractReferencedDocument(contractID)
|
||||||
|
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addGlobalID(gln).setEmail("recipient@test.org").addVATID("DE4711")
|
||||||
|
.setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE").setFax("++49555123456")).setAdditionalAddress("Hinterhaus 3"))
|
||||||
|
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(16)).addGlobalID(gtin).setSellerAssignedID("4711"), price, new BigDecimal(1.0)).setId("a123").addReferencedLineID("xxx").addNote("item level 1/1").addAllowance(new Allowance(new BigDecimal(0.02)).setReason("item discount").setTaxPercent(new BigDecimal(16))).setDetailedDeliveryPeriod(sdf.parse("2020-01-13"), sdf.parse("2020-01-15")))
|
||||||
|
.addCharge(new Charge(new BigDecimal(0.5)).setReason("quick delivery charge").setTaxPercent(new BigDecimal(16)))
|
||||||
|
.addAllowance(new Allowance(new BigDecimal(0.2)).setReason("discount").setTaxPercent(new BigDecimal(16)))
|
||||||
|
.addCashDiscount(new CashDiscount(new BigDecimal(2), 14))
|
||||||
|
.setDeliveryDate(sdf.parse("2020-11-02")).setNumber(number).setVATDueDateTypeCode(EventTimeCodeTypeConstants.PAYMENT_DATE);
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
String json = mapper.writeValueAsString(i);
|
||||||
|
newInvoiceFromJSON = mapper.readValue(json, Invoice.class);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
}
|
||||||
|
assertEquals(newInvoiceFromJSON.getBuyerOrderReferencedDocumentID(), "28934");
|
||||||
|
assertFalse(hasExceptions);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public void testDueDateRoundtrip() throws JsonProcessingException {
|
public void testDueDateRoundtrip() throws JsonProcessingException {
|
||||||
|
|
||||||
@@ -186,4 +295,389 @@ public class DeSerializationTest extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public void testDirectDebit() throws JsonProcessingException {
|
||||||
|
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
|
||||||
|
// [{"stringValue":"a","intValue":1,"booleanValue":true},
|
||||||
|
// {"stringValue":"bc","intValue":3,"booleanValue":false}]
|
||||||
|
|
||||||
|
boolean exceptions = false;
|
||||||
|
String theXML = "";
|
||||||
|
try {
|
||||||
|
Invoice fromJSON = mapper.readValue("\n" +
|
||||||
|
"\t{\n" +
|
||||||
|
"\t\t\"documentCode\": \"380\",\n" +
|
||||||
|
"\t\t\"number\": \"F20220031\",\n" +
|
||||||
|
"\t\t\"referenceNumber\": \"SERVEXEC\",\n" +
|
||||||
|
"\t\t\"buyerOrderReferencedDocumentID\": \"PO201925478\",\n" +
|
||||||
|
"\t\t\"ownOrganisationName\": \"LE FOURNISSEUR\",\n" +
|
||||||
|
"\t\t\"currency\": \"EUR\",\n" +
|
||||||
|
"\t\t\"issueDate\": \"2022-01-30T23:00:00.000+00:00\",\n" +
|
||||||
|
"\t\t\"dueDate\": \"2022-03-01T23:00:00.000+00:00\",\n" +
|
||||||
|
"\t\t\"deliveryDate\": \"2022-01-27T23:00:00.000+00:00\",\n" +
|
||||||
|
"\t\t\"sender\": {\n" +
|
||||||
|
"\t\t\"name\": \"LE FOURNISSEUR\",\n" +
|
||||||
|
"\t\t\t\"zip\": \"75018\",\n" +
|
||||||
|
"\t\t\t\"street\": \"35 rue d'ici\",\n" +
|
||||||
|
"\t\t\t\"location\": \"PARIS\",\n" +
|
||||||
|
"\t\t\t\"country\": \"FR\",\n" +
|
||||||
|
"\t\t\t\"vatID\": \"FR11123456782\",\n" +
|
||||||
|
"\t\t\t\"additionalAddress\": \"Seller line 2\",\n" +
|
||||||
|
"\t\t\t\"additionalAddressExtension\": \"Seller line 3\",\n" +
|
||||||
|
"\t\t\t\"bankDetails\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"accountName\": null,\n" +
|
||||||
|
"\t\t\t\"iban\": \"FR20 1254 2547 2569 8542 5874 698\",\n" +
|
||||||
|
"\t\t\t\"bic\": \"BIC_MONCOMPTE\"\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"debitDetails\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"mandate\": \"MANDATE PT\",\n" +
|
||||||
|
"\t\t\t\"iban\": \"FR20 1254 2547 2569 8542 5874 698\"\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"contact\": {\n" +
|
||||||
|
"\t\t\t\"name\": \"M. CONTACT\",\n" +
|
||||||
|
"\t\t\t\t\"phone\": \"01 02 03 54 87\",\n" +
|
||||||
|
"\t\t\t\t\"email\": \"seller@seller.com\",\n" +
|
||||||
|
"\t\t\t\t\"zip\": null,\n" +
|
||||||
|
"\t\t\t\t\"street\": null,\n" +
|
||||||
|
"\t\t\t\t\"location\": null,\n" +
|
||||||
|
"\t\t\t\t\"country\": null,\n" +
|
||||||
|
"\t\t\t\t\"fax\": null,\n" +
|
||||||
|
"\t\t\t\t\"vatid\": null,\n" +
|
||||||
|
"\t\t\t\t\"id\": null,\n" +
|
||||||
|
"\t\t\t\t\"additionalAddress\": null\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\"email\": \"moi@seller.com\",\n" +
|
||||||
|
"\t\t\t\"vatid\": \"FR11123456782\",\n" +
|
||||||
|
"\t\t\t\"id\": \"123\",\n" +
|
||||||
|
"\t\t\t\"legalOrganisation\": {\n" +
|
||||||
|
"\t\t\t\"schemedID\": null,\n" +
|
||||||
|
"\t\t\t\t\"tradingBusinessName\": \"SELLER TRADE NAME\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\"globalID\": \"587451236587\",\n" +
|
||||||
|
"\t\t\t\"globalIDScheme\": \"0088\"\n" +
|
||||||
|
"\t},\n" +
|
||||||
|
"\t\t\"recipient\": {\n" +
|
||||||
|
"\t\t\"name\": \"LE CLIENT\",\n" +
|
||||||
|
"\t\t\t\"zip\": \"06000\",\n" +
|
||||||
|
"\t\t\t\"street\": \"MON ADRESSE LIGNE 1\",\n" +
|
||||||
|
"\t\t\t\"location\": \"MA VILLE\",\n" +
|
||||||
|
"\t\t\t\"country\": \"FR\",\n" +
|
||||||
|
"\t\t\t\"vatID\": \"FR 05 987 654 321\",\n" +
|
||||||
|
"\t\t\t\"additionalAddress\": \"Buyer line 2\",\n" +
|
||||||
|
"\t\t\t\"additionalAddressExtension\": \"Buyer line 3\",\n" +
|
||||||
|
"\t\t\t\"contact\": {\n" +
|
||||||
|
"\t\t\t\"name\": \"Buyer contact name\",\n" +
|
||||||
|
"\t\t\t\t\"phone\": \"01 01 25 45 87\",\n" +
|
||||||
|
"\t\t\t\t\"email\": \"buyer@buyer.com\",\n" +
|
||||||
|
"\t\t\t\t\"zip\": null,\n" +
|
||||||
|
"\t\t\t\t\"street\": null,\n" +
|
||||||
|
"\t\t\t\t\"location\": null,\n" +
|
||||||
|
"\t\t\t\t\"country\": null,\n" +
|
||||||
|
"\t\t\t\t\"fax\": null,\n" +
|
||||||
|
"\t\t\t\t\"vatid\": null,\n" +
|
||||||
|
"\t\t\t\t\"id\": null,\n" +
|
||||||
|
"\t\t\t\t\"additionalAddress\": null\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\"email\": \"me@buyer.com\",\n" +
|
||||||
|
"\t\t\t\"vatid\": \"FR 05 987 654 321\",\n" +
|
||||||
|
"\t\t\t\"legalOrganisation\": {\n" +
|
||||||
|
"\t\t\t\"schemedID\": null,\n" +
|
||||||
|
"\t\t\t\t\"tradingBusinessName\": null\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\"globalID\": \"3654789851\",\n" +
|
||||||
|
"\t\t\t\"globalIDScheme\": \"0088\"\n" +
|
||||||
|
"\t},\n" +
|
||||||
|
"\t\t\"deliveryAddress\": {\n" +
|
||||||
|
"\t\t\"name\": \"DEL Name\",\n" +
|
||||||
|
"\t\t\t\"zip\": \"06000\",\n" +
|
||||||
|
"\t\t\t\"street\": \"DEL ADRESSE LIGNE 1\",\n" +
|
||||||
|
"\t\t\t\"location\": \"NICE\",\n" +
|
||||||
|
"\t\t\t\"country\": \"FR\",\n" +
|
||||||
|
"\t\t\t\"additionalAddress\": \"DEL line 2\",\n" +
|
||||||
|
"\t\t\t\"id\": \"PRIVATE_ID_DEL\"\n" +
|
||||||
|
"\t},\n" +
|
||||||
|
"\t\t\"payee\": {\n" +
|
||||||
|
"\t\t\"name\": \"PAYEE NAME\",\n" +
|
||||||
|
"\t\t\t\"legalOrganisation\": {\n" +
|
||||||
|
"\t\t\t\"schemedID\": null,\n" +
|
||||||
|
"\t\t\t\t\"tradingBusinessName\": null\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\"globalID\": \"587451236586\",\n" +
|
||||||
|
"\t\t\t\"globalIDScheme\": \"0088\"\n" +
|
||||||
|
"\t},\n" +
|
||||||
|
"\t\t\"sellerOrderReferencedDocumentID\": \"SALES REF 2547\",\n" +
|
||||||
|
"\t\t\"despatchAdviceReferencedDocumentID\": \"DESPADV002\",\n" +
|
||||||
|
"\t\t\"grandTotal\": 107.82,\n" +
|
||||||
|
"\t\t\"detailedDeliveryPeriodFrom\": \"2021-12-31T23:00:00.000+00:00\",\n" +
|
||||||
|
"\t\t\"detailedDeliveryPeriodTo\": \"2022-12-30T23:00:00.000+00:00\",\n" +
|
||||||
|
"\t\t\"notesWithSubjectCode\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"content\": \"FOURNISSEUR F SARL au capital de 50 000 EUR\",\n" +
|
||||||
|
"\t\t\t\"subjectCode\": \"REG\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"content\": \"RCS MAVILLE 123 456 782\",\n" +
|
||||||
|
"\t\t\t\"subjectCode\": \"ABL\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"content\": \"35 ma rue a moi, code postal Ville Pays – contact@masociete.fr - www.masociete.fr – N° TVA : FR32 123 456 789\",\n" +
|
||||||
|
"\t\t\t\"subjectCode\": \"AAI\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"content\": \"Tout retard de paiement engendre une pénalité exigible à compter de la date d'échéance, calculée sur la base de trois fois le taux d'intérêt légal.\",\n" +
|
||||||
|
"\t\t\t\"subjectCode\": null\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"content\": \"Indemnité forfaitaire pour frais de recouvrement en cas de retard de paiement : 40 €.\",\n" +
|
||||||
|
"\t\t\t\"subjectCode\": null\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"content\": \"Les réglements reçus avant la date d'échéance ne donneront pas lieu à escompte.\",\n" +
|
||||||
|
"\t\t\t\"subjectCode\": null\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"zfallowances\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE VOLUME\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"71\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE VOLUME\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"71\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE VOLUME\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"71\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": null,\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"100\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 2,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE VOLUME\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"71\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE VOLUME\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"71\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE VOLUME\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"71\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": null,\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"100\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1.4,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": 20,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE COMMERCIALE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"100\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1.2,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": 10,\n" +
|
||||||
|
"\t\t\t\"reason\": \"REMISE COMMERCIALE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"100\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"zfcharges\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS PALETTE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": null,\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS PALETTE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": null,\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS PALETTE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": null,\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS PALETTE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": null,\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": null,\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"ADL\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS PALETTE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": null,\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 1,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": null,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS PALETTE\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": null,\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 2.8,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": 20,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS DEPLACEMENT\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"FC\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"percent\": null,\n" +
|
||||||
|
"\t\t\t\"totalAmount\": 0.6,\n" +
|
||||||
|
"\t\t\t\"taxPercent\": 10,\n" +
|
||||||
|
"\t\t\t\"reason\": \"FRAIS DEPLACEMENT\",\n" +
|
||||||
|
"\t\t\t\"reasonCode\": \"ADR\",\n" +
|
||||||
|
"\t\t\t\"categoryCode\": \"S\"\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"tradeSettlement\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"accountName\": null,\n" +
|
||||||
|
"\t\t\t\"iban\": \"FR20 1254 2547 2569 8542 5874 698\",\n" +
|
||||||
|
"\t\t\t\"bic\": \"BIC_MONCOMPTE\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"mandate\": \"MANDATE PT\",\n" +
|
||||||
|
"\t\t\t\"iban\": \"FR20 1254 2547 2569 8542 5874 698\"\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"zfitems\": [\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"price\": 60,\n" +
|
||||||
|
"\t\t\t\"quantity\": 1,\n" +
|
||||||
|
"\t\t\t\"basisQuantity\": 1,\n" +
|
||||||
|
"\t\t\t\"product\": {\n" +
|
||||||
|
"\t\t\t\"unit\": \"C62\",\n" +
|
||||||
|
"\t\t\t\t\"name\": \"REMBOURSEMENT AFFRANCHISSEMENT\",\n" +
|
||||||
|
"\t\t\t\t\"description\": \"Description\",\n" +
|
||||||
|
"\t\t\t\t\"taxCategoryCode\": \"Z\",\n" +
|
||||||
|
"\t\t\t\t\"vatpercent\": 0,\n" +
|
||||||
|
"\t\t\t\t\"reverseCharge\": false,\n" +
|
||||||
|
"\t\t\t\t\"intraCommunitySupply\": false,\n" +
|
||||||
|
"\t\t\t\t\"globalID\": \"598785412598745\",\n" +
|
||||||
|
"\t\t\t\t\"globalIDScheme\": \"0160\"\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\t\"buyerOrderReferencedDocumentLineID\": \"1\",\n" +
|
||||||
|
"\t\t\t\"value\": 60\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"price\": 30,\n" +
|
||||||
|
"\t\t\t\"quantity\": 3,\n" +
|
||||||
|
"\t\t\t\"basisQuantity\": 3,\n" +
|
||||||
|
"\t\t\t\"product\": {\n" +
|
||||||
|
"\t\t\t\"unit\": \"C62\",\n" +
|
||||||
|
"\t\t\t\t\"name\": \"FOURNITURES DIVERSES\",\n" +
|
||||||
|
"\t\t\t\t\"description\": \"Description\",\n" +
|
||||||
|
"\t\t\t\t\"taxCategoryCode\": \"S\",\n" +
|
||||||
|
"\t\t\t\t\"vatpercent\": 20,\n" +
|
||||||
|
"\t\t\t\t\"reverseCharge\": false,\n" +
|
||||||
|
"\t\t\t\t\"intraCommunitySupply\": false\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\t\"buyerOrderReferencedDocumentLineID\": \"3\",\n" +
|
||||||
|
"\t\t\t\"value\": 30\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t{\n" +
|
||||||
|
"\t\t\t\"price\": 12,\n" +
|
||||||
|
"\t\t\t\"quantity\": 1,\n" +
|
||||||
|
"\t\t\t\"basisQuantity\": 1,\n" +
|
||||||
|
"\t\t\t\"product\": {\n" +
|
||||||
|
"\t\t\t\"unit\": \"C62\",\n" +
|
||||||
|
"\t\t\t\t\"name\": \"APPEL\",\n" +
|
||||||
|
"\t\t\t\t\"description\": \"Description\",\n" +
|
||||||
|
"\t\t\t\t\"taxCategoryCode\": \"S\",\n" +
|
||||||
|
"\t\t\t\t\"vatpercent\": 10,\n" +
|
||||||
|
"\t\t\t\t\"reverseCharge\": false,\n" +
|
||||||
|
"\t\t\t\t\"intraCommunitySupply\": false\n" +
|
||||||
|
"\t\t},\n" +
|
||||||
|
"\t\t\t\"buyerOrderReferencedDocumentLineID\": \"2\",\n" +
|
||||||
|
"\t\t\t\"value\": 12\n" +
|
||||||
|
"\t\t}\n" +
|
||||||
|
" ],\n" +
|
||||||
|
"\t\t\"ownStreet\": \"35 rue d'ici\",\n" +
|
||||||
|
"\t\t\"ownCountry\": \"FR\",\n" +
|
||||||
|
"\t\t\"ownZIP\": \"75018\",\n" +
|
||||||
|
"\t\t\"ownLocation\": \"PARIS\",\n" +
|
||||||
|
"\t\t\"ownVATID\": \"FR11123456782\",\n" +
|
||||||
|
"\t\t\"valid\": false\n" +
|
||||||
|
"\t}\n", Invoice.class);
|
||||||
|
ZUGFeRD2PullProvider zf2p = new ZUGFeRD2PullProvider();
|
||||||
|
zf2p.setProfile(Profiles.getByName("XRechnung"));
|
||||||
|
zf2p.generateXML(fromJSON);
|
||||||
|
theXML = new String(zf2p.getXML());
|
||||||
|
} catch (Exception e) {
|
||||||
|
exceptions = true;
|
||||||
|
}
|
||||||
|
assertTrue(theXML.contains("pour frais de recouvrement en cas de retard de paiement"));
|
||||||
|
assertFalse(exceptions);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -136,11 +136,11 @@ public class XRTest extends TestCase {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
fail("IOException not expected");
|
fail("IOException not expected");
|
||||||
}
|
}
|
||||||
List<FileAttachment> attachedFiles=zii.getFileAttachmentsXML();
|
FileAttachment[] attachedFiles=readInvoice.getAdditionalReferencedDocuments();
|
||||||
assertNotNull(attachedFiles);
|
assertNotNull(attachedFiles);
|
||||||
assertEquals(attachedFiles.size(), 1);
|
assertEquals(attachedFiles.length, 1);
|
||||||
|
|
||||||
assertTrue(Arrays.equals(attachedFiles.get(0).getData(), b));
|
assertTrue(Arrays.equals(attachedFiles[0].getData(), b));
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
package org.mustangproject.ZUGFeRD;
|
package org.mustangproject.ZUGFeRD;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
|
import java.io.FileInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
@@ -29,6 +30,7 @@ import java.nio.charset.StandardCharsets;
|
|||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.mustangproject.*;
|
import org.mustangproject.*;
|
||||||
import org.junit.FixMethodOrder;
|
import org.junit.FixMethodOrder;
|
||||||
@@ -61,9 +63,9 @@ public class ZF2PushTest extends TestCase {
|
|||||||
final String TARGET_REVERSECHARGEPDF = "./target/testout-ZF2PushReverseCharge.pdf";
|
final String TARGET_REVERSECHARGEPDF = "./target/testout-ZF2PushReverseCharge.pdf";
|
||||||
|
|
||||||
public void testPushExport() {
|
public void testPushExport() {
|
||||||
/***
|
/***
|
||||||
* This writes to a filename like an official sample, please consider when changing (probably better not?)
|
* This writes to a filename like an official sample, please consider when changing (probably better not?)
|
||||||
*/
|
*/
|
||||||
// the writing part
|
// the writing part
|
||||||
String orgname = "Bei Spiel GmbH";
|
String orgname = "Bei Spiel GmbH";
|
||||||
String number = "RE-20201121/508";
|
String number = "RE-20201121/508";
|
||||||
@@ -88,6 +90,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
.addItem(new Item(new Product("Design (hours)", "Of a sample invoice", "HUR", new BigDecimal(7)), price, new BigDecimal(1.0)))
|
.addItem(new Item(new Product("Design (hours)", "Of a sample invoice", "HUR", new BigDecimal(7)), price, new BigDecimal(1.0)))
|
||||||
.addItem(new Item(new Product("Ballons", "various colors, ~2000ml", "H87", new BigDecimal(19)), new BigDecimal("0.79"), new BigDecimal(400.0)))
|
.addItem(new Item(new Product("Ballons", "various colors, ~2000ml", "H87", new BigDecimal(19)), new BigDecimal("0.79"), new BigDecimal(400.0)))
|
||||||
.addItem(new Item(new Product("Hot air „heiße Luft“ (litres)", "", "LTR", new BigDecimal(19)), new BigDecimal("0.025"), new BigDecimal(800.0)))
|
.addItem(new Item(new Product("Hot air „heiße Luft“ (litres)", "", "LTR", new BigDecimal(19)), new BigDecimal("0.025"), new BigDecimal(800.0)))
|
||||||
|
.setRoundingAmount(new BigDecimal("1"))
|
||||||
);
|
);
|
||||||
|
|
||||||
ze.export(TARGET_PDF);
|
ze.export(TARGET_PDF);
|
||||||
@@ -95,6 +98,15 @@ public class ZF2PushTest extends TestCase {
|
|||||||
fail("Exception should not be raised");
|
fail("Exception should not be raised");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(TARGET_PDF);
|
||||||
|
Invoice i = new Invoice();
|
||||||
|
try {
|
||||||
|
zii.extractInto(i);
|
||||||
|
} catch (XPathExpressionException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
} catch (ParseException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// now check the contents (like MustangReaderTest)
|
// now check the contents (like MustangReaderTest)
|
||||||
@@ -128,6 +140,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
|
|
||||||
String senderDescription = "Kleinunternehmer";
|
String senderDescription = "Kleinunternehmer";
|
||||||
String taxID = "9990815";
|
String taxID = "9990815";
|
||||||
|
String theNote="oh lala";
|
||||||
BigDecimal price = new BigDecimal(priceStr);
|
BigDecimal price = new BigDecimal(priceStr);
|
||||||
try {
|
try {
|
||||||
InputStream SOURCE_PDF = this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
|
InputStream SOURCE_PDF = this.getClass().getResourceAsStream("/MustangGnuaccountingBeispielRE-20170509_505blanko.pdf");
|
||||||
@@ -145,7 +158,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addVATID("DE4711")
|
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addVATID("DE4711")
|
||||||
.setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE")))
|
.setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE")))
|
||||||
.setNumber(number)
|
.setNumber(number)
|
||||||
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(0)).setTaxExemptionReason("Kleinunternehmer gemäß §19 UStG").setTaxCategoryCode("E"), price, new BigDecimal(1.0)))
|
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(0)).setTaxExemptionReason("Kleinunternehmer gemäß §19 UStG").setTaxCategoryCode("E"), price, new BigDecimal(1.0)).addNote(theNote))
|
||||||
);
|
);
|
||||||
String theXML = new String(ze.getProvider().getXML());
|
String theXML = new String(ze.getProvider().getXML());
|
||||||
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
assertTrue(theXML.contains("<rsm:CrossIndustryInvoice"));
|
||||||
@@ -154,7 +167,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
fail("IOException should not be raised");
|
fail("IOException should not be raised");
|
||||||
}
|
}
|
||||||
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(TARGET_ATTACHMENTSPDF);
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(TARGET_ATTACHMENTSPDF);
|
||||||
Invoice i= null;
|
Invoice i = null;
|
||||||
try {
|
try {
|
||||||
i = zii.extractInvoice();
|
i = zii.extractInvoice();
|
||||||
} catch (XPathExpressionException e) {
|
} catch (XPathExpressionException e) {
|
||||||
@@ -162,7 +175,9 @@ public class ZF2PushTest extends TestCase {
|
|||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
assertEquals(senderDescription,i.getSender().getDescription());
|
|
||||||
|
assertEquals(i.getZFItems()[0].getNotesWithSubjectCode().get(0).getContent(),theNote);
|
||||||
|
assertEquals(senderDescription, i.getSender().getDescription());
|
||||||
|
|
||||||
// now check the contents (like MustangReaderTest)
|
// now check the contents (like MustangReaderTest)
|
||||||
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_ATTACHMENTSPDF);
|
ZUGFeRDImporter zi = new ZUGFeRDImporter(TARGET_ATTACHMENTSPDF);
|
||||||
@@ -233,6 +248,8 @@ public class ZF2PushTest extends TestCase {
|
|||||||
|
|
||||||
ZUGFeRDExporterFromA1 ze = new ZUGFeRDExporterFromA1();
|
ZUGFeRDExporterFromA1 ze = new ZUGFeRDExporterFromA1();
|
||||||
ze.ignorePDFAErrors().load(SOURCE_PDF);
|
ze.ignorePDFAErrors().load(SOURCE_PDF);
|
||||||
|
ze.setProfile(Profiles.getByName("Extended"));
|
||||||
|
|
||||||
ze.setProducer("My Application").setCreator(System.getProperty("user.name")).setZUGFeRDVersion(2).setProfile("extended");
|
ze.setProducer("My Application").setCreator(System.getProperty("user.name")).setZUGFeRDVersion(2).setProfile("extended");
|
||||||
// ze.setTransaction(new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()).setSender(new TradeParty(orgname,"teststr", "55232","teststadt","DE")).setOwnTaxID("4711").setOwnVATID("DE0815").setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE")).setNumber(number)
|
// ze.setTransaction(new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date()).setSender(new TradeParty(orgname,"teststr", "55232","teststadt","DE")).setOwnTaxID("4711").setOwnVATID("DE0815").setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE")).setNumber(number)
|
||||||
// .addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance().setPercent(new BigDecimal(50)))));
|
// .addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance().setPercent(new BigDecimal(50)))));
|
||||||
@@ -244,7 +261,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
.setNumber(number)
|
.setNumber(number)
|
||||||
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance(new BigDecimal("0.1"))))
|
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance(new BigDecimal("0.1"))))
|
||||||
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance().setPercent(new BigDecimal(50))))
|
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance().setPercent(new BigDecimal(50))))
|
||||||
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(2.0)).addCharge(new Charge(new BigDecimal(1))))
|
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(2.0)).addCharge(new Charge(new BigDecimal(1)).setReasonCode("AK")))
|
||||||
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addCharge(new Charge(new BigDecimal(1))).addAllowance(new Allowance(new BigDecimal("1"))))
|
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addCharge(new Charge(new BigDecimal(1))).addAllowance(new Allowance(new BigDecimal("1"))))
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -292,7 +309,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
// .addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance().setPercent(new BigDecimal(50)))));
|
// .addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(19)), amount, new BigDecimal(1.0)).addAllowance(new Allowance().setPercent(new BigDecimal(50)))));
|
||||||
|
|
||||||
ze.setTransaction(new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date())
|
ze.setTransaction(new Invoice().setDueDate(new Date()).setIssueDate(new Date()).setDeliveryDate(new Date())
|
||||||
.setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").addVATID("DE0815").addTaxID ("4711"))
|
.setSender(new TradeParty(orgname, "teststr", "55232", "teststadt", "DE").addVATID("DE0815").addTaxID("4711"))
|
||||||
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addVATID("DE0816")
|
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addVATID("DE0816")
|
||||||
.setContact(new Contact("contact testname", "123456", "contact.testemail@example.org").setFax("0911623562")))
|
.setContact(new Contact("contact testname", "123456", "contact.testemail@example.org").setFax("0911623562")))
|
||||||
.setDeliveryAddress(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addVATID("DE0816"))
|
.setDeliveryAddress(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addVATID("DE0816"))
|
||||||
@@ -362,7 +379,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
fail("IOException should not be raised");
|
fail("IOException should not be raised");
|
||||||
}
|
}
|
||||||
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(TARGET_INTRACOMMUNITYSUPPLYMANUALPDF);
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(TARGET_INTRACOMMUNITYSUPPLYMANUALPDF);
|
||||||
Invoice i= null;
|
Invoice i = null;
|
||||||
try {
|
try {
|
||||||
i = zii.extractInvoice();
|
i = zii.extractInvoice();
|
||||||
} catch (XPathExpressionException e) {
|
} catch (XPathExpressionException e) {
|
||||||
@@ -520,11 +537,12 @@ public class ZF2PushTest extends TestCase {
|
|||||||
.setContractReferencedDocument(contractID)
|
.setContractReferencedDocument(contractID)
|
||||||
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addGlobalID(gln).setEmail("recipient@test.org").addVATID("DE4711")
|
.setRecipient(new TradeParty("Franz Müller", "teststr.12", "55232", "Entenhausen", "DE").addGlobalID(gln).setEmail("recipient@test.org").addVATID("DE4711")
|
||||||
.setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE").setFax("++49555123456")).setAdditionalAddress("Hinterhaus 3"))
|
.setContact(new Contact("Franz Müller", "01779999999", "franz@mueller.de", "teststr. 12", "55232", "Entenhausen", "DE").setFax("++49555123456")).setAdditionalAddress("Hinterhaus 3"))
|
||||||
.addItem(new Item(new Product("Testprodukt", "", "C62", new BigDecimal(16)).addGlobalID(gtin).setSellerAssignedID("4711"), price, new BigDecimal(1.0)).addReferencedLineID("xxx").addNote("item level 1/1").addAllowance(new Allowance(new BigDecimal(0.02)).setReason("item discount").setTaxPercent(new BigDecimal(16))).setDetailedDeliveryPeriod(sdf.parse("2020-01-13"), sdf.parse("2020-01-15")))
|
.addItem(new Item(new Product("Testprodukt", "", "H87", new BigDecimal(16)).addGlobalID(gtin).setSellerAssignedID("4711"), price, new BigDecimal(1.0)).setId("a123").addReferencedLineID("xxx").addNote("item level 1/1").addAllowance(new Allowance(new BigDecimal(0.02)).setReason("item discount").setTaxPercent(new BigDecimal(16))).setDetailedDeliveryPeriod(sdf.parse("2020-01-13"), sdf.parse("2020-01-15")))
|
||||||
.addCharge(new Charge(new BigDecimal(0.5)).setReason("quick delivery charge").setTaxPercent(new BigDecimal(16)))
|
.addCharge(new Charge(new BigDecimal(0.5)).setReason("quick delivery charge").setTaxPercent(new BigDecimal(16)))
|
||||||
.addAllowance(new Allowance(new BigDecimal(0.2)).setReason("discount").setTaxPercent(new BigDecimal(16)))
|
.addAllowance(new Allowance(new BigDecimal(0.2)).setReason("discount").setTaxPercent(new BigDecimal(16)))
|
||||||
.addCashDiscount(new CashDiscount(new BigDecimal(2), 14))
|
.addCashDiscount(new CashDiscount(new BigDecimal(2), 14))
|
||||||
.setDeliveryDate(sdf.parse("2020-11-02")).setNumber(number).setVATDueDateTypeCode(EventTimeCodeTypeConstants.PAYMENT_DATE)
|
.setDeliveryDate(sdf.parse("2020-11-02")).setNumber(number).setVATDueDateTypeCode(EventTimeCodeTypeConstants.PAYMENT_DATE)
|
||||||
|
.setInvoiceReferencedDocumentID("abc123")
|
||||||
);
|
);
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@@ -552,7 +570,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
assertTrue(zi.getUTF8().contains(occurrenceFrom));
|
assertTrue(zi.getUTF8().contains(occurrenceFrom));
|
||||||
assertTrue(zi.getUTF8().contains(occurrenceTo));
|
assertTrue(zi.getUTF8().contains(occurrenceTo));
|
||||||
assertTrue(zi.getUTF8().contains(contractID));
|
assertTrue(zi.getUTF8().contains(contractID));
|
||||||
|
assertEquals(zi.importedInvoice.getZFItems()[0].getId(), "a123");
|
||||||
assertTrue(zi.getUTF8().contains("20200113")); // to contain item delivery periods
|
assertTrue(zi.getUTF8().contains("20200113")); // to contain item delivery periods
|
||||||
assertTrue(zi.getUTF8().contains("20200115")); // to contain item delivery periods
|
assertTrue(zi.getUTF8().contains("20200115")); // to contain item delivery periods
|
||||||
|
|
||||||
@@ -568,6 +586,7 @@ public class ZF2PushTest extends TestCase {
|
|||||||
try {
|
try {
|
||||||
Invoice i = zii.extractInvoice();
|
Invoice i = zii.extractInvoice();
|
||||||
|
|
||||||
|
assertEquals("abc123", i.getInvoiceReferencedDocumentID());
|
||||||
assertEquals("4304171000002", i.getRecipient().getGlobalID());
|
assertEquals("4304171000002", i.getRecipient().getGlobalID());
|
||||||
assertEquals("2001015001325", i.getZFItems()[0].getProduct().getGlobalID());
|
assertEquals("2001015001325", i.getZFItems()[0].getProduct().getGlobalID());
|
||||||
assertEquals(orgID, i.getSender().getID());
|
assertEquals(orgID, i.getSender().getID());
|
||||||
@@ -784,4 +803,24 @@ public class ZF2PushTest extends TestCase {
|
|||||||
match the read grand total */
|
match the read grand total */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
public void testRead() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter("\\Users\\jstaerk\\temp\\1424413_anonymized.xml");
|
||||||
|
try {
|
||||||
|
Invoice i = zii.extractInvoice();
|
||||||
|
|
||||||
|
TransactionCalculator tc=new TransactionCalculator(i);
|
||||||
|
assertEquals(0,tc.getGrandTotal().compareTo(new BigDecimal("442.83")));
|
||||||
|
|
||||||
|
} catch (XPathExpressionException e) {
|
||||||
|
fail("XPathExpressionException should not be raised");
|
||||||
|
} catch (ParseException e) {
|
||||||
|
fail("ParseException should not be raised");
|
||||||
|
/* a parseException would also be fired if the calculated grand total does not
|
||||||
|
match the read grand total */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,13 +22,17 @@ package org.mustangproject.ZUGFeRD;
|
|||||||
|
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
|
||||||
|
import org.apache.commons.codec.binary.StringUtils;
|
||||||
import org.junit.jupiter.api.Test;
|
import org.junit.jupiter.api.Test;
|
||||||
import org.mustangproject.*;
|
import org.mustangproject.*;
|
||||||
|
|
||||||
import javax.xml.xpath.XPathExpressionException;
|
import javax.xml.xpath.XPathExpressionException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileInputStream;
|
import java.io.FileInputStream;
|
||||||
|
import java.io.FileNotFoundException;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
import java.io.InputStream;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
@@ -72,6 +76,7 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
assertEquals("LTR", invoice.getZFItems()[2].getProduct().getUnit());
|
assertEquals("LTR", invoice.getZFItems()[2].getProduct().getUnit());
|
||||||
assertEquals("7.00", invoice.getZFItems()[0].getProduct().getVATPercent().toString());
|
assertEquals("7.00", invoice.getZFItems()[0].getProduct().getVATPercent().toString());
|
||||||
assertEquals("RE-20170509/505", invoice.getNumber());
|
assertEquals("RE-20170509/505", invoice.getNumber());
|
||||||
|
assertEquals("Zahlbar ohne Abzug bis zum 30.05.2017", invoice.getPaymentTermDescription());
|
||||||
|
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
assertEquals("2017-05-09", sdf.format(invoice.getIssueDate()));
|
assertEquals("2017-05-09", sdf.format(invoice.getIssueDate()));
|
||||||
@@ -120,8 +125,10 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
// Reading ZUGFeRD
|
// Reading ZUGFeRD
|
||||||
assertEquals("Bei Spiel GmbH", invoice.getOwnOrganisationName());
|
assertEquals("Bei Spiel GmbH", invoice.getOwnOrganisationName());
|
||||||
assertEquals(3, invoice.getZFItems().length);
|
assertEquals(3, invoice.getZFItems().length);
|
||||||
|
assertEquals(invoice.getZFItems()[0].getNotesWithSubjectCode().get(0).getContent(),"Something");
|
||||||
|
assertEquals(invoice.getZFItems()[0].getNotesWithSubjectCode().size(),1);
|
||||||
assertEquals("400", invoice.getZFItems()[1].getQuantity().toString());
|
assertEquals("400", invoice.getZFItems()[1].getQuantity().toString());
|
||||||
|
assertEquals("Zahlbar ohne Abzug bis zum 30.05.2017", invoice.getPaymentTermDescription());
|
||||||
assertEquals("AB321", invoice.getReferenceNumber());
|
assertEquals("AB321", invoice.getReferenceNumber());
|
||||||
assertEquals("160", invoice.getZFItems()[0].getPrice().toString());
|
assertEquals("160", invoice.getZFItems()[0].getPrice().toString());
|
||||||
assertEquals("Heiße Luft pro Liter", invoice.getZFItems()[2].getProduct().getName());
|
assertEquals("Heiße Luft pro Liter", invoice.getZFItems()[2].getProduct().getName());
|
||||||
@@ -277,12 +284,16 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
public void testXRImport() {
|
public void testXRImport() {
|
||||||
boolean hasExceptions = false;
|
boolean hasExceptions = false;
|
||||||
|
|
||||||
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter();
|
ZUGFeRDImporter zii = new ZUGFeRDImporter();
|
||||||
|
|
||||||
|
int version=-1;
|
||||||
try {
|
try {
|
||||||
zii.fromXML(new String(Files.readAllBytes(Paths.get("./target/testout-XR-Edge.xml")), StandardCharsets.UTF_8));
|
zii.fromXML(new String(Files.readAllBytes(Paths.get("./target/testout-XR-Edge.xml")), StandardCharsets.UTF_8));
|
||||||
|
version=zii.getVersion();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
hasExceptions = true;
|
hasExceptions = true;
|
||||||
|
} catch (Exception e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
Invoice invoice = null;
|
Invoice invoice = null;
|
||||||
@@ -292,8 +303,17 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
hasExceptions = true;
|
hasExceptions = true;
|
||||||
}
|
}
|
||||||
assertFalse(hasExceptions);
|
assertFalse(hasExceptions);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TransactionCalculator tc = new TransactionCalculator(invoice);
|
TransactionCalculator tc = new TransactionCalculator(invoice);
|
||||||
assertEquals(new BigDecimal("1.00"), tc.getGrandTotal());
|
assertEquals(new BigDecimal("1.00"), tc.getGrandTotal());
|
||||||
|
|
||||||
|
assertEquals(version,2);
|
||||||
|
assertTrue(new BigDecimal("1").compareTo(invoice.getZFItems()[0].getQuantity()) == 0);
|
||||||
|
LineCalculator lc=new LineCalculator(invoice.getZFItems()[0]);
|
||||||
|
assertTrue(new BigDecimal("1").compareTo(lc.getItemTotalNetAmount()) == 0);
|
||||||
|
|
||||||
assertTrue(invoice.getTradeSettlement().length == 1);
|
assertTrue(invoice.getTradeSettlement().length == 1);
|
||||||
assertTrue(invoice.getTradeSettlement()[0] instanceof IZUGFeRDTradeSettlementPayment);
|
assertTrue(invoice.getTradeSettlement()[0] instanceof IZUGFeRDTradeSettlementPayment);
|
||||||
IZUGFeRDTradeSettlementPayment paym = (IZUGFeRDTradeSettlementPayment) invoice.getTradeSettlement()[0];
|
IZUGFeRDTradeSettlementPayment paym = (IZUGFeRDTradeSettlementPayment) invoice.getTradeSettlement()[0];
|
||||||
@@ -376,6 +396,35 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testImportPrepaid() throws XPathExpressionException, ParseException {
|
||||||
|
InputStream inputStream = this.getClass()
|
||||||
|
.getResourceAsStream("/EN16931_1_Teilrechnung.pdf");
|
||||||
|
ZUGFeRDInvoiceImporter importer = new ZUGFeRDInvoiceImporter();
|
||||||
|
importer.doIgnoreCalculationErrors();
|
||||||
|
importer.setInputStream(inputStream);
|
||||||
|
|
||||||
|
CalculatedInvoice invoice = new CalculatedInvoice();
|
||||||
|
importer.extractInto(invoice);
|
||||||
|
|
||||||
|
boolean isBD=invoice.getTotalPrepaidAmount() instanceof BigDecimal;
|
||||||
|
assertTrue(isBD);
|
||||||
|
BigDecimal expectedPrepaid=new BigDecimal(50);
|
||||||
|
BigDecimal expectedLineTotal=new BigDecimal("180.76");
|
||||||
|
BigDecimal expectedDue=new BigDecimal("147.65");
|
||||||
|
if (isBD) {
|
||||||
|
BigDecimal amread=invoice.getTotalPrepaidAmount();
|
||||||
|
BigDecimal importedLineTotal=invoice.getLineTotalAmount();
|
||||||
|
BigDecimal importedDuePayable=invoice.getDuePayable();
|
||||||
|
assertTrue(amread.compareTo(expectedPrepaid) == 0);
|
||||||
|
assertTrue(importedLineTotal.compareTo(expectedLineTotal) == 0);
|
||||||
|
assertTrue(importedDuePayable.compareTo(expectedDue) == 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void testImportIncludedNotes() throws XPathExpressionException, ParseException {
|
public void testImportIncludedNotes() throws XPathExpressionException, ParseException {
|
||||||
InputStream inputStream = this.getClass()
|
InputStream inputStream = this.getClass()
|
||||||
@@ -396,4 +445,25 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testImportPositionIncludedNotes() throws FileNotFoundException, XPathExpressionException, ParseException {
|
||||||
|
File inputFile = getResourceAsFile("ZTESTZUGFERD_1_INVDSS_012015738820PDF-1.pdf");
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(new FileInputStream(inputFile));
|
||||||
|
|
||||||
|
Invoice invoice = zii.extractInvoice();
|
||||||
|
assertEquals(1, invoice.getZFItems().length);
|
||||||
|
assertEquals(8, invoice.getZFItems()[0].getNotesWithSubjectCode().size());
|
||||||
|
assertEquals("FB-LE 9999", invoice.getZFItems()[0].getNotesWithSubjectCode().stream().filter(note -> note.getSubjectCode().equals(SubjectCode.ABZ)).findFirst().get().getContent());
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testImportXRechnungPositionNote() throws FileNotFoundException, XPathExpressionException, ParseException {
|
||||||
|
File inputFile = getResourceAsFile("TESTXRECHNUNG_INVDSS_012015776085.XML");
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter(new FileInputStream(inputFile));
|
||||||
|
|
||||||
|
Invoice invoice = zii.extractInvoice();
|
||||||
|
assertEquals(1, invoice.getZFItems().length);
|
||||||
|
assertFalse(invoice.getZFItems()[0].getNotes() == null);
|
||||||
|
assertEquals(1, invoice.getZFItems()[0].getNotes().length);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
BIN
library/src/test/resources/EN16931_1_Teilrechnung.pdf
Normal file
BIN
library/src/test/resources/EN16931_1_Teilrechnung.pdf
Normal file
Binary file not shown.
157
library/src/test/resources/TESTXRECHNUNG_INVDSS_012015776085.XML
Normal file
157
library/src/test/resources/TESTXRECHNUNG_INVDSS_012015776085.XML
Normal file
@@ -0,0 +1,157 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?><ubl:Invoice xmlns:ubl="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2 http://docs.oasis-open.org/ubl/os-UBL-2.1/xsd/maindoc/UBL-Invoice-2.1.xsd">
|
||||||
|
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:xeinkauf.de:kosit:xrechnung_3.0</cbc:CustomizationID>
|
||||||
|
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
|
||||||
|
<cbc:ID>2015776085</cbc:ID>
|
||||||
|
<cbc:IssueDate>2024-11-01</cbc:IssueDate>
|
||||||
|
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
|
||||||
|
<cbc:Note>#AAI# Wenn bereits bezahlt, nur zu den Akten legen. Für Verzug und Verzugszinsen gelten die Bestimmungen der §§ 286 - 288 BGB. Der Schuldner einer Entgeltforderung kommt spätestens in Verzug, wenn er nicht innerhalb von 30 Tagen nach Fälligkeit und Zugang einer Rechnung oder gleichwertigen Zahlungsaufstellung leistet. Die Lieferung von Waren und Fahrzeugen erfolgt unter Eigentumsvorbehalt.</cbc:Note>
|
||||||
|
<cbc:Note>#PAI# Rechnungsbetrag zahlbar ohne Abzug sofort nach Erhalt der Rechnung.</cbc:Note>
|
||||||
|
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
|
||||||
|
<cbc:BuyerReference>02-ZZ987654-99</cbc:BuyerReference>
|
||||||
|
<cac:InvoicePeriod>
|
||||||
|
<cbc:StartDate>2024-11-01</cbc:StartDate>
|
||||||
|
<cbc:EndDate>2024-11-30</cbc:EndDate>
|
||||||
|
</cac:InvoicePeriod>
|
||||||
|
<cac:OrderReference>
|
||||||
|
<cbc:ID>N/A</cbc:ID>
|
||||||
|
</cac:OrderReference>
|
||||||
|
<cac:ContractDocumentReference>
|
||||||
|
<cbc:ID>63435555</cbc:ID>
|
||||||
|
</cac:ContractDocumentReference>
|
||||||
|
<cac:AccountingSupplierParty>
|
||||||
|
<cac:Party>
|
||||||
|
<cbc:EndpointID schemeID="9930">DE238574172</cbc:EndpointID>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Alphabet Fuhrparkmanagement GmbH</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
<cac:PostalAddress>
|
||||||
|
<cbc:StreetName>Lilienthalallee 26</cbc:StreetName>
|
||||||
|
<cbc:CityName>München</cbc:CityName>
|
||||||
|
<cbc:PostalZone>80786</cbc:PostalZone>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:PostalAddress>
|
||||||
|
<cac:PartyTaxScheme>
|
||||||
|
<cbc:CompanyID>DE238574172</cbc:CompanyID>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:PartyTaxScheme>
|
||||||
|
<cac:PartyLegalEntity>
|
||||||
|
<cbc:RegistrationName>Alphabet Fuhrparkmanagement GmbH</cbc:RegistrationName>
|
||||||
|
<cbc:CompanyID>HRB 181098</cbc:CompanyID>
|
||||||
|
</cac:PartyLegalEntity>
|
||||||
|
<cac:Contact>
|
||||||
|
<cbc:Name>Yildiz Tolga</cbc:Name>
|
||||||
|
<cbc:Telephone>+49899--</cbc:Telephone>
|
||||||
|
<cbc:ElectronicMail>Tolga.Yildiz@alphabet.de</cbc:ElectronicMail>
|
||||||
|
</cac:Contact>
|
||||||
|
</cac:Party>
|
||||||
|
</cac:AccountingSupplierParty>
|
||||||
|
<cac:AccountingCustomerParty>
|
||||||
|
<cac:Party>
|
||||||
|
<cbc:EndpointID schemeID="9930">N/A</cbc:EndpointID>
|
||||||
|
<cac:PartyIdentification>
|
||||||
|
<cbc:ID>00987654</cbc:ID>
|
||||||
|
</cac:PartyIdentification>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Muster GmbH</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
<cac:PostalAddress>
|
||||||
|
<cbc:StreetName>Musterweg 1</cbc:StreetName>
|
||||||
|
<cbc:CityName>Kiel</cbc:CityName>
|
||||||
|
<cbc:PostalZone>24105</cbc:PostalZone>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:PostalAddress>
|
||||||
|
<cac:PartyLegalEntity>
|
||||||
|
<cbc:RegistrationName>Muster GmbH</cbc:RegistrationName>
|
||||||
|
</cac:PartyLegalEntity>
|
||||||
|
<cac:Contact>
|
||||||
|
<cbc:Name>Mustermann Max</cbc:Name>
|
||||||
|
</cac:Contact>
|
||||||
|
</cac:Party>
|
||||||
|
</cac:AccountingCustomerParty>
|
||||||
|
<cac:Delivery>
|
||||||
|
<cbc:ActualDeliveryDate>2024-11-30</cbc:ActualDeliveryDate>
|
||||||
|
<cac:DeliveryLocation>
|
||||||
|
<cbc:ID>00987654</cbc:ID>
|
||||||
|
<cac:Address>
|
||||||
|
<cbc:StreetName>Musterweg 1</cbc:StreetName>
|
||||||
|
<cbc:CityName>Kiel</cbc:CityName>
|
||||||
|
<cbc:PostalZone>24105</cbc:PostalZone>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:Address>
|
||||||
|
</cac:DeliveryLocation>
|
||||||
|
<cac:DeliveryParty>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Muster GmbH</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
</cac:DeliveryParty>
|
||||||
|
</cac:Delivery>
|
||||||
|
<cac:PaymentMeans>
|
||||||
|
<cbc:PaymentMeansCode>30</cbc:PaymentMeansCode>
|
||||||
|
<cac:PayeeFinancialAccount>
|
||||||
|
<cbc:ID>DE34700700100156919301</cbc:ID>
|
||||||
|
<cbc:Name>Alphabet Fuhrparkmanagement GmbH</cbc:Name>
|
||||||
|
<cac:FinancialInstitutionBranch>
|
||||||
|
<cbc:ID>DEUTDEMMXXX</cbc:ID>
|
||||||
|
</cac:FinancialInstitutionBranch>
|
||||||
|
</cac:PayeeFinancialAccount>
|
||||||
|
</cac:PaymentMeans>
|
||||||
|
<cac:PaymentTerms>
|
||||||
|
<cbc:Note>Rechnungsbetrag zahlbar ohne Abzug sofort nach Erhalt der Rechnung.</cbc:Note>
|
||||||
|
</cac:PaymentTerms>
|
||||||
|
<cac:TaxTotal>
|
||||||
|
<cbc:TaxAmount currencyID="EUR">161.69</cbc:TaxAmount>
|
||||||
|
<cac:TaxSubtotal>
|
||||||
|
<cbc:TaxableAmount currencyID="EUR">851.00</cbc:TaxableAmount>
|
||||||
|
<cbc:TaxAmount currencyID="EUR">161.69</cbc:TaxAmount>
|
||||||
|
<cac:TaxCategory>
|
||||||
|
<cbc:ID>S</cbc:ID>
|
||||||
|
<cbc:Percent>19.00</cbc:Percent>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:TaxCategory>
|
||||||
|
</cac:TaxSubtotal>
|
||||||
|
</cac:TaxTotal>
|
||||||
|
<cac:LegalMonetaryTotal>
|
||||||
|
<cbc:LineExtensionAmount currencyID="EUR">851.00</cbc:LineExtensionAmount>
|
||||||
|
<cbc:TaxExclusiveAmount currencyID="EUR">851.00</cbc:TaxExclusiveAmount>
|
||||||
|
<cbc:TaxInclusiveAmount currencyID="EUR">1012.69</cbc:TaxInclusiveAmount>
|
||||||
|
<cbc:PayableAmount currencyID="EUR">1012.69</cbc:PayableAmount>
|
||||||
|
</cac:LegalMonetaryTotal>
|
||||||
|
<cac:InvoiceLine>
|
||||||
|
<cbc:ID>1</cbc:ID>
|
||||||
|
<cbc:Note>#AAI# Finanzrate vom 01.11.2024 bis 30.11.2024 #ABZ/Kennzeichen#SH-9 18E #AKG/Fahrgestellnummer#WBY51EJ080CR55555 #BA/Kilometerstand#0 #AKV/LeasingNr#63435555</cbc:Note>
|
||||||
|
<cbc:InvoicedQuantity unitCode="C62">1.00</cbc:InvoicedQuantity>
|
||||||
|
<cbc:LineExtensionAmount currencyID="EUR">851.00</cbc:LineExtensionAmount>
|
||||||
|
<cac:InvoicePeriod>
|
||||||
|
<cbc:StartDate>2024-11-01</cbc:StartDate>
|
||||||
|
<cbc:EndDate>2024-11-30</cbc:EndDate>
|
||||||
|
</cac:InvoicePeriod>
|
||||||
|
<cac:Item>
|
||||||
|
<cbc:Description>FL-Rate</cbc:Description>
|
||||||
|
<cbc:Name>FL-Rate</cbc:Name>
|
||||||
|
<cac:SellersItemIdentification>
|
||||||
|
<cbc:ID>90101</cbc:ID>
|
||||||
|
</cac:SellersItemIdentification>
|
||||||
|
<cac:ClassifiedTaxCategory>
|
||||||
|
<cbc:ID>S</cbc:ID>
|
||||||
|
<cbc:Percent>19.00</cbc:Percent>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:ClassifiedTaxCategory>
|
||||||
|
</cac:Item>
|
||||||
|
<cac:Price>
|
||||||
|
<cbc:PriceAmount currencyID="EUR">851.00</cbc:PriceAmount>
|
||||||
|
<cbc:BaseQuantity>1.00</cbc:BaseQuantity>
|
||||||
|
</cac:Price>
|
||||||
|
</cac:InvoiceLine>
|
||||||
|
</ubl:Invoice>
|
||||||
Binary file not shown.
@@ -1,8 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"
|
<rsm:CrossIndustryInvoice xmlns:rsm="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100" xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100" xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
|
||||||
xmlns:qdt="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"
|
|
||||||
xmlns:ram="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
|
||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100">
|
|
||||||
<rsm:ExchangedDocumentContext>
|
<rsm:ExchangedDocumentContext>
|
||||||
<ram:BusinessProcessSpecifiedDocumentContextParameter>
|
<ram:BusinessProcessSpecifiedDocumentContextParameter>
|
||||||
<ram:ID>BT-23 Business Process Type</ram:ID>
|
<ram:ID>BT-23 Business Process Type</ram:ID>
|
||||||
@@ -19,11 +16,11 @@
|
|||||||
</ram:IssueDateTime>
|
</ram:IssueDateTime>
|
||||||
<ram:IncludedNote>
|
<ram:IncludedNote>
|
||||||
<ram:Content>invoice note text</ram:Content>
|
<ram:Content>invoice note text</ram:Content>
|
||||||
<ram:SubjectCode>AAA</ram:SubjectCode>
|
<ram:SubjectCode>#AAA#</ram:SubjectCode>
|
||||||
</ram:IncludedNote>
|
</ram:IncludedNote>
|
||||||
<ram:IncludedNote>
|
<ram:IncludedNote>
|
||||||
<ram:Content>invoice note text 2</ram:Content>
|
<ram:Content>invoice note text 2</ram:Content>
|
||||||
<ram:SubjectCode>AAA</ram:SubjectCode>
|
<ram:SubjectCode>#AAA#</ram:SubjectCode>
|
||||||
</ram:IncludedNote>
|
</ram:IncludedNote>
|
||||||
</rsm:ExchangedDocument>
|
</rsm:ExchangedDocument>
|
||||||
<rsm:SupplyChainTradeTransaction>
|
<rsm:SupplyChainTradeTransaction>
|
||||||
@@ -35,9 +32,7 @@
|
|||||||
</ram:IncludedNote>
|
</ram:IncludedNote>
|
||||||
</ram:AssociatedDocumentLineDocument>
|
</ram:AssociatedDocumentLineDocument>
|
||||||
<ram:SpecifiedTradeProduct>
|
<ram:SpecifiedTradeProduct>
|
||||||
<ram:GlobalID schemeID="0060">Item standar identifier
|
<ram:GlobalID>Item standar identifier</ram:GlobalID>
|
||||||
</ram:GlobalID>
|
|
||||||
|
|
||||||
<ram:SellerAssignedID>Item seller's identifier</ram:SellerAssignedID>
|
<ram:SellerAssignedID>Item seller's identifier</ram:SellerAssignedID>
|
||||||
<ram:BuyerAssignedID>Item buyer's identifier</ram:BuyerAssignedID>
|
<ram:BuyerAssignedID>Item buyer's identifier</ram:BuyerAssignedID>
|
||||||
<ram:Name>Item name</ram:Name>
|
<ram:Name>Item name</ram:Name>
|
||||||
@@ -98,9 +93,9 @@
|
|||||||
<udt:Indicator>false</udt:Indicator>
|
<udt:Indicator>false</udt:Indicator>
|
||||||
</ram:ChargeIndicator>
|
</ram:ChargeIndicator>
|
||||||
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
||||||
<ram:BasisAmount>100.00</ram:BasisAmount>
|
<ram:BasisAmount>1000.00</ram:BasisAmount>
|
||||||
<ram:ActualAmount>10.00</ram:ActualAmount>
|
<ram:ActualAmount>10.00</ram:ActualAmount>
|
||||||
<ram:ReasonCode>95</ram:ReasonCode>
|
<ram:ReasonCode>55</ram:ReasonCode>
|
||||||
<ram:Reason>Invoice line allowance reason</ram:Reason>
|
<ram:Reason>Invoice line allowance reason</ram:Reason>
|
||||||
</ram:SpecifiedTradeAllowanceCharge>
|
</ram:SpecifiedTradeAllowanceCharge>
|
||||||
<ram:SpecifiedTradeAllowanceCharge>
|
<ram:SpecifiedTradeAllowanceCharge>
|
||||||
@@ -108,17 +103,18 @@
|
|||||||
<udt:Indicator>true</udt:Indicator>
|
<udt:Indicator>true</udt:Indicator>
|
||||||
</ram:ChargeIndicator>
|
</ram:ChargeIndicator>
|
||||||
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
||||||
<ram:BasisAmount>100.00</ram:BasisAmount>
|
<ram:BasisAmount>1000.00</ram:BasisAmount>
|
||||||
<ram:ActualAmount>10.00</ram:ActualAmount>
|
<ram:ActualAmount>10.00</ram:ActualAmount>
|
||||||
<ram:ReasonCode>AAA</ram:ReasonCode>
|
<ram:ReasonCode>AAA</ram:ReasonCode>
|
||||||
<ram:Reason>Invoice line charge reason</ram:Reason>
|
<ram:Reason>Invoice line charge reason</ram:Reason>
|
||||||
</ram:SpecifiedTradeAllowanceCharge>
|
</ram:SpecifiedTradeAllowanceCharge>
|
||||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||||
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
|
<ram:LineTotalAmount>1000.00</ram:LineTotalAmount>
|
||||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||||
<ram:AdditionalReferencedDocument>
|
<ram:AdditionalReferencedDocument>
|
||||||
<ram:IssuerAssignedID>Line object identifier</ram:IssuerAssignedID>
|
<ram:IssuerAssignedID>Line object identifier</ram:IssuerAssignedID>
|
||||||
<ram:TypeCode>130</ram:TypeCode>
|
<ram:TypeCode>130</ram:TypeCode>
|
||||||
|
<ram:ReferenceTypeCode />
|
||||||
</ram:AdditionalReferencedDocument>
|
</ram:AdditionalReferencedDocument>
|
||||||
<ram:ReceivableSpecifiedTradeAccountingAccount>
|
<ram:ReceivableSpecifiedTradeAccountingAccount>
|
||||||
<ram:ID>6789</ram:ID>
|
<ram:ID>6789</ram:ID>
|
||||||
@@ -147,7 +143,7 @@
|
|||||||
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
|
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
|
||||||
</ram:ApplicableTradeTax>
|
</ram:ApplicableTradeTax>
|
||||||
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
<ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||||
<ram:LineTotalAmount>100.00</ram:LineTotalAmount>
|
<ram:LineTotalAmount>1000.00</ram:LineTotalAmount>
|
||||||
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
</ram:SpecifiedTradeSettlementLineMonetarySummation>
|
||||||
</ram:SpecifiedLineTradeSettlement>
|
</ram:SpecifiedLineTradeSettlement>
|
||||||
</ram:IncludedSupplyChainTradeLineItem>
|
</ram:IncludedSupplyChainTradeLineItem>
|
||||||
@@ -159,7 +155,7 @@
|
|||||||
<ram:Name>Seller name</ram:Name>
|
<ram:Name>Seller name</ram:Name>
|
||||||
<ram:Description>Seller additional legal information</ram:Description>
|
<ram:Description>Seller additional legal information</ram:Description>
|
||||||
<ram:SpecifiedLegalOrganization>
|
<ram:SpecifiedLegalOrganization>
|
||||||
<!-- <ram:ID schemeID="0310">Seller legal identifier</ram:ID> -->
|
<ram:ID schemeID="0310">Seller legal identifier</ram:ID>
|
||||||
<ram:TradingBusinessName>Seller trading name</ram:TradingBusinessName>
|
<ram:TradingBusinessName>Seller trading name</ram:TradingBusinessName>
|
||||||
</ram:SpecifiedLegalOrganization>
|
</ram:SpecifiedLegalOrganization>
|
||||||
<ram:DefinedTradeContact>
|
<ram:DefinedTradeContact>
|
||||||
@@ -181,7 +177,7 @@
|
|||||||
<ram:CountrySubDivisionName>Seller country subdivision</ram:CountrySubDivisionName>
|
<ram:CountrySubDivisionName>Seller country subdivision</ram:CountrySubDivisionName>
|
||||||
</ram:PostalTradeAddress>
|
</ram:PostalTradeAddress>
|
||||||
<ram:URIUniversalCommunication>
|
<ram:URIUniversalCommunication>
|
||||||
<ram:URIID schemeID="EM">Seller electronic address</ram:URIID>
|
<ram:URIID schemeID="SMTP">Seller electronic address</ram:URIID>
|
||||||
</ram:URIUniversalCommunication>
|
</ram:URIUniversalCommunication>
|
||||||
<ram:SpecifiedTaxRegistration>
|
<ram:SpecifiedTaxRegistration>
|
||||||
<ram:ID schemeID="VA">DE12345677</ram:ID>
|
<ram:ID schemeID="VA">DE12345677</ram:ID>
|
||||||
@@ -216,7 +212,7 @@
|
|||||||
<ram:CountrySubDivisionName>Buyer country subdivision</ram:CountrySubDivisionName>
|
<ram:CountrySubDivisionName>Buyer country subdivision</ram:CountrySubDivisionName>
|
||||||
</ram:PostalTradeAddress>
|
</ram:PostalTradeAddress>
|
||||||
<ram:URIUniversalCommunication>
|
<ram:URIUniversalCommunication>
|
||||||
<ram:URIID schemeID="EM">Buyer electronic address</ram:URIID>
|
<ram:URIID schemeID="DE:SMTP">Buyer electronic address</ram:URIID>
|
||||||
</ram:URIUniversalCommunication>
|
</ram:URIUniversalCommunication>
|
||||||
<ram:SpecifiedTaxRegistration>
|
<ram:SpecifiedTaxRegistration>
|
||||||
<ram:ID schemeID="VA">IE394838894</ram:ID>
|
<ram:ID schemeID="VA">IE394838894</ram:ID>
|
||||||
@@ -256,7 +252,7 @@
|
|||||||
<ram:AdditionalReferencedDocument>
|
<ram:AdditionalReferencedDocument>
|
||||||
<ram:IssuerAssignedID>rst</ram:IssuerAssignedID>
|
<ram:IssuerAssignedID>rst</ram:IssuerAssignedID>
|
||||||
<ram:TypeCode>130</ram:TypeCode>
|
<ram:TypeCode>130</ram:TypeCode>
|
||||||
<ram:ReferenceTypeCode>AAA</ram:ReferenceTypeCode>
|
<ram:ReferenceTypeCode>0090</ram:ReferenceTypeCode>
|
||||||
</ram:AdditionalReferencedDocument>
|
</ram:AdditionalReferencedDocument>
|
||||||
<ram:SpecifiedProcuringProject>
|
<ram:SpecifiedProcuringProject>
|
||||||
<ram:ID>456</ram:ID>
|
<ram:ID>456</ram:ID>
|
||||||
@@ -315,32 +311,32 @@
|
|||||||
<ram:IBANID>IT1212341234123412</ram:IBANID>
|
<ram:IBANID>IT1212341234123412</ram:IBANID>
|
||||||
<ram:AccountName>Payment account name</ram:AccountName>
|
<ram:AccountName>Payment account name</ram:AccountName>
|
||||||
</ram:PayeePartyCreditorFinancialAccount>
|
</ram:PayeePartyCreditorFinancialAccount>
|
||||||
<!-- <ram:BICID>BSCTCH22</ram:BICID> -->
|
<ram:PayerSpecifiedDebtorFinancialInstitution>
|
||||||
<!-- <ram:PayerSpecifiedDebtorFinancialInstitution>
|
<ram:BICID>BSCTCH22</ram:BICID>
|
||||||
</ram:PayerSpecifiedDebtorFinancialInstitution> -->
|
</ram:PayerSpecifiedDebtorFinancialInstitution>
|
||||||
<!-- <ram:PayeePartyCreditorFinancialAccount>
|
<ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:IBANID>IT1212341234123413</ram:IBANID>
|
<ram:IBANID>IT1212341234123413</ram:IBANID>
|
||||||
<ram:AccountName>Payment account name 2</ram:AccountName>
|
<ram:AccountName>Payment account name 2</ram:AccountName>
|
||||||
</ram:PayeePartyCreditorFinancialAccount>
|
</ram:PayeePartyCreditorFinancialAccount>
|
||||||
<ram:PayerSpecifiedDebtorFinancialInstitution>
|
<ram:PayerSpecifiedDebtorFinancialInstitution>
|
||||||
<ram:BICID>BSCTCH22</ram:BICID>
|
<ram:BICID>BSCTCH22</ram:BICID>
|
||||||
</ram:PayerSpecifiedDebtorFinancialInstitution> -->
|
</ram:PayerSpecifiedDebtorFinancialInstitution>
|
||||||
</ram:SpecifiedTradeSettlementPaymentMeans>
|
</ram:SpecifiedTradeSettlementPaymentMeans>
|
||||||
<ram:ApplicableTradeTax>
|
<ram:ApplicableTradeTax>
|
||||||
<ram:CalculatedAmount>5.00</ram:CalculatedAmount>
|
<ram:CalculatedAmount>50.00</ram:CalculatedAmount>
|
||||||
<ram:TypeCode>VAT</ram:TypeCode>
|
<ram:TypeCode>VAT</ram:TypeCode>
|
||||||
<ram:BasisAmount>100.00</ram:BasisAmount>
|
<ram:BasisAmount>1000.00</ram:BasisAmount>
|
||||||
<ram:CategoryCode>S</ram:CategoryCode>
|
<ram:CategoryCode>S</ram:CategoryCode>
|
||||||
<!-- <ram:DueDateTypeCode>29</ram:DueDateTypeCode> -->
|
<ram:DueDateTypeCode>29</ram:DueDateTypeCode>
|
||||||
<ram:RateApplicablePercent>5.00</ram:RateApplicablePercent>
|
<ram:RateApplicablePercent>5.00</ram:RateApplicablePercent>
|
||||||
</ram:ApplicableTradeTax>
|
</ram:ApplicableTradeTax>
|
||||||
<ram:ApplicableTradeTax>
|
<ram:ApplicableTradeTax>
|
||||||
<ram:CalculatedAmount>0.00</ram:CalculatedAmount>
|
<ram:CalculatedAmount>0.00</ram:CalculatedAmount>
|
||||||
<ram:TypeCode>VAT</ram:TypeCode>
|
<ram:TypeCode>VAT</ram:TypeCode>
|
||||||
<ram:ExemptionReason>Exemtion reason text</ram:ExemptionReason>
|
<ram:ExemptionReason>Exemtion reason text</ram:ExemptionReason>
|
||||||
<ram:BasisAmount>100.00</ram:BasisAmount>
|
<ram:BasisAmount>1000.00</ram:BasisAmount>
|
||||||
<ram:CategoryCode>E</ram:CategoryCode>
|
<ram:CategoryCode>E</ram:CategoryCode>
|
||||||
<ram:ExemptionReasonCode>VATEX-EU-O</ram:ExemptionReasonCode>
|
<ram:ExemptionReasonCode>Exemption reason code</ram:ExemptionReasonCode>
|
||||||
<ram:DueDateTypeCode>29</ram:DueDateTypeCode>
|
<ram:DueDateTypeCode>29</ram:DueDateTypeCode>
|
||||||
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
|
<ram:RateApplicablePercent>0.00</ram:RateApplicablePercent>
|
||||||
</ram:ApplicableTradeTax>
|
</ram:ApplicableTradeTax>
|
||||||
@@ -357,9 +353,9 @@
|
|||||||
<udt:Indicator>false</udt:Indicator>
|
<udt:Indicator>false</udt:Indicator>
|
||||||
</ram:ChargeIndicator>
|
</ram:ChargeIndicator>
|
||||||
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
||||||
<ram:BasisAmount>100.00</ram:BasisAmount>
|
<ram:BasisAmount>1000.00</ram:BasisAmount>
|
||||||
<ram:ActualAmount>10.00</ram:ActualAmount>
|
<ram:ActualAmount>10.00</ram:ActualAmount>
|
||||||
<ram:ReasonCode>95</ram:ReasonCode>
|
<ram:ReasonCode>55</ram:ReasonCode>
|
||||||
<ram:Reason>Doc allowance reason text</ram:Reason>
|
<ram:Reason>Doc allowance reason text</ram:Reason>
|
||||||
<ram:CategoryTradeTax>
|
<ram:CategoryTradeTax>
|
||||||
<ram:TypeCode>VAT</ram:TypeCode>
|
<ram:TypeCode>VAT</ram:TypeCode>
|
||||||
@@ -372,7 +368,7 @@
|
|||||||
<udt:Indicator>true</udt:Indicator>
|
<udt:Indicator>true</udt:Indicator>
|
||||||
</ram:ChargeIndicator>
|
</ram:ChargeIndicator>
|
||||||
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
<ram:CalculationPercent>1.00</ram:CalculationPercent>
|
||||||
<ram:BasisAmount>100.00</ram:BasisAmount>
|
<ram:BasisAmount>1000.00</ram:BasisAmount>
|
||||||
<ram:ActualAmount>10.00</ram:ActualAmount>
|
<ram:ActualAmount>10.00</ram:ActualAmount>
|
||||||
<ram:ReasonCode>AAA</ram:ReasonCode>
|
<ram:ReasonCode>AAA</ram:ReasonCode>
|
||||||
<ram:Reason>Doc charge reason text</ram:Reason>
|
<ram:Reason>Doc charge reason text</ram:Reason>
|
||||||
@@ -390,16 +386,16 @@
|
|||||||
<ram:DirectDebitMandateID>Mandate reference identifier</ram:DirectDebitMandateID>
|
<ram:DirectDebitMandateID>Mandate reference identifier</ram:DirectDebitMandateID>
|
||||||
</ram:SpecifiedTradePaymentTerms>
|
</ram:SpecifiedTradePaymentTerms>
|
||||||
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
<ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||||
<ram:LineTotalAmount>200.00</ram:LineTotalAmount>
|
<ram:LineTotalAmount>2000.00</ram:LineTotalAmount>
|
||||||
<ram:ChargeTotalAmount>10.00</ram:ChargeTotalAmount>
|
<ram:ChargeTotalAmount>10.00</ram:ChargeTotalAmount>
|
||||||
<ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
|
<ram:AllowanceTotalAmount>10.00</ram:AllowanceTotalAmount>
|
||||||
<ram:TaxBasisTotalAmount>200.00</ram:TaxBasisTotalAmount>
|
<ram:TaxBasisTotalAmount>2000.00</ram:TaxBasisTotalAmount>
|
||||||
<ram:TaxTotalAmount currencyID="EUR">5.00</ram:TaxTotalAmount>
|
<ram:TaxTotalAmount currencyID="EUR">50.00</ram:TaxTotalAmount>
|
||||||
<ram:TaxTotalAmount currencyID="NOK">4.60</ram:TaxTotalAmount>
|
<ram:TaxTotalAmount currencyID="NOK">46.00</ram:TaxTotalAmount>
|
||||||
<ram:RoundingAmount>0.00</ram:RoundingAmount>
|
<ram:RoundingAmount>0.00</ram:RoundingAmount>
|
||||||
<ram:GrandTotalAmount>205.00</ram:GrandTotalAmount>
|
<ram:GrandTotalAmount>2050.00</ram:GrandTotalAmount>
|
||||||
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
|
<ram:TotalPrepaidAmount>0.00</ram:TotalPrepaidAmount>
|
||||||
<ram:DuePayableAmount>205.00</ram:DuePayableAmount>
|
<ram:DuePayableAmount>2050.00</ram:DuePayableAmount>
|
||||||
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
</ram:SpecifiedTradeSettlementHeaderMonetarySummation>
|
||||||
<ram:InvoiceReferencedDocument>
|
<ram:InvoiceReferencedDocument>
|
||||||
<ram:IssuerAssignedID>abc123</ram:IssuerAssignedID>
|
<ram:IssuerAssignedID>abc123</ram:IssuerAssignedID>
|
||||||
|
|||||||
@@ -1,365 +1,401 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cec="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2">
|
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2" xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2">
|
||||||
<cbc:CustomizationID>urn:cen.eu:en16931:2017#compliant#urn:fdc:peppol.eu:2017:poacc:billing:3.0</cbc:CustomizationID>
|
<cbc:CustomizationID>urn:cen.eu:en16931:2017</cbc:CustomizationID>
|
||||||
<cbc:ProfileID>urn:fdc:peppol.eu:2017:poacc:billing:01:1.0</cbc:ProfileID>
|
<cbc:ProfileID>BT-23 Business Process Type</cbc:ProfileID>
|
||||||
<cbc:ID>Test_EeISI_100</cbc:ID>
|
<cbc:ID>Test_EeISI_100</cbc:ID>
|
||||||
<cbc:IssueDate>2018-11-12</cbc:IssueDate>
|
<cbc:IssueDate>2018-11-12</cbc:IssueDate>
|
||||||
<cbc:DueDate>2018-11-30</cbc:DueDate>
|
<cbc:DueDate>2018-11-30</cbc:DueDate>
|
||||||
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
|
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
|
||||||
<cbc:Note>#AAA#invoice note text</cbc:Note>
|
<cbc:Note>##AAA##invoice note text</cbc:Note>
|
||||||
<cbc:Note>#AAA#invoice note text 2</cbc:Note>
|
<cbc:Note>##AAA##invoice note text 2</cbc:Note>
|
||||||
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
|
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
|
||||||
<cbc:TaxCurrencyCode>NOK</cbc:TaxCurrencyCode>
|
<cbc:TaxCurrencyCode>NOK</cbc:TaxCurrencyCode>
|
||||||
<cbc:AccountingCost>uvz</cbc:AccountingCost>
|
<cbc:AccountingCost>uvz</cbc:AccountingCost>
|
||||||
<cbc:BuyerReference>123</cbc:BuyerReference>
|
<cbc:BuyerReference>123</cbc:BuyerReference>
|
||||||
<cac:InvoicePeriod>
|
<cac:InvoicePeriod>
|
||||||
<cbc:StartDate>2018-11-12</cbc:StartDate>
|
|
||||||
<cbc:EndDate>2018-11-30</cbc:EndDate>
|
|
||||||
</cac:InvoicePeriod>
|
|
||||||
<cac:OrderReference>
|
|
||||||
<cbc:ID>abc</cbc:ID>
|
|
||||||
<cbc:SalesOrderID>def</cbc:SalesOrderID>
|
|
||||||
</cac:OrderReference>
|
|
||||||
<cac:BillingReference>
|
|
||||||
<cac:InvoiceDocumentReference>
|
|
||||||
<cbc:ID>abc123</cbc:ID>
|
|
||||||
<cbc:IssueDate>2018-10-04</cbc:IssueDate>
|
|
||||||
</cac:InvoiceDocumentReference>
|
|
||||||
</cac:BillingReference>
|
|
||||||
<cac:DespatchDocumentReference>
|
|
||||||
<cbc:ID>lmn</cbc:ID>
|
|
||||||
</cac:DespatchDocumentReference>
|
|
||||||
<cac:ReceiptDocumentReference>
|
|
||||||
<cbc:ID>ghi</cbc:ID>
|
|
||||||
</cac:ReceiptDocumentReference>
|
|
||||||
<cac:ContractDocumentReference>
|
|
||||||
<cbc:ID>789</cbc:ID>
|
|
||||||
</cac:ContractDocumentReference>
|
|
||||||
<cac:AdditionalDocumentReference>
|
|
||||||
<cbc:ID>Supporting document ref</cbc:ID>
|
|
||||||
<cbc:DocumentDescription>Supporting document descr</cbc:DocumentDescription>
|
|
||||||
<cac:Attachment>
|
|
||||||
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="filename0">ZGVmYXVsdA==</cbc:EmbeddedDocumentBinaryObject>
|
|
||||||
<cac:ExternalReference>
|
|
||||||
<cbc:URI>External document location</cbc:URI>
|
|
||||||
</cac:ExternalReference>
|
|
||||||
</cac:Attachment>
|
|
||||||
</cac:AdditionalDocumentReference>
|
|
||||||
<cac:AdditionalDocumentReference>
|
|
||||||
<cbc:ID schemeID="AAA">rst</cbc:ID>
|
|
||||||
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
|
|
||||||
</cac:AdditionalDocumentReference>
|
|
||||||
<cac:ProjectReference>
|
|
||||||
<cbc:ID>456</cbc:ID>
|
|
||||||
</cac:ProjectReference>
|
|
||||||
<cac:AccountingSupplierParty>
|
|
||||||
<cac:Party>
|
|
||||||
<cbc:EndpointID schemeID="EM">Seller electronic address</cbc:EndpointID>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0100">Seller identifier 1</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0110">Seller identifier 2</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Seller trading name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PostalAddress>
|
|
||||||
<cbc:StreetName>Seller address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Seller address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Seller city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>12345</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Seller country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Seller address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:PostalAddress>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>DE12345677</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>DE49294093</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>FC</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
<cac:PartyLegalEntity>
|
|
||||||
<cbc:RegistrationName>Seller name</cbc:RegistrationName>
|
|
||||||
<cbc:CompanyLegalForm>Seller additional legal information</cbc:CompanyLegalForm>
|
|
||||||
</cac:PartyLegalEntity>
|
|
||||||
<cac:Contact>
|
|
||||||
<cbc:Name>Seller contact point</cbc:Name>
|
|
||||||
<cbc:Telephone>+41 345 654455</cbc:Telephone>
|
|
||||||
<cbc:ElectronicMail>seller@contact.de</cbc:ElectronicMail>
|
|
||||||
</cac:Contact>
|
|
||||||
</cac:Party>
|
|
||||||
</cac:AccountingSupplierParty>
|
|
||||||
<cac:AccountingCustomerParty>
|
|
||||||
<cac:Party>
|
|
||||||
<cbc:EndpointID schemeID="EM">Buyer electronic address</cbc:EndpointID>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0190">Buyer identifier</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Buyer trading name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PostalAddress>
|
|
||||||
<cbc:StreetName>Buyer address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Buyer address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Buyer city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>34562</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Buyer country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Buyer address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:PostalAddress>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>IE394838894</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
<cac:PartyLegalEntity>
|
|
||||||
<cbc:RegistrationName>Buyer name</cbc:RegistrationName>
|
|
||||||
<cbc:CompanyID schemeID="0089">Buyer legal registration identifier</cbc:CompanyID>
|
|
||||||
</cac:PartyLegalEntity>
|
|
||||||
<cac:Contact>
|
|
||||||
<cbc:Name>Buyer contact point</cbc:Name>
|
|
||||||
<cbc:Telephone>+353 2948584</cbc:Telephone>
|
|
||||||
<cbc:ElectronicMail>buyer@contact.ie</cbc:ElectronicMail>
|
|
||||||
</cac:Contact>
|
|
||||||
</cac:Party>
|
|
||||||
</cac:AccountingCustomerParty>
|
|
||||||
<cac:PayeeParty>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0098">Payee identifier</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Payee name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
</cac:PayeeParty>
|
|
||||||
<cac:TaxRepresentativeParty>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Tax representative name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PostalAddress>
|
|
||||||
<cbc:StreetName>Tax representative address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Tax representative address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Tax representative city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>23455</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Tax representative country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Tax representative address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:PostalAddress>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>DE3949053</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
</cac:TaxRepresentativeParty>
|
|
||||||
<cac:Delivery>
|
|
||||||
<cbc:ActualDeliveryDate>2018-12-04</cbc:ActualDeliveryDate>
|
|
||||||
<cac:DeliveryLocation>
|
|
||||||
<cbc:ID schemeID="0045">deliver location identifier</cbc:ID>
|
|
||||||
<cac:Address>
|
|
||||||
<cbc:StreetName>Deliver to address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Deliver to address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Deliver to city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>98765</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Deliver to country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Deliver to address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:Address>
|
|
||||||
</cac:DeliveryLocation>
|
|
||||||
<cac:DeliveryParty>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Deliver to party name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
</cac:DeliveryParty>
|
|
||||||
</cac:Delivery>
|
|
||||||
<cac:PaymentTerms>
|
|
||||||
<cbc:Note>total amount</cbc:Note>
|
|
||||||
</cac:PaymentTerms>
|
|
||||||
<cac:AllowanceCharge>
|
|
||||||
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
|
||||||
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
|
|
||||||
<cbc:AllowanceChargeReason>Doc allowance reason text</cbc:AllowanceChargeReason>
|
|
||||||
<cbc:MultiplierFactorNumeric>1.00</cbc:MultiplierFactorNumeric>
|
|
||||||
<cbc:Amount currencyID="EUR">10</cbc:Amount>
|
|
||||||
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
|
|
||||||
<cac:TaxCategory>
|
|
||||||
<cbc:ID>S</cbc:ID>
|
|
||||||
<cbc:Percent>5</cbc:Percent>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:TaxCategory>
|
|
||||||
</cac:AllowanceCharge>
|
|
||||||
<cac:AllowanceCharge>
|
|
||||||
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
|
|
||||||
<cbc:AllowanceChargeReasonCode>AAA</cbc:AllowanceChargeReasonCode>
|
|
||||||
<cbc:AllowanceChargeReason>Doc charge reason text</cbc:AllowanceChargeReason>
|
|
||||||
<cbc:MultiplierFactorNumeric>1.00</cbc:MultiplierFactorNumeric>
|
|
||||||
<cbc:Amount currencyID="EUR">10</cbc:Amount>
|
|
||||||
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
|
|
||||||
<cac:TaxCategory>
|
|
||||||
<cbc:ID>S</cbc:ID>
|
|
||||||
<cbc:Percent>5</cbc:Percent>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:TaxCategory>
|
|
||||||
</cac:AllowanceCharge>
|
|
||||||
<cac:TaxTotal>
|
|
||||||
<cbc:TaxAmount currencyID="EUR">50</cbc:TaxAmount>
|
|
||||||
<cac:TaxSubtotal>
|
|
||||||
<cbc:TaxableAmount currencyID="EUR">1000</cbc:TaxableAmount>
|
|
||||||
<cbc:TaxAmount currencyID="EUR">50</cbc:TaxAmount>
|
|
||||||
<cac:TaxCategory>
|
|
||||||
<cbc:ID>S</cbc:ID>
|
|
||||||
<cbc:Percent>5</cbc:Percent>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:TaxCategory>
|
|
||||||
</cac:TaxSubtotal>
|
|
||||||
<cac:TaxSubtotal>
|
|
||||||
<cbc:TaxableAmount currencyID="EUR">1000</cbc:TaxableAmount>
|
|
||||||
<cbc:TaxAmount currencyID="EUR">0</cbc:TaxAmount>
|
|
||||||
<cac:TaxCategory>
|
|
||||||
<cbc:ID>E</cbc:ID>
|
|
||||||
<cbc:Percent>0</cbc:Percent>
|
|
||||||
<cbc:TaxExemptionReasonCode>VATEX-EU-O</cbc:TaxExemptionReasonCode>
|
|
||||||
<cbc:TaxExemptionReason>Exemtion reason text</cbc:TaxExemptionReason>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:TaxCategory>
|
|
||||||
</cac:TaxSubtotal>
|
|
||||||
</cac:TaxTotal>
|
|
||||||
<cac:TaxTotal>
|
|
||||||
<cbc:TaxAmount currencyID="NOK">46</cbc:TaxAmount>
|
|
||||||
</cac:TaxTotal>
|
|
||||||
<cac:LegalMonetaryTotal>
|
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">200</cbc:LineExtensionAmount>
|
|
||||||
<cbc:TaxExclusiveAmount currencyID="EUR">200</cbc:TaxExclusiveAmount>
|
|
||||||
<cbc:TaxInclusiveAmount currencyID="EUR">205</cbc:TaxInclusiveAmount>
|
|
||||||
<cbc:AllowanceTotalAmount currencyID="EUR">10</cbc:AllowanceTotalAmount>
|
|
||||||
<cbc:ChargeTotalAmount currencyID="EUR">10</cbc:ChargeTotalAmount>
|
|
||||||
<cbc:PrepaidAmount currencyID="EUR">0</cbc:PrepaidAmount>
|
|
||||||
<cbc:PayableAmount currencyID="EUR">205</cbc:PayableAmount>
|
|
||||||
</cac:LegalMonetaryTotal>
|
|
||||||
<cac:InvoiceLine>
|
|
||||||
<cbc:ID>1a</cbc:ID>
|
|
||||||
<cbc:Note>Invoice line note</cbc:Note>
|
|
||||||
<cbc:InvoicedQuantity unitCode="EA">10</cbc:InvoicedQuantity>
|
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">1000</cbc:LineExtensionAmount>
|
|
||||||
<cbc:AccountingCost>6789</cbc:AccountingCost>
|
|
||||||
<cac:InvoicePeriod>
|
|
||||||
<cbc:StartDate>2018-11-12</cbc:StartDate>
|
<cbc:StartDate>2018-11-12</cbc:StartDate>
|
||||||
<cbc:EndDate>2018-11-30</cbc:EndDate>
|
<cbc:EndDate>2018-11-30</cbc:EndDate>
|
||||||
</cac:InvoicePeriod>
|
<cbc:DescriptionCode>35</cbc:DescriptionCode>
|
||||||
<cac:OrderLineReference>
|
</cac:InvoicePeriod>
|
||||||
<cbc:LineID>12345</cbc:LineID>
|
<cac:OrderReference>
|
||||||
</cac:OrderLineReference>
|
<cbc:ID>abc</cbc:ID>
|
||||||
<cac:DocumentReference>
|
<cbc:SalesOrderID>def</cbc:SalesOrderID>
|
||||||
<cbc:ID>Line object identifier</cbc:ID>
|
</cac:OrderReference>
|
||||||
|
<cac:BillingReference>
|
||||||
|
<cac:InvoiceDocumentReference>
|
||||||
|
<cbc:ID>abc123</cbc:ID>
|
||||||
|
<cbc:IssueDate>2018-10-04</cbc:IssueDate>
|
||||||
|
</cac:InvoiceDocumentReference>
|
||||||
|
</cac:BillingReference>
|
||||||
|
<cac:DespatchDocumentReference>
|
||||||
|
<cbc:ID>lmn</cbc:ID>
|
||||||
|
</cac:DespatchDocumentReference>
|
||||||
|
<cac:ReceiptDocumentReference>
|
||||||
|
<cbc:ID>ghi</cbc:ID>
|
||||||
|
</cac:ReceiptDocumentReference>
|
||||||
|
<cac:OriginatorDocumentReference>
|
||||||
|
<cbc:ID>opq</cbc:ID>
|
||||||
|
</cac:OriginatorDocumentReference>
|
||||||
|
<cac:ContractDocumentReference>
|
||||||
|
<cbc:ID>789</cbc:ID>
|
||||||
|
</cac:ContractDocumentReference>
|
||||||
|
<cac:AdditionalDocumentReference>
|
||||||
|
<cbc:ID schemeID="0090">rst</cbc:ID>
|
||||||
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
|
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
|
||||||
</cac:DocumentReference>
|
</cac:AdditionalDocumentReference>
|
||||||
<cac:AllowanceCharge>
|
<cac:AdditionalDocumentReference>
|
||||||
|
<cbc:ID>Supporting document ref</cbc:ID>
|
||||||
|
<cbc:DocumentDescription>Supporting document descr</cbc:DocumentDescription>
|
||||||
|
<cac:Attachment>
|
||||||
|
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="filename0">ZGVmYXVsdA==</cbc:EmbeddedDocumentBinaryObject>
|
||||||
|
<cac:ExternalReference>
|
||||||
|
<cbc:URI>External document location</cbc:URI>
|
||||||
|
</cac:ExternalReference>
|
||||||
|
</cac:Attachment>
|
||||||
|
</cac:AdditionalDocumentReference>
|
||||||
|
<cac:ProjectReference>
|
||||||
|
<cbc:ID>456</cbc:ID>
|
||||||
|
</cac:ProjectReference>
|
||||||
|
<cac:AccountingSupplierParty>
|
||||||
|
<cac:Party>
|
||||||
|
<cbc:EndpointID schemeID="SMTP">Seller electronic address</cbc:EndpointID>
|
||||||
|
<cac:PartyIdentification>
|
||||||
|
<cbc:ID schemeID="0100">Seller identifier 1</cbc:ID>
|
||||||
|
</cac:PartyIdentification>
|
||||||
|
<cac:PartyIdentification>
|
||||||
|
<cbc:ID schemeID="0110">Seller identifier 2</cbc:ID>
|
||||||
|
</cac:PartyIdentification>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Seller trading name</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
<cac:PostalAddress>
|
||||||
|
<cbc:StreetName>Seller address line 1</cbc:StreetName>
|
||||||
|
<cbc:AdditionalStreetName>Seller address line 2</cbc:AdditionalStreetName>
|
||||||
|
<cbc:CityName>Seller city</cbc:CityName>
|
||||||
|
<cbc:PostalZone>12345</cbc:PostalZone>
|
||||||
|
<cbc:CountrySubentity>Seller country subdivision</cbc:CountrySubentity>
|
||||||
|
<cac:AddressLine>
|
||||||
|
<cbc:Line>Seller address line 3</cbc:Line>
|
||||||
|
</cac:AddressLine>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:PostalAddress>
|
||||||
|
<cac:PartyTaxScheme>
|
||||||
|
<cbc:CompanyID>DE12345677</cbc:CompanyID>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:PartyTaxScheme>
|
||||||
|
<cac:PartyTaxScheme>
|
||||||
|
<cbc:CompanyID>DE49294093</cbc:CompanyID>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>NOVAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:PartyTaxScheme>
|
||||||
|
<cac:PartyLegalEntity>
|
||||||
|
<cbc:RegistrationName>Seller name</cbc:RegistrationName>
|
||||||
|
<cbc:CompanyID schemeID="0310">Seller legal identifier</cbc:CompanyID>
|
||||||
|
<cbc:CompanyLegalForm>Seller additional legal information</cbc:CompanyLegalForm>
|
||||||
|
</cac:PartyLegalEntity>
|
||||||
|
<cac:Contact>
|
||||||
|
<cbc:Name>Seller contact point</cbc:Name>
|
||||||
|
<cbc:Telephone>+41 345 654455</cbc:Telephone>
|
||||||
|
<cbc:ElectronicMail>seller@contact.de</cbc:ElectronicMail>
|
||||||
|
</cac:Contact>
|
||||||
|
</cac:Party>
|
||||||
|
</cac:AccountingSupplierParty>
|
||||||
|
<cac:AccountingCustomerParty>
|
||||||
|
<cac:Party>
|
||||||
|
<cbc:EndpointID schemeID="DE:SMTP">Buyer electronic address</cbc:EndpointID>
|
||||||
|
<cac:PartyIdentification>
|
||||||
|
<cbc:ID>0190:Buyer identifier</cbc:ID>
|
||||||
|
</cac:PartyIdentification>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Buyer trading name</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
<cac:PostalAddress>
|
||||||
|
<cbc:StreetName>Buyer address line 1</cbc:StreetName>
|
||||||
|
<cbc:AdditionalStreetName>Buyer address line 2</cbc:AdditionalStreetName>
|
||||||
|
<cbc:CityName>Buyer city</cbc:CityName>
|
||||||
|
<cbc:PostalZone>34562</cbc:PostalZone>
|
||||||
|
<cbc:CountrySubentity>Buyer country subdivision</cbc:CountrySubentity>
|
||||||
|
<cac:AddressLine>
|
||||||
|
<cbc:Line>Buyer address line 3</cbc:Line>
|
||||||
|
</cac:AddressLine>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:PostalAddress>
|
||||||
|
<cac:PartyTaxScheme>
|
||||||
|
<cbc:CompanyID>IE394838894</cbc:CompanyID>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:PartyTaxScheme>
|
||||||
|
<cac:PartyLegalEntity>
|
||||||
|
<cbc:RegistrationName>Buyer name</cbc:RegistrationName>
|
||||||
|
<cbc:CompanyID>Buyer legal registration identifier</cbc:CompanyID>
|
||||||
|
</cac:PartyLegalEntity>
|
||||||
|
<cac:Contact>
|
||||||
|
<cbc:Name>Buyer contact point</cbc:Name>
|
||||||
|
<cbc:Telephone>+353 2948584</cbc:Telephone>
|
||||||
|
<cbc:ElectronicMail>buyer@contact.ie</cbc:ElectronicMail>
|
||||||
|
</cac:Contact>
|
||||||
|
</cac:Party>
|
||||||
|
</cac:AccountingCustomerParty>
|
||||||
|
<cac:PayeeParty>
|
||||||
|
<cac:PartyIdentification>
|
||||||
|
<cbc:ID schemeID="0098">Payee identifier</cbc:ID>
|
||||||
|
</cac:PartyIdentification>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Payee name</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
<cac:PartyLegalEntity>
|
||||||
|
<cbc:CompanyID schemeID="0099">Payee legal registration identifier</cbc:CompanyID>
|
||||||
|
</cac:PartyLegalEntity>
|
||||||
|
</cac:PayeeParty>
|
||||||
|
<cac:TaxRepresentativeParty>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Tax representative name</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
<cac:PostalAddress>
|
||||||
|
<cbc:StreetName>Tax representative address line 1</cbc:StreetName>
|
||||||
|
<cbc:AdditionalStreetName>Tax representative address line 2</cbc:AdditionalStreetName>
|
||||||
|
<cbc:CityName>Tax representative city</cbc:CityName>
|
||||||
|
<cbc:PostalZone>23455</cbc:PostalZone>
|
||||||
|
<cbc:CountrySubentity>Tax representative country subdivision</cbc:CountrySubentity>
|
||||||
|
<cac:AddressLine>
|
||||||
|
<cbc:Line>Tax representative address line 3</cbc:Line>
|
||||||
|
</cac:AddressLine>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:PostalAddress>
|
||||||
|
<cac:PartyTaxScheme>
|
||||||
|
<cbc:CompanyID>DE3949053</cbc:CompanyID>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:PartyTaxScheme>
|
||||||
|
</cac:TaxRepresentativeParty>
|
||||||
|
<cac:Delivery>
|
||||||
|
<cbc:ActualDeliveryDate>2018-12-04</cbc:ActualDeliveryDate>
|
||||||
|
<cac:DeliveryLocation>
|
||||||
|
<cbc:ID schemeID="0045">deliver location identifier</cbc:ID>
|
||||||
|
<cac:Address>
|
||||||
|
<cbc:StreetName>Deliver to address line 1</cbc:StreetName>
|
||||||
|
<cbc:AdditionalStreetName>Deliver to address line 2</cbc:AdditionalStreetName>
|
||||||
|
<cbc:CityName>Deliver to city</cbc:CityName>
|
||||||
|
<cbc:PostalZone>98765</cbc:PostalZone>
|
||||||
|
<cbc:CountrySubentity>Deliver to country subdivision</cbc:CountrySubentity>
|
||||||
|
<cac:AddressLine>
|
||||||
|
<cbc:Line>Deliver to address line 3</cbc:Line>
|
||||||
|
</cac:AddressLine>
|
||||||
|
<cac:Country>
|
||||||
|
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
|
||||||
|
</cac:Country>
|
||||||
|
</cac:Address>
|
||||||
|
</cac:DeliveryLocation>
|
||||||
|
<cac:DeliveryParty>
|
||||||
|
<cac:PartyName>
|
||||||
|
<cbc:Name>Deliver to party name</cbc:Name>
|
||||||
|
</cac:PartyName>
|
||||||
|
</cac:DeliveryParty>
|
||||||
|
</cac:Delivery>
|
||||||
|
<cac:PaymentMeans>
|
||||||
|
<cbc:PaymentMeansCode name="SEPA">4</cbc:PaymentMeansCode>
|
||||||
|
<cbc:PaymentID>Remittance information</cbc:PaymentID>
|
||||||
|
<cac:CardAccount>
|
||||||
|
<cbc:PrimaryAccountNumberID>1234</cbc:PrimaryAccountNumberID>
|
||||||
|
<cbc:NetworkID>mandatory network id</cbc:NetworkID>
|
||||||
|
<cbc:HolderName>Payment card holder name</cbc:HolderName>
|
||||||
|
</cac:CardAccount>
|
||||||
|
<cac:PayeeFinancialAccount>
|
||||||
|
<cbc:ID>IT1212341234123412</cbc:ID>
|
||||||
|
<cbc:Name>Payment account name</cbc:Name>
|
||||||
|
<cac:FinancialInstitutionBranch>
|
||||||
|
<cbc:ID>BSCTCH22</cbc:ID>
|
||||||
|
</cac:FinancialInstitutionBranch>
|
||||||
|
</cac:PayeeFinancialAccount>
|
||||||
|
<cac:PayeeFinancialAccount>
|
||||||
|
<cbc:ID>IT1212341234123413</cbc:ID>
|
||||||
|
<cbc:Name>Payment account name 2</cbc:Name>
|
||||||
|
<cac:FinancialInstitutionBranch>
|
||||||
|
<cbc:ID>BSCTCH22</cbc:ID>
|
||||||
|
</cac:FinancialInstitutionBranch>
|
||||||
|
</cac:PayeeFinancialAccount>
|
||||||
|
<cac:PaymentMandate>
|
||||||
|
<cbc:ID>Mandate reference identifier</cbc:ID>
|
||||||
|
<cac:PayerFinancialAccount>
|
||||||
|
<cbc:ID>Debited account identifier</cbc:ID>
|
||||||
|
</cac:PayerFinancialAccount>
|
||||||
|
</cac:PaymentMandate>
|
||||||
|
</cac:PaymentMeans>
|
||||||
|
<cac:PaymentTerms>
|
||||||
|
<cbc:Note>total amount</cbc:Note>
|
||||||
|
</cac:PaymentTerms>
|
||||||
|
<cac:AllowanceCharge>
|
||||||
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
||||||
<cbc:AllowanceChargeReasonCode>95</cbc:AllowanceChargeReasonCode>
|
<cbc:AllowanceChargeReasonCode>55</cbc:AllowanceChargeReasonCode>
|
||||||
<cbc:AllowanceChargeReason>Invoice line allowance reason</cbc:AllowanceChargeReason>
|
<cbc:AllowanceChargeReason>Doc allowance reason text</cbc:AllowanceChargeReason>
|
||||||
<cbc:MultiplierFactorNumeric>1.00</cbc:MultiplierFactorNumeric>
|
<cbc:MultiplierFactorNumeric>1.0000</cbc:MultiplierFactorNumeric>
|
||||||
<cbc:Amount currencyID="EUR">10</cbc:Amount>
|
<cbc:Amount currencyID="EUR">10.00</cbc:Amount>
|
||||||
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
|
<cbc:BaseAmount currencyID="EUR">1000.00</cbc:BaseAmount>
|
||||||
</cac:AllowanceCharge>
|
<cac:TaxCategory>
|
||||||
<cac:AllowanceCharge>
|
<cbc:ID>S</cbc:ID>
|
||||||
|
<cbc:Percent>5.00</cbc:Percent>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:TaxCategory>
|
||||||
|
</cac:AllowanceCharge>
|
||||||
|
<cac:AllowanceCharge>
|
||||||
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
|
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
|
||||||
<cbc:AllowanceChargeReasonCode>AAA</cbc:AllowanceChargeReasonCode>
|
<cbc:AllowanceChargeReasonCode>AAA</cbc:AllowanceChargeReasonCode>
|
||||||
<cbc:AllowanceChargeReason>Invoice line charge reason</cbc:AllowanceChargeReason>
|
<cbc:AllowanceChargeReason>Doc charge reason text</cbc:AllowanceChargeReason>
|
||||||
<cbc:MultiplierFactorNumeric>1.00</cbc:MultiplierFactorNumeric>
|
<cbc:MultiplierFactorNumeric>1.0000</cbc:MultiplierFactorNumeric>
|
||||||
<cbc:Amount currencyID="EUR">10</cbc:Amount>
|
<cbc:Amount currencyID="EUR">10.00</cbc:Amount>
|
||||||
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
|
<cbc:BaseAmount currencyID="EUR">1000.00</cbc:BaseAmount>
|
||||||
</cac:AllowanceCharge>
|
<cac:TaxCategory>
|
||||||
<cac:Item>
|
<cbc:ID>S</cbc:ID>
|
||||||
<cbc:Description>Item description</cbc:Description>
|
<cbc:Percent>5.00</cbc:Percent>
|
||||||
<cbc:Name>Item name</cbc:Name>
|
<cac:TaxScheme>
|
||||||
<cac:BuyersItemIdentification>
|
<cbc:ID>VAT</cbc:ID>
|
||||||
<cbc:ID>Item buyer's identifier</cbc:ID>
|
</cac:TaxScheme>
|
||||||
</cac:BuyersItemIdentification>
|
</cac:TaxCategory>
|
||||||
<cac:SellersItemIdentification>
|
</cac:AllowanceCharge>
|
||||||
<cbc:ID>Item seller's identifier</cbc:ID>
|
<cac:TaxTotal>
|
||||||
</cac:SellersItemIdentification>
|
<cbc:TaxAmount currencyID="NOK">46.00</cbc:TaxAmount>
|
||||||
<cac:StandardItemIdentification>
|
</cac:TaxTotal>
|
||||||
<cbc:ID schemeID="0060">Item standar identifier</cbc:ID>
|
<cac:TaxTotal>
|
||||||
</cac:StandardItemIdentification>
|
<cbc:TaxAmount currencyID="EUR">50.00</cbc:TaxAmount>
|
||||||
<cac:OriginCountry>
|
<cac:TaxSubtotal>
|
||||||
<cbc:IdentificationCode>IT</cbc:IdentificationCode>
|
<cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
|
||||||
</cac:OriginCountry>
|
<cbc:TaxAmount currencyID="EUR">50.00</cbc:TaxAmount>
|
||||||
<cac:CommodityClassification>
|
<cac:TaxCategory>
|
||||||
<cbc:ItemClassificationCode listID="ZZZ" listVersionID="version0">Item classification identifier0</cbc:ItemClassificationCode>
|
<cbc:ID>S</cbc:ID>
|
||||||
</cac:CommodityClassification>
|
<cbc:Percent>5.00</cbc:Percent>
|
||||||
<cac:ClassifiedTaxCategory>
|
<cac:TaxScheme>
|
||||||
<cbc:ID>S</cbc:ID>
|
<cbc:ID>VAT</cbc:ID>
|
||||||
<cbc:Percent>5</cbc:Percent>
|
</cac:TaxScheme>
|
||||||
<cac:TaxScheme>
|
</cac:TaxCategory>
|
||||||
<cbc:ID>VAT</cbc:ID>
|
</cac:TaxSubtotal>
|
||||||
</cac:TaxScheme>
|
<cac:TaxSubtotal>
|
||||||
</cac:ClassifiedTaxCategory>
|
<cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
|
||||||
<cac:AdditionalItemProperty>
|
<cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
|
||||||
<cbc:Name>Color</cbc:Name>
|
<cac:TaxCategory>
|
||||||
<cbc:Value>Red</cbc:Value>
|
<cbc:ID>E</cbc:ID>
|
||||||
</cac:AdditionalItemProperty>
|
<cbc:Percent>0.00</cbc:Percent>
|
||||||
<cac:AdditionalItemProperty>
|
<cbc:TaxExemptionReasonCode>Exemption reason code</cbc:TaxExemptionReasonCode>
|
||||||
<cbc:Name>Size</cbc:Name>
|
<cbc:TaxExemptionReason>Exemtion reason text</cbc:TaxExemptionReason>
|
||||||
<cbc:Value>L</cbc:Value>
|
<cac:TaxScheme>
|
||||||
</cac:AdditionalItemProperty>
|
<cbc:ID>VAT</cbc:ID>
|
||||||
</cac:Item>
|
</cac:TaxScheme>
|
||||||
<cac:Price>
|
</cac:TaxCategory>
|
||||||
<cbc:PriceAmount currencyID="EUR">10</cbc:PriceAmount>
|
</cac:TaxSubtotal>
|
||||||
<cbc:BaseQuantity unitCode="EA">1</cbc:BaseQuantity>
|
</cac:TaxTotal>
|
||||||
|
<cac:LegalMonetaryTotal>
|
||||||
|
<cbc:LineExtensionAmount currencyID="EUR">2000.00</cbc:LineExtensionAmount>
|
||||||
|
<cbc:TaxExclusiveAmount currencyID="EUR">2000.00</cbc:TaxExclusiveAmount>
|
||||||
|
<cbc:TaxInclusiveAmount currencyID="EUR">2050.00</cbc:TaxInclusiveAmount>
|
||||||
|
<cbc:AllowanceTotalAmount currencyID="EUR">10.00</cbc:AllowanceTotalAmount>
|
||||||
|
<cbc:ChargeTotalAmount currencyID="EUR">10.00</cbc:ChargeTotalAmount>
|
||||||
|
<cbc:PayableAmount currencyID="EUR">2050.00</cbc:PayableAmount>
|
||||||
|
</cac:LegalMonetaryTotal>
|
||||||
|
<cac:InvoiceLine>
|
||||||
|
<cbc:ID>1a</cbc:ID>
|
||||||
|
<cbc:Note>Invoice line note</cbc:Note>
|
||||||
|
<cbc:InvoicedQuantity unitCode="EA">10.00000000</cbc:InvoicedQuantity>
|
||||||
|
<cbc:LineExtensionAmount currencyID="EUR">1000.00</cbc:LineExtensionAmount>
|
||||||
|
<cbc:AccountingCost>6789</cbc:AccountingCost>
|
||||||
|
<cac:InvoicePeriod>
|
||||||
|
<cbc:StartDate>2018-11-12</cbc:StartDate>
|
||||||
|
<cbc:EndDate>2018-11-30</cbc:EndDate>
|
||||||
|
</cac:InvoicePeriod>
|
||||||
|
<cac:OrderLineReference>
|
||||||
|
<cbc:LineID>12345</cbc:LineID>
|
||||||
|
</cac:OrderLineReference>
|
||||||
|
<cac:DocumentReference>
|
||||||
|
<cbc:ID schemeID="ZZZ">Line object identifier</cbc:ID>
|
||||||
|
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
|
||||||
|
</cac:DocumentReference>
|
||||||
<cac:AllowanceCharge>
|
<cac:AllowanceCharge>
|
||||||
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
||||||
<cbc:Amount currencyID="EUR">1</cbc:Amount>
|
<cbc:AllowanceChargeReasonCode>55</cbc:AllowanceChargeReasonCode>
|
||||||
<cbc:BaseAmount currencyID="EUR">11</cbc:BaseAmount>
|
<cbc:AllowanceChargeReason>Invoice line allowance reason</cbc:AllowanceChargeReason>
|
||||||
|
<cbc:MultiplierFactorNumeric>1</cbc:MultiplierFactorNumeric>
|
||||||
|
<cbc:Amount currencyID="EUR">10</cbc:Amount>
|
||||||
|
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
|
||||||
</cac:AllowanceCharge>
|
</cac:AllowanceCharge>
|
||||||
</cac:Price>
|
<cac:AllowanceCharge>
|
||||||
|
<cbc:ChargeIndicator>true</cbc:ChargeIndicator>
|
||||||
|
<cbc:AllowanceChargeReasonCode>AAA</cbc:AllowanceChargeReasonCode>
|
||||||
|
<cbc:AllowanceChargeReason>Invoice line charge reason</cbc:AllowanceChargeReason>
|
||||||
|
<cbc:MultiplierFactorNumeric>1</cbc:MultiplierFactorNumeric>
|
||||||
|
<cbc:Amount currencyID="EUR">10</cbc:Amount>
|
||||||
|
<cbc:BaseAmount currencyID="EUR">1000</cbc:BaseAmount>
|
||||||
|
</cac:AllowanceCharge>
|
||||||
|
<cac:Item>
|
||||||
|
<cbc:Description>Item description</cbc:Description>
|
||||||
|
<cbc:Name>Item name</cbc:Name>
|
||||||
|
<cac:BuyersItemIdentification>
|
||||||
|
<cbc:ID>Item buyer's identifier</cbc:ID>
|
||||||
|
</cac:BuyersItemIdentification>
|
||||||
|
<cac:SellersItemIdentification>
|
||||||
|
<cbc:ID>Item seller's identifier</cbc:ID>
|
||||||
|
</cac:SellersItemIdentification>
|
||||||
|
<cac:StandardItemIdentification>
|
||||||
|
<cbc:ID>Item standar identifier</cbc:ID>
|
||||||
|
</cac:StandardItemIdentification>
|
||||||
|
<cac:OriginCountry>
|
||||||
|
<cbc:IdentificationCode>IT</cbc:IdentificationCode>
|
||||||
|
</cac:OriginCountry>
|
||||||
|
<cac:CommodityClassification>
|
||||||
|
<cbc:ItemClassificationCode listID="ZZZ" listVersionID="version0">Item classification identifier0</cbc:ItemClassificationCode>
|
||||||
|
</cac:CommodityClassification>
|
||||||
|
<cac:ClassifiedTaxCategory>
|
||||||
|
<cbc:ID>S</cbc:ID>
|
||||||
|
<cbc:Percent>5.00</cbc:Percent>
|
||||||
|
<cac:TaxScheme>
|
||||||
|
<cbc:ID>VAT</cbc:ID>
|
||||||
|
</cac:TaxScheme>
|
||||||
|
</cac:ClassifiedTaxCategory>
|
||||||
|
<cac:AdditionalItemProperty>
|
||||||
|
<cbc:Name>Color</cbc:Name>
|
||||||
|
<cbc:Value>Red</cbc:Value>
|
||||||
|
</cac:AdditionalItemProperty>
|
||||||
|
<cac:AdditionalItemProperty>
|
||||||
|
<cbc:Name>Size</cbc:Name>
|
||||||
|
<cbc:Value>L</cbc:Value>
|
||||||
|
</cac:AdditionalItemProperty>
|
||||||
|
</cac:Item>
|
||||||
|
<cac:Price>
|
||||||
|
<cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
|
||||||
|
<cbc:BaseQuantity unitCode="EA">1.00</cbc:BaseQuantity>
|
||||||
|
<cac:AllowanceCharge>
|
||||||
|
<cbc:ChargeIndicator>false</cbc:ChargeIndicator>
|
||||||
|
<cbc:Amount currencyID="EUR">1</cbc:Amount>
|
||||||
|
<cbc:BaseAmount currencyID="EUR">11</cbc:BaseAmount>
|
||||||
|
</cac:AllowanceCharge>
|
||||||
|
</cac:Price>
|
||||||
</cac:InvoiceLine>
|
</cac:InvoiceLine>
|
||||||
<cac:InvoiceLine>
|
<cac:InvoiceLine>
|
||||||
<cbc:ID>1b</cbc:ID>
|
<cbc:ID>1b</cbc:ID>
|
||||||
<cbc:InvoicedQuantity unitCode="EA">10</cbc:InvoicedQuantity>
|
<cbc:InvoicedQuantity unitCode="EA">10.00000000</cbc:InvoicedQuantity>
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">1000</cbc:LineExtensionAmount>
|
<cbc:LineExtensionAmount currencyID="EUR">1000.00</cbc:LineExtensionAmount>
|
||||||
<cac:Item>
|
<cac:Item>
|
||||||
<cbc:Name>Item name 2</cbc:Name>
|
<cbc:Name>Item name 2</cbc:Name>
|
||||||
<cac:ClassifiedTaxCategory>
|
<cac:ClassifiedTaxCategory>
|
||||||
<cbc:ID>E</cbc:ID>
|
<cbc:ID>E</cbc:ID>
|
||||||
<cbc:Percent>0</cbc:Percent>
|
<cbc:Percent>0.00</cbc:Percent>
|
||||||
<cac:TaxScheme>
|
<cac:TaxScheme>
|
||||||
<cbc:ID>VAT</cbc:ID>
|
<cbc:ID>VAT</cbc:ID>
|
||||||
</cac:TaxScheme>
|
</cac:TaxScheme>
|
||||||
</cac:ClassifiedTaxCategory>
|
</cac:ClassifiedTaxCategory>
|
||||||
</cac:Item>
|
</cac:Item>
|
||||||
<cac:Price>
|
<cac:Price>
|
||||||
<cbc:PriceAmount currencyID="EUR">10</cbc:PriceAmount>
|
<cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
|
||||||
</cac:Price>
|
</cac:Price>
|
||||||
</cac:InvoiceLine>
|
</cac:InvoiceLine>
|
||||||
</Invoice>
|
</Invoice>
|
||||||
|
|||||||
@@ -1,349 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<Invoice xmlns="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:ccts="urn:un:unece:uncefact:documentation:2" xmlns:qdt="urn:oasis:names:specification:ubl:schema:xsd:QualifiedDataTypes-2" xmlns:udt="urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2">
|
|
||||||
<cbc:CustomizationID>urn:cen.eu:en16931:2017</cbc:CustomizationID>
|
|
||||||
<cbc:ProfileID>BT-23 Business Process Type</cbc:ProfileID>
|
|
||||||
<cbc:ID>Test_EeISI_100</cbc:ID>
|
|
||||||
<cbc:IssueDate>2018-11-12</cbc:IssueDate>
|
|
||||||
<cbc:DueDate>2018-11-30</cbc:DueDate>
|
|
||||||
<cbc:InvoiceTypeCode>380</cbc:InvoiceTypeCode>
|
|
||||||
<cbc:Note>##AAA##invoice note text</cbc:Note>
|
|
||||||
<cbc:Note>##AAA##invoice note text 2</cbc:Note>
|
|
||||||
<cbc:DocumentCurrencyCode>EUR</cbc:DocumentCurrencyCode>
|
|
||||||
<cbc:TaxCurrencyCode>NOK</cbc:TaxCurrencyCode>
|
|
||||||
<cbc:AccountingCost>uvz</cbc:AccountingCost>
|
|
||||||
<cbc:BuyerReference>123</cbc:BuyerReference>
|
|
||||||
<cac:InvoicePeriod>
|
|
||||||
<cbc:StartDate>2018-11-12</cbc:StartDate>
|
|
||||||
<cbc:EndDate>2018-11-30</cbc:EndDate>
|
|
||||||
<cbc:DescriptionCode>35</cbc:DescriptionCode>
|
|
||||||
</cac:InvoicePeriod>
|
|
||||||
<cac:OrderReference>
|
|
||||||
<cbc:ID>abc</cbc:ID>
|
|
||||||
<cbc:SalesOrderID>def</cbc:SalesOrderID>
|
|
||||||
</cac:OrderReference>
|
|
||||||
<cac:BillingReference>
|
|
||||||
<cac:InvoiceDocumentReference>
|
|
||||||
<cbc:ID>abc123</cbc:ID>
|
|
||||||
<cbc:IssueDate>2018-10-04</cbc:IssueDate>
|
|
||||||
</cac:InvoiceDocumentReference>
|
|
||||||
</cac:BillingReference>
|
|
||||||
<cac:DespatchDocumentReference>
|
|
||||||
<cbc:ID>lmn</cbc:ID>
|
|
||||||
</cac:DespatchDocumentReference>
|
|
||||||
<cac:ReceiptDocumentReference>
|
|
||||||
<cbc:ID>ghi</cbc:ID>
|
|
||||||
</cac:ReceiptDocumentReference>
|
|
||||||
<cac:OriginatorDocumentReference>
|
|
||||||
<cbc:ID>opq</cbc:ID>
|
|
||||||
</cac:OriginatorDocumentReference>
|
|
||||||
<cac:ContractDocumentReference>
|
|
||||||
<cbc:ID>789</cbc:ID>
|
|
||||||
</cac:ContractDocumentReference>
|
|
||||||
<cac:AdditionalDocumentReference>
|
|
||||||
<cbc:ID schemeID="0090">rst</cbc:ID>
|
|
||||||
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
|
|
||||||
</cac:AdditionalDocumentReference>
|
|
||||||
<cac:AdditionalDocumentReference>
|
|
||||||
<cbc:ID>Supporting document ref</cbc:ID>
|
|
||||||
<cbc:DocumentDescription>Supporting document descr</cbc:DocumentDescription>
|
|
||||||
<cac:Attachment>
|
|
||||||
<cbc:EmbeddedDocumentBinaryObject mimeCode="application/pdf" filename="filename0">ZGVmYXVsdA==</cbc:EmbeddedDocumentBinaryObject>
|
|
||||||
<cac:ExternalReference>
|
|
||||||
<cbc:URI>External document location</cbc:URI>
|
|
||||||
</cac:ExternalReference>
|
|
||||||
</cac:Attachment>
|
|
||||||
</cac:AdditionalDocumentReference>
|
|
||||||
<cac:ProjectReference>
|
|
||||||
<cbc:ID>456</cbc:ID>
|
|
||||||
</cac:ProjectReference>
|
|
||||||
<cac:AccountingSupplierParty>
|
|
||||||
<cac:Party>
|
|
||||||
<cbc:EndpointID schemeID="SMTP">Seller electronic address</cbc:EndpointID>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0100">Seller identifier 1</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0110">Seller identifier 2</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="SEPA">Bank assigned creditor identifier</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Seller trading name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PostalAddress>
|
|
||||||
<cbc:StreetName>Seller address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Seller address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Seller city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>12345</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Seller country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Seller address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:PostalAddress>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>DE12345677</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>DE49294093</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>NOVAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
<cac:PartyLegalEntity>
|
|
||||||
<cbc:RegistrationName>Seller name</cbc:RegistrationName>
|
|
||||||
<cbc:CompanyID schemeID="0310">Seller legal identifier</cbc:CompanyID>
|
|
||||||
<cbc:CompanyLegalForm>Seller additional legal information</cbc:CompanyLegalForm>
|
|
||||||
</cac:PartyLegalEntity>
|
|
||||||
<cac:Contact>
|
|
||||||
<cbc:Name>Seller contact point</cbc:Name>
|
|
||||||
<cbc:Telephone>+41 345 654455</cbc:Telephone>
|
|
||||||
<cbc:ElectronicMail>seller@contact.de</cbc:ElectronicMail>
|
|
||||||
</cac:Contact>
|
|
||||||
</cac:Party>
|
|
||||||
</cac:AccountingSupplierParty>
|
|
||||||
<cac:AccountingCustomerParty>
|
|
||||||
<cac:Party>
|
|
||||||
<cbc:EndpointID schemeID="DE:SMTP">Buyer electronic address</cbc:EndpointID>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID>0190:Buyer identifier</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Buyer trading name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PostalAddress>
|
|
||||||
<cbc:StreetName>Buyer address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Buyer address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Buyer city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>34562</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Buyer country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Buyer address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:PostalAddress>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>IE394838894</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
<cac:PartyLegalEntity>
|
|
||||||
<cbc:RegistrationName>Buyer name</cbc:RegistrationName>
|
|
||||||
<cbc:CompanyID>Buyer legal registration identifier</cbc:CompanyID>
|
|
||||||
</cac:PartyLegalEntity>
|
|
||||||
<cac:Contact>
|
|
||||||
<cbc:Name>Buyer contact point</cbc:Name>
|
|
||||||
<cbc:Telephone>+353 2948584</cbc:Telephone>
|
|
||||||
<cbc:ElectronicMail>buyer@contact.ie</cbc:ElectronicMail>
|
|
||||||
</cac:Contact>
|
|
||||||
</cac:Party>
|
|
||||||
</cac:AccountingCustomerParty>
|
|
||||||
<cac:PayeeParty>
|
|
||||||
<cac:PartyIdentification>
|
|
||||||
<cbc:ID schemeID="0098">Payee identifier</cbc:ID>
|
|
||||||
</cac:PartyIdentification>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Payee name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PartyLegalEntity>
|
|
||||||
<cbc:CompanyID schemeID="0099">Payee legal registration identifier</cbc:CompanyID>
|
|
||||||
</cac:PartyLegalEntity>
|
|
||||||
</cac:PayeeParty>
|
|
||||||
<cac:TaxRepresentativeParty>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Tax representative name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
<cac:PostalAddress>
|
|
||||||
<cbc:StreetName>Tax representative address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Tax representative address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Tax representative city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>23455</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Tax representative country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Tax representative address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>DE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:PostalAddress>
|
|
||||||
<cac:PartyTaxScheme>
|
|
||||||
<cbc:CompanyID>DE3949053</cbc:CompanyID>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:PartyTaxScheme>
|
|
||||||
</cac:TaxRepresentativeParty>
|
|
||||||
<cac:Delivery>
|
|
||||||
<cbc:ActualDeliveryDate>2018-12-04</cbc:ActualDeliveryDate>
|
|
||||||
<cac:DeliveryLocation>
|
|
||||||
<cbc:ID schemeID="0045">deliver location identifier</cbc:ID>
|
|
||||||
<cac:Address>
|
|
||||||
<cbc:StreetName>Deliver to address line 1</cbc:StreetName>
|
|
||||||
<cbc:AdditionalStreetName>Deliver to address line 2</cbc:AdditionalStreetName>
|
|
||||||
<cbc:CityName>Deliver to city</cbc:CityName>
|
|
||||||
<cbc:PostalZone>98765</cbc:PostalZone>
|
|
||||||
<cbc:CountrySubentity>Deliver to country subdivision</cbc:CountrySubentity>
|
|
||||||
<cac:AddressLine>
|
|
||||||
<cbc:Line>Deliver to address line 3</cbc:Line>
|
|
||||||
</cac:AddressLine>
|
|
||||||
<cac:Country>
|
|
||||||
<cbc:IdentificationCode>IE</cbc:IdentificationCode>
|
|
||||||
</cac:Country>
|
|
||||||
</cac:Address>
|
|
||||||
</cac:DeliveryLocation>
|
|
||||||
<cac:DeliveryParty>
|
|
||||||
<cac:PartyName>
|
|
||||||
<cbc:Name>Deliver to party name</cbc:Name>
|
|
||||||
</cac:PartyName>
|
|
||||||
</cac:DeliveryParty>
|
|
||||||
</cac:Delivery>
|
|
||||||
<cac:PaymentMeans>
|
|
||||||
<cbc:PaymentMeansCode name="SEPA">4</cbc:PaymentMeansCode>
|
|
||||||
<cbc:PaymentID>Remittance information</cbc:PaymentID>
|
|
||||||
<cac:CardAccount>
|
|
||||||
<cbc:PrimaryAccountNumberID>1234</cbc:PrimaryAccountNumberID>
|
|
||||||
<cbc:NetworkID>mandatory network id</cbc:NetworkID>
|
|
||||||
<cbc:HolderName>Payment card holder name</cbc:HolderName>
|
|
||||||
</cac:CardAccount>
|
|
||||||
<cac:PayeeFinancialAccount>
|
|
||||||
<cbc:ID>IT1212341234123412</cbc:ID>
|
|
||||||
<cbc:Name>Payment account name</cbc:Name>
|
|
||||||
<cac:FinancialInstitutionBranch>
|
|
||||||
<cbc:ID>BSCTCH22</cbc:ID>
|
|
||||||
</cac:FinancialInstitutionBranch>
|
|
||||||
</cac:PayeeFinancialAccount>
|
|
||||||
<cac:PayeeFinancialAccount>
|
|
||||||
<cbc:ID>IT1212341234123413</cbc:ID>
|
|
||||||
<cbc:Name>Payment account name 2</cbc:Name>
|
|
||||||
<cac:FinancialInstitutionBranch>
|
|
||||||
<cbc:ID>BSCTCH22</cbc:ID>
|
|
||||||
</cac:FinancialInstitutionBranch>
|
|
||||||
</cac:PayeeFinancialAccount>
|
|
||||||
<cac:PaymentMandate>
|
|
||||||
<cbc:ID>Mandate reference identifier</cbc:ID>
|
|
||||||
<cac:PayerFinancialAccount>
|
|
||||||
<cbc:ID>Debited account identifier</cbc:ID>
|
|
||||||
</cac:PayerFinancialAccount>
|
|
||||||
</cac:PaymentMandate>
|
|
||||||
</cac:PaymentMeans>
|
|
||||||
<cac:PaymentTerms>
|
|
||||||
<cbc:Note>total amount</cbc:Note>
|
|
||||||
</cac:PaymentTerms>
|
|
||||||
<cac:TaxTotal>
|
|
||||||
<cbc:TaxAmount currencyID="EUR">50.00</cbc:TaxAmount>
|
|
||||||
<cac:TaxSubtotal>
|
|
||||||
<cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
|
|
||||||
<cbc:TaxAmount currencyID="EUR">50.00</cbc:TaxAmount>
|
|
||||||
<cac:TaxCategory>
|
|
||||||
<cbc:ID>S</cbc:ID>
|
|
||||||
<cbc:Percent>5.00</cbc:Percent>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:TaxCategory>
|
|
||||||
</cac:TaxSubtotal>
|
|
||||||
<cac:TaxSubtotal>
|
|
||||||
<cbc:TaxableAmount currencyID="EUR">1000.00</cbc:TaxableAmount>
|
|
||||||
<cbc:TaxAmount currencyID="EUR">0.00</cbc:TaxAmount>
|
|
||||||
<cac:TaxCategory>
|
|
||||||
<cbc:ID>E</cbc:ID>
|
|
||||||
<cbc:Percent>0.00</cbc:Percent>
|
|
||||||
<cbc:TaxExemptionReasonCode>Exemption reason code</cbc:TaxExemptionReasonCode>
|
|
||||||
<cbc:TaxExemptionReason>Exemtion reason text</cbc:TaxExemptionReason>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:TaxCategory>
|
|
||||||
</cac:TaxSubtotal>
|
|
||||||
</cac:TaxTotal>
|
|
||||||
<cac:LegalMonetaryTotal>
|
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">200.00</cbc:LineExtensionAmount>
|
|
||||||
<cbc:TaxExclusiveAmount currencyID="EUR">200.00</cbc:TaxExclusiveAmount>
|
|
||||||
<cbc:TaxInclusiveAmount currencyID="EUR">205.00</cbc:TaxInclusiveAmount>
|
|
||||||
<cbc:PayableAmount currencyID="EUR">205.00</cbc:PayableAmount>
|
|
||||||
</cac:LegalMonetaryTotal>
|
|
||||||
<cac:InvoiceLine>
|
|
||||||
<cbc:ID>1a</cbc:ID>
|
|
||||||
<cbc:Note>Invoice line note</cbc:Note>
|
|
||||||
<cbc:InvoicedQuantity unitCode="EA">10.00000000</cbc:InvoicedQuantity>
|
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">1000.00</cbc:LineExtensionAmount>
|
|
||||||
<cbc:AccountingCost>6789</cbc:AccountingCost>
|
|
||||||
<cac:InvoicePeriod>
|
|
||||||
<cbc:StartDate>2018-11-12</cbc:StartDate>
|
|
||||||
<cbc:EndDate>2018-11-30</cbc:EndDate>
|
|
||||||
</cac:InvoicePeriod>
|
|
||||||
<cac:OrderLineReference>
|
|
||||||
<cbc:LineID>12345</cbc:LineID>
|
|
||||||
</cac:OrderLineReference>
|
|
||||||
<cac:DocumentReference>
|
|
||||||
<cbc:ID schemeID="ZZZ">Line object identifier</cbc:ID>
|
|
||||||
<cbc:DocumentTypeCode>130</cbc:DocumentTypeCode>
|
|
||||||
</cac:DocumentReference>
|
|
||||||
<cac:Item>
|
|
||||||
<cbc:Description>Item description</cbc:Description>
|
|
||||||
<cbc:Name>Item name</cbc:Name>
|
|
||||||
<cac:BuyersItemIdentification>
|
|
||||||
<cbc:ID>Item buyer's identifier</cbc:ID>
|
|
||||||
</cac:BuyersItemIdentification>
|
|
||||||
<cac:SellersItemIdentification>
|
|
||||||
<cbc:ID>Item seller's identifier</cbc:ID>
|
|
||||||
</cac:SellersItemIdentification>
|
|
||||||
<cac:StandardItemIdentification>
|
|
||||||
<cbc:ID>Item standar identifier</cbc:ID>
|
|
||||||
</cac:StandardItemIdentification>
|
|
||||||
<cac:OriginCountry>
|
|
||||||
<cbc:IdentificationCode>IT</cbc:IdentificationCode>
|
|
||||||
</cac:OriginCountry>
|
|
||||||
<cac:CommodityClassification>
|
|
||||||
<cbc:ItemClassificationCode listID="ZZZ" listVersionID="version0">Item classification identifier0</cbc:ItemClassificationCode>
|
|
||||||
</cac:CommodityClassification>
|
|
||||||
<cac:ClassifiedTaxCategory>
|
|
||||||
<cbc:ID>S</cbc:ID>
|
|
||||||
<cbc:Percent>5.00</cbc:Percent>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:ClassifiedTaxCategory>
|
|
||||||
<cac:AdditionalItemProperty>
|
|
||||||
<cbc:Name>Color</cbc:Name>
|
|
||||||
<cbc:Value>Red</cbc:Value>
|
|
||||||
</cac:AdditionalItemProperty>
|
|
||||||
<cac:AdditionalItemProperty>
|
|
||||||
<cbc:Name>Size</cbc:Name>
|
|
||||||
<cbc:Value>L</cbc:Value>
|
|
||||||
</cac:AdditionalItemProperty>
|
|
||||||
</cac:Item>
|
|
||||||
<cac:Price>
|
|
||||||
<cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
|
|
||||||
<cbc:BaseQuantity unitCode="EA">1.00</cbc:BaseQuantity>
|
|
||||||
|
|
||||||
</cac:Price>
|
|
||||||
</cac:InvoiceLine>
|
|
||||||
<cac:InvoiceLine>
|
|
||||||
<cbc:ID>1b</cbc:ID>
|
|
||||||
<cbc:InvoicedQuantity unitCode="EA">10.00000000</cbc:InvoicedQuantity>
|
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">100.00</cbc:LineExtensionAmount>
|
|
||||||
<cac:Item>
|
|
||||||
<cbc:Name>Item name 2</cbc:Name>
|
|
||||||
<cac:ClassifiedTaxCategory>
|
|
||||||
<cbc:ID>E</cbc:ID>
|
|
||||||
<cbc:Percent>0.00</cbc:Percent>
|
|
||||||
<cac:TaxScheme>
|
|
||||||
<cbc:ID>VAT</cbc:ID>
|
|
||||||
</cac:TaxScheme>
|
|
||||||
</cac:ClassifiedTaxCategory>
|
|
||||||
</cac:Item>
|
|
||||||
<cac:Price>
|
|
||||||
<cbc:PriceAmount currencyID="EUR">10.00</cbc:PriceAmount>
|
|
||||||
</cac:Price>
|
|
||||||
</cac:InvoiceLine>
|
|
||||||
</Invoice>
|
|
||||||
@@ -123,6 +123,7 @@
|
|||||||
</cac:LegalMonetaryTotal>
|
</cac:LegalMonetaryTotal>
|
||||||
<cac:InvoiceLine>
|
<cac:InvoiceLine>
|
||||||
<cbc:ID>1</cbc:ID>
|
<cbc:ID>1</cbc:ID>
|
||||||
|
<cbc:Note>Something</cbc:Note>
|
||||||
<cbc:InvoicedQuantity unitCode="HUR">1</cbc:InvoicedQuantity>
|
<cbc:InvoicedQuantity unitCode="HUR">1</cbc:InvoicedQuantity>
|
||||||
<cbc:LineExtensionAmount currencyID="EUR">160</cbc:LineExtensionAmount>
|
<cbc:LineExtensionAmount currencyID="EUR">160</cbc:LineExtensionAmount>
|
||||||
<cac:Item>
|
<cac:Item>
|
||||||
@@ -178,4 +179,4 @@
|
|||||||
<cbc:BaseQuantity unitCode="LTR">1</cbc:BaseQuantity>
|
<cbc:BaseQuantity unitCode="LTR">1</cbc:BaseQuantity>
|
||||||
</cac:Price>
|
</cac:Price>
|
||||||
</cac:InvoiceLine>
|
</cac:InvoiceLine>
|
||||||
</Invoice>
|
</Invoice>
|
||||||
|
|||||||
2
pom.xml
2
pom.xml
@@ -3,7 +3,7 @@
|
|||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<name>Mustang</name>
|
<name>Mustang</name>
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
<artifactId>core</artifactId>
|
<artifactId>core</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
<groupId>org.mustangproject</groupId>
|
<groupId>org.mustangproject</groupId>
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<name>Library to validate e-invoices (ZUGFeRD, Factur-X and Xrechnung)</name>
|
<name>Library to validate e-invoices (ZUGFeRD, Factur-X and Xrechnung)</name>
|
||||||
|
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
<repositories>
|
<repositories>
|
||||||
<repository>
|
<repository>
|
||||||
<!-- for jargs -->
|
<!-- for jargs -->
|
||||||
@@ -38,12 +38,18 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>${project.groupId}</groupId>
|
<groupId>${project.groupId}</groupId>
|
||||||
<artifactId>library</artifactId>
|
<artifactId>library</artifactId>
|
||||||
<version>2.15.0-SNAPSHOT</version>
|
<version>2.15.2-SNAPSHOT</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>org.dom4j</groupId>
|
<groupId>org.dom4j</groupId>
|
||||||
<artifactId>dom4j</artifactId>
|
<artifactId>dom4j</artifactId>
|
||||||
<version>2.1.4</version>
|
<version>2.1.4</version>
|
||||||
|
<exclusions>
|
||||||
|
<exclusion>
|
||||||
|
<groupId>*</groupId>
|
||||||
|
<artifactId>*</artifactId>
|
||||||
|
</exclusion>
|
||||||
|
</exclusions>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>commons-io</groupId>
|
<groupId>commons-io</groupId>
|
||||||
@@ -224,10 +230,10 @@
|
|||||||
</goals>
|
</goals>
|
||||||
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<outputDirectory>${basedir}/src/main/resources/xslt/ZF_230/</outputDirectory>
|
<outputDirectory>src/main/resources/xslt/ZF_232/</outputDirectory>
|
||||||
<resources>
|
<resources>
|
||||||
<resource>
|
<resource>
|
||||||
<directory>${basedir}/src/main/resources/schematron/ZF_230/</directory>
|
<directory>${basedir}/src/main/resources/schematron/ZF_232/</directory>
|
||||||
<includes>
|
<includes>
|
||||||
<include>**/*.xml</include>
|
<include>**/*.xml</include>
|
||||||
</includes>
|
</includes>
|
||||||
|
|||||||
@@ -122,7 +122,9 @@ public class PDFValidator extends Validator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// step 2 validate XMP
|
// step 2 validate XMP
|
||||||
final ZUGFeRDImporter zi = new ZUGFeRDImporter(inputStream);
|
final ZUGFeRDImporter zi = new ZUGFeRDImporter();
|
||||||
|
zi.doIgnoreCalculationErrors();//of course the calculation will still be schematron checked
|
||||||
|
zi.setInputStream(inputStream);
|
||||||
final String xmp = zi.getXMP();
|
final String xmp = zi.getXMP();
|
||||||
|
|
||||||
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
final DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
|
||||||
@@ -239,7 +241,7 @@ public class PDFValidator extends Validator {
|
|||||||
|
|
||||||
boolean versionValid = false;
|
boolean versionValid = false;
|
||||||
for (int i = 0; i < nodes.getLength(); i++) {
|
for (int i = 0; i < nodes.getLength(); i++) {
|
||||||
final String[] valueArray = {"1.0", "2p0", "1.2", "2.0", "2.1", "2.2", "2.3", "3.0"}; //1.2, 2.0, 2.1, 2.2, 2.3 and 3.0 are for xrechnung 1.2, 2p0 can be ZF 2.0, 2.1, 2.1.1
|
final String[] valueArray = {"1.0", "1p0", "2p0", "1.2", "2.0", "2.1", "2.2", "2.3", "3.0"}; //1.2, 2.0, 2.1, 2.2, 2.3 and 3.0 are for xrechnung 1.2, 2p0 can be ZF 2.0, 2.1, 2.1.1
|
||||||
|
|
||||||
if (stringArrayContains(valueArray, nodes.item(i).getTextContent())) {
|
if (stringArrayContains(valueArray, nodes.item(i).getTextContent())) {
|
||||||
versionValid = true;
|
versionValid = true;
|
||||||
@@ -265,6 +267,7 @@ public class PDFValidator extends Validator {
|
|||||||
final byte[] pdfMachineSignature = "pdfMachine from Broadgun Software".getBytes(StandardCharsets.UTF_8);
|
final byte[] pdfMachineSignature = "pdfMachine from Broadgun Software".getBytes(StandardCharsets.UTF_8);
|
||||||
final byte[] ghostscriptSignature = "%%Invocation:".getBytes(StandardCharsets.UTF_8);
|
final byte[] ghostscriptSignature = "%%Invocation:".getBytes(StandardCharsets.UTF_8);
|
||||||
final byte[] cibpdfbrewerSignature = "CIB pdf brewer".getBytes(StandardCharsets.UTF_8);
|
final byte[] cibpdfbrewerSignature = "CIB pdf brewer".getBytes(StandardCharsets.UTF_8);
|
||||||
|
final byte[] lexofficeSignature = "lexoffice".getBytes(StandardCharsets.UTF_8);
|
||||||
|
|
||||||
if (ByteArraySearcher.contains(fileContents, symtraxSignature)) {
|
if (ByteArraySearcher.contains(fileContents, symtraxSignature)) {
|
||||||
Signature = "Symtrax";
|
Signature = "Symtrax";
|
||||||
@@ -282,6 +285,8 @@ public class PDFValidator extends Validator {
|
|||||||
Signature = "Ghostscript";
|
Signature = "Ghostscript";
|
||||||
} else if (ByteArraySearcher.contains(fileContents, cibpdfbrewerSignature)) {
|
} else if (ByteArraySearcher.contains(fileContents, cibpdfbrewerSignature)) {
|
||||||
Signature = "CIB pdf brewer";
|
Signature = "CIB pdf brewer";
|
||||||
|
} else if (ByteArraySearcher.contains(fileContents, lexofficeSignature)) {
|
||||||
|
Signature = "Lexware office";
|
||||||
}
|
}
|
||||||
|
|
||||||
context.setSignature(Signature);
|
context.setSignature(Signature);
|
||||||
|
|||||||
@@ -135,6 +135,22 @@ public class ValidationContext {
|
|||||||
return String.join(",", errorcodes);
|
return String.join(",", errorcodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***
|
||||||
|
*
|
||||||
|
* @return the unique error IDs as comma separated string
|
||||||
|
*/
|
||||||
|
public String getCSVIDResult() {
|
||||||
|
final ArrayList<String> errorIDs = new ArrayList<>();
|
||||||
|
for (final ValidationResultItem validationResultItem : results) {
|
||||||
|
if (!validationResultItem.getID().isEmpty()) {
|
||||||
|
final String errorID=validationResultItem.getID();
|
||||||
|
errorIDs.add(errorID);
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return String.join(",", errorIDs);
|
||||||
|
}
|
||||||
|
|
||||||
public void setInvalid() {
|
public void setInvalid() {
|
||||||
isValid = false;
|
isValid = false;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ public class ValidationResultItem {
|
|||||||
|
|
||||||
protected String message, location=null;
|
protected String message, location=null;
|
||||||
protected int section =-1;
|
protected int section =-1;
|
||||||
|
protected String id =""; // e.g. "FX-SCH-A-000026"
|
||||||
|
|
||||||
|
|
||||||
private ESeverity severity=ESeverity.error;
|
private ESeverity severity=ESeverity.error;
|
||||||
@@ -103,6 +104,15 @@ public class ValidationResultItem {
|
|||||||
return severity;
|
return severity;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public ValidationResultItem setID(String id) {
|
||||||
|
this.id=id;
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getID() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
public int getSection() {
|
public int getSection() {
|
||||||
return section;
|
return section;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
package org.mustangproject.validator;
|
package org.mustangproject.validator;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
@@ -69,15 +70,13 @@ public class XMLValidator extends Validator {
|
|||||||
final ValidationResultItem vri = new ValidationResultItem(ESeverity.exception, e.getMessage()).setSection(9)
|
final ValidationResultItem vri = new ValidationResultItem(ESeverity.exception, e.getMessage()).setSection(9)
|
||||||
.setPart(EPart.fx);
|
.setPart(EPart.fx);
|
||||||
try (final StringWriter sw = new StringWriter();
|
try (final StringWriter sw = new StringWriter();
|
||||||
final PrintWriter pw = new PrintWriter(sw))
|
final PrintWriter pw = new PrintWriter(sw)) {
|
||||||
{
|
e.printStackTrace(pw);
|
||||||
e.printStackTrace(pw);
|
vri.setStacktrace(sw.toString());
|
||||||
vri.setStacktrace(sw.toString());
|
context.addResultItem(vri);
|
||||||
context.addResultItem(vri);
|
} catch (IOException ex) {
|
||||||
|
throw new UncheckedIOException(ex);
|
||||||
}
|
}
|
||||||
catch (IOException ex) {
|
|
||||||
throw new UncheckedIOException (ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -125,9 +124,9 @@ public class XMLValidator extends Validator {
|
|||||||
|
|
||||||
if (zfXML.isEmpty()) {
|
if (zfXML.isEmpty()) {
|
||||||
final ValidationResultItem res = new ValidationResultItem(ESeverity.exception,
|
final ValidationResultItem res = new ValidationResultItem(ESeverity.exception,
|
||||||
"XML data not found in " + filename
|
"XML data not found in " + filename
|
||||||
+ ": did you specify a pdf or xml file and does the xml file contain an embedded XML file?")
|
+ ": did you specify a pdf or xml file and does the xml file contain an embedded XML file?")
|
||||||
.setSection(3);
|
.setSection(3);
|
||||||
context.addResultItem(res);
|
context.addResultItem(res);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -170,7 +169,7 @@ public class XMLValidator extends Validator {
|
|||||||
// Create XPath object
|
// Create XPath object
|
||||||
final XPath xpath = xpathFactory.newXPath();
|
final XPath xpath = xpathFactory.newXPath();
|
||||||
final XPathExpression expr = xpath.compile(
|
final XPathExpression expr = xpath.compile(
|
||||||
"(//*[local-name()=\"GuidelineSpecifiedDocumentContextParameter\"]/*[local-name()=\"ID\"])/text()|//*[local-name()=\"CustomizationID\"]/text()");
|
"(//*[local-name()=\"GuidelineSpecifiedDocumentContextParameter\"]/*[local-name()=\"ID\"])/text()|//*[local-name()=\"CustomizationID\"]/text()");
|
||||||
// evaluate expression result on XML document
|
// evaluate expression result on XML document
|
||||||
ndList = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
|
ndList = (NodeList) expr.evaluate(doc, XPathConstants.NODESET);
|
||||||
|
|
||||||
@@ -190,8 +189,8 @@ public class XMLValidator extends Validator {
|
|||||||
boolean isEN16931 = false;
|
boolean isEN16931 = false;
|
||||||
boolean isExtended = false;
|
boolean isExtended = false;
|
||||||
boolean isXRechnung = false;
|
boolean isXRechnung = false;
|
||||||
String currentZFVersionDir = "ZF_230";
|
String currentZFVersionDir = "ZF_232";
|
||||||
int mainSchematronSectionErrorTypeCode=4;
|
int mainSchematronSectionErrorTypeCode = 4;
|
||||||
String xsltFilename = null;
|
String xsltFilename = null;
|
||||||
// urn:ferd:CrossIndustryDocument:invoice:1p0:extended,
|
// urn:ferd:CrossIndustryDocument:invoice:1p0:extended,
|
||||||
// urn:ferd:CrossIndustryDocument:invoice:1p0:comfort,
|
// urn:ferd:CrossIndustryDocument:invoice:1p0:comfort,
|
||||||
@@ -224,7 +223,7 @@ public class XMLValidator extends Validator {
|
|||||||
isBasic = false;// basicwl also contains the string basic...
|
isBasic = false;// basicwl also contains the string basic...
|
||||||
}
|
}
|
||||||
isEN16931 = matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017:compliant:factur-x.eu:1p0:en16931")
|
isEN16931 = matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017:compliant:factur-x.eu:1p0:en16931")
|
||||||
|| matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017");
|
|| matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017");
|
||||||
|
|
||||||
isExtended = context.getProfile().contains("extended");
|
isExtended = context.getProfile().contains("extended");
|
||||||
isXRechnung = context.getProfile().contains("xrechnung");
|
isXRechnung = context.getProfile().contains("xrechnung");
|
||||||
@@ -269,16 +268,16 @@ public class XMLValidator extends Validator {
|
|||||||
// saxon java net.sf.saxon.Transform -o tcdl2.0.tsdtf.sch.tmp.xsl -s
|
// saxon java net.sf.saxon.Transform -o tcdl2.0.tsdtf.sch.tmp.xsl -s
|
||||||
// tcdl2.0.tsdtf.sch iso_svrl.xsl
|
// tcdl2.0.tsdtf.sch iso_svrl.xsl
|
||||||
|
|
||||||
} else if (root.getLocalName().equalsIgnoreCase("Invoice") || root.getLocalName().equalsIgnoreCase("CreditNote") ) {
|
} else if (root.getLocalName().equalsIgnoreCase("Invoice") || root.getLocalName().equalsIgnoreCase("CreditNote")) {
|
||||||
context.setGeneration("2");
|
context.setGeneration("2");
|
||||||
context.setFormat("UBL");
|
context.setFormat("UBL");
|
||||||
isXRechnung = context.getProfile().contains("xrechnung");
|
isXRechnung = context.getProfile().contains("xrechnung");
|
||||||
// UBL
|
// UBL
|
||||||
LOGGER.debug("UBL");
|
LOGGER.debug("UBL");
|
||||||
validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "UBL_21/maindoc/UBL-"+root.getLocalName()+"-2.1.xsd", 18, EPart.fx);
|
validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "UBL_21/maindoc/UBL-" + root.getLocalName() + "-2.1.xsd", 18, EPart.fx);
|
||||||
xsltFilename = "/xslt/en16931schematron/EN16931-UBL-validation.xslt";
|
xsltFilename = "/xslt/en16931schematron/EN16931-UBL-validation.xslt";
|
||||||
|
|
||||||
mainSchematronSectionErrorTypeCode=24;
|
mainSchematronSectionErrorTypeCode = 24;
|
||||||
|
|
||||||
if (isXRechnung) {
|
if (isXRechnung) {
|
||||||
validateSchematron(zfXML, xsltFilename, 24, ESeverity.error);
|
validateSchematron(zfXML, xsltFilename, 24, ESeverity.error);
|
||||||
@@ -287,14 +286,14 @@ public class XMLValidator extends Validator {
|
|||||||
XRechnung is a EN16931 subset so the validation vis a vis FACTUR-X_EN16931.xslt=schematron also has to pass
|
XRechnung is a EN16931 subset so the validation vis a vis FACTUR-X_EN16931.xslt=schematron also has to pass
|
||||||
* */
|
* */
|
||||||
//validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "ZF_211/EN16931/FACTUR-X_EN16931.xsd", 18, EPart.fx);
|
//validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "ZF_211/EN16931/FACTUR-X_EN16931.xsd", 18, EPart.fx);
|
||||||
String xrVersion=context.getProfile().substring(context.getProfile().length()-3).replace(".","");
|
String xrVersion = context.getProfile().substring(context.getProfile().length() - 3).replace(".", "");
|
||||||
if (!xrVersion.equals("12")&&!xrVersion.equals("20")&&!xrVersion.equals("21")&&!xrVersion.equals("22")&&!xrVersion.equals("23")&&!xrVersion.equals("30")) {
|
if (!xrVersion.equals("12") && !xrVersion.equals("20") && !xrVersion.equals("21") && !xrVersion.equals("22") && !xrVersion.equals("23") && !xrVersion.equals("30")) {
|
||||||
throw new Exception("Unsupported XR version");
|
throw new Exception("Unsupported XR version");
|
||||||
}
|
}
|
||||||
LOGGER.debug("is XRechnung v"+xrVersion);
|
LOGGER.debug("is XRechnung v" + xrVersion);
|
||||||
xsltFilename = "/xslt/XR_"+xrVersion+"/XRechnung-UBL-validation.xslt";
|
xsltFilename = "/xslt/XR_" + xrVersion + "/XRechnung-UBL-validation.xslt";
|
||||||
XrechnungSeverity = ESeverity.error;
|
XrechnungSeverity = ESeverity.error;
|
||||||
mainSchematronSectionErrorTypeCode=27;
|
mainSchematronSectionErrorTypeCode = 27;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,58 +301,58 @@ public class XMLValidator extends Validator {
|
|||||||
context.setGeneration("1");
|
context.setGeneration("1");
|
||||||
//
|
//
|
||||||
if ((!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:basic"))
|
if ((!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:basic"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:comfort"))
|
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:comfort"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:extended"))) {
|
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:extended"))) {
|
||||||
context.addResultItem(new ValidationResultItem(ESeverity.error, "Unsupported profile type")
|
context.addResultItem(new ValidationResultItem(ESeverity.error, "Unsupported profile type")
|
||||||
.setSection(25).setPart(EPart.fx));
|
.setSection(25).setPart(EPart.fx));
|
||||||
}
|
}
|
||||||
validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "ZF_10/ZUGFeRD1p0.xsd", 18, EPart.fx);
|
validateSchema(zfXML.getBytes(StandardCharsets.UTF_8), "ZF_10/ZUGFeRD1p0.xsd", 18, EPart.fx);
|
||||||
|
|
||||||
xsltFilename = "/xslt/ZUGFeRD_1p0.xslt";
|
xsltFilename = "/xslt/ZUGFeRD_1p0.xslt";
|
||||||
} else { // unknown document root
|
} else { // unknown document root
|
||||||
context.addResultItem(new ValidationResultItem(ESeverity.fatal, "Unsupported root element")
|
context.addResultItem(new ValidationResultItem(ESeverity.fatal, "Unsupported root element")
|
||||||
.setSection(3).setPart(EPart.fx));
|
.setSection(3).setPart(EPart.fx));
|
||||||
}
|
}
|
||||||
if (context.getFormat().equals("CII")) {
|
if (context.getFormat().equals("CII")) {
|
||||||
|
|
||||||
if (context.getGeneration().equals("2")) {
|
if (context.getGeneration().equals("2")) {
|
||||||
if ((!matchesURI(context.getProfile(), "urn:factur-x.eu:1p0:minimum"))
|
if ((!matchesURI(context.getProfile(), "urn:factur-x.eu:1p0:minimum"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:zugferd.de:2p0:minimum"))
|
&& (!matchesURI(context.getProfile(), "urn:zugferd.de:2p0:minimum"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:factur-x.eu:1p0:basicwl"))
|
&& (!matchesURI(context.getProfile(), "urn:factur-x.eu:1p0:basicwl"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:zugferd.de:2p0:basicwl"))
|
&& (!matchesURI(context.getProfile(), "urn:zugferd.de:2p0:basicwl"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"))
|
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#compliant#urn:zugferd.de:2p0:basic"))
|
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#compliant#urn:zugferd.de:2p0:basic"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017"))
|
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended"))
|
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#conformant#urn:zugferd.de:2p0:extended"))) {
|
&& (!matchesURI(context.getProfile(), "urn:cen.eu:en16931:2017#conformant#urn:zugferd.de:2p0:extended"))) {
|
||||||
context.addResultItem(
|
context.addResultItem(
|
||||||
new ValidationResultItem(ESeverity.error, "Unsupported profile type " + context.getProfile())
|
new ValidationResultItem(ESeverity.error, "Unsupported profile type " + context.getProfile())
|
||||||
.setSection(25).setPart(EPart.fx));
|
.setSection(25).setPart(EPart.fx));
|
||||||
|
|
||||||
}
|
}
|
||||||
} else /** v1 */ {
|
} else /** v1 */ {
|
||||||
if (isOrderX) {
|
if (isOrderX) {
|
||||||
//order-x 1.0
|
//order-x 1.0
|
||||||
if ((!matchesURI(context.getProfile(), "urn:order-x.eu:1p0:basic"))
|
if ((!matchesURI(context.getProfile(), "urn:order-x.eu:1p0:basic"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:order-x.eu:1p0:comfort"))
|
&& (!matchesURI(context.getProfile(), "urn:order-x.eu:1p0:comfort"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:order-x.eu:1p0:extended"))) {
|
&& (!matchesURI(context.getProfile(), "urn:order-x.eu:1p0:extended"))) {
|
||||||
//zf 1.0
|
//zf 1.0
|
||||||
context.addResultItem(new ValidationResultItem(ESeverity.error, "Unsupported profile type")
|
context.addResultItem(new ValidationResultItem(ESeverity.error, "Unsupported profile type")
|
||||||
.setSection(25).setPart(EPart.fx));
|
.setSection(25).setPart(EPart.fx));
|
||||||
|
|
||||||
}
|
}
|
||||||
} else if ((!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:basic"))
|
} else if ((!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:basic"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:comfort"))
|
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:comfort"))
|
||||||
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:extended"))) {
|
&& (!matchesURI(context.getProfile(), "urn:ferd:CrossIndustryDocument:invoice:1p0:extended"))) {
|
||||||
//zf 1.0
|
//zf 1.0
|
||||||
context.addResultItem(new ValidationResultItem(ESeverity.error, "Unsupported profile type")
|
context.addResultItem(new ValidationResultItem(ESeverity.error, "Unsupported profile type")
|
||||||
.setSection(25).setPart(EPart.fx));
|
.setSection(25).setPart(EPart.fx));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xsltFilename!=null) {
|
if (xsltFilename != null) {
|
||||||
// main schematron validation
|
// main schematron validation
|
||||||
validateSchematron(zfXML, xsltFilename, mainSchematronSectionErrorTypeCode, ESeverity.error);
|
validateSchematron(zfXML, xsltFilename, mainSchematronSectionErrorTypeCode, ESeverity.error);
|
||||||
|
|
||||||
@@ -362,7 +361,7 @@ public class XMLValidator extends Validator {
|
|||||||
if (context.getFormat().equals("CII")) {
|
if (context.getFormat().equals("CII")) {
|
||||||
|
|
||||||
if (context.getGeneration().equals("2")
|
if (context.getGeneration().equals("2")
|
||||||
&& (isBasic || isEN16931 || isXRechnung)) {
|
&& (isBasic || isEN16931 || isXRechnung)) {
|
||||||
//additionally validate against CEN
|
//additionally validate against CEN
|
||||||
validateSchematron(zfXML, "/xslt/en16931schematron/EN16931-CII-validation.xslt", 24, ESeverity.error);
|
validateSchematron(zfXML, "/xslt/en16931schematron/EN16931-CII-validation.xslt", 24, ESeverity.error);
|
||||||
if (!disableNotices || XrechnungSeverity != ESeverity.notice) {
|
if (!disableNotices || XrechnungSeverity != ESeverity.notice) {
|
||||||
@@ -376,7 +375,7 @@ public class XMLValidator extends Validator {
|
|||||||
throw er;
|
throw er;
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
final ValidationResultItem vri = new ValidationResultItem(ESeverity.exception, e.getMessage()).setSection(22)
|
final ValidationResultItem vri = new ValidationResultItem(ESeverity.exception, e.getMessage()).setSection(22)
|
||||||
.setPart(EPart.fx);
|
.setPart(EPart.fx);
|
||||||
final StringWriter sw = new StringWriter();
|
final StringWriter sw = new StringWriter();
|
||||||
final PrintWriter pw = new PrintWriter(sw);
|
final PrintWriter pw = new PrintWriter(sw);
|
||||||
e.printStackTrace(pw);
|
e.printStackTrace(pw);
|
||||||
@@ -388,8 +387,8 @@ public class XMLValidator extends Validator {
|
|||||||
final long endTime = Calendar.getInstance().getTimeInMillis();
|
final long endTime = Calendar.getInstance().getTimeInMillis();
|
||||||
|
|
||||||
context.addCustomXML("<info><version>" + ((context.getGeneration() != null) ? context.getGeneration() : "invalid")
|
context.addCustomXML("<info><version>" + ((context.getGeneration() != null) ? context.getGeneration() : "invalid")
|
||||||
+ "</version><profile>" + ((context.getProfile() != null) ? context.getProfile() : "invalid") +
|
+ "</version><profile>" + ((context.getProfile() != null) ? context.getProfile() : "invalid") +
|
||||||
"</profile><validator version=\"" + XMLValidator.class.getPackage().getImplementationVersion() + "\"></validator><rules><fired>" + firedRules + "</fired><failed>" + failedRules + "</failed></rules>" + "<duration unit=\"ms\">" + (endTime - startXMLTime) + "</duration></info>");
|
"</profile><validator version=\"" + XMLValidator.class.getPackage().getImplementationVersion() + "\"></validator><rules><fired>" + firedRules + "</fired><failed>" + failedRules + "</failed></rules>" + "<duration unit=\"ms\">" + (endTime - startXMLTime) + "</duration></info>");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -424,11 +423,6 @@ public class XMLValidator extends Validator {
|
|||||||
*/
|
*/
|
||||||
public void validateSchematron(String xml, String xsltFilename, int section, ESeverity defaultSeverity) throws IrrecoverableValidationError {
|
public void validateSchematron(String xml, String xsltFilename, int section, ESeverity defaultSeverity) throws IrrecoverableValidationError {
|
||||||
ISchematronResource aResSCH = null;
|
ISchematronResource aResSCH = null;
|
||||||
ESeverity severity=defaultSeverity;
|
|
||||||
if (defaultSeverity!=ESeverity.notice) {
|
|
||||||
severity=ESeverity.error;
|
|
||||||
}
|
|
||||||
|
|
||||||
aResSCH = SchematronResourceXSLT.fromClassPath(xsltFilename);
|
aResSCH = SchematronResourceXSLT.fromClassPath(xsltFilename);
|
||||||
|
|
||||||
if (aResSCH != null) {
|
if (aResSCH != null) {
|
||||||
@@ -439,7 +433,7 @@ public class XMLValidator extends Validator {
|
|||||||
final SchematronOutputType sout;
|
final SchematronOutputType sout;
|
||||||
try {
|
try {
|
||||||
sout = aResSCH
|
sout = aResSCH
|
||||||
.applySchematronValidationToSVRL(new StreamSource(new StringReader(xml)));
|
.applySchematronValidationToSVRL(new StreamSource(new StringReader(xml)));
|
||||||
} catch (final Exception e) {
|
} catch (final Exception e) {
|
||||||
throw new IrrecoverableValidationError(e.getMessage());
|
throw new IrrecoverableValidationError(e.getMessage());
|
||||||
}
|
}
|
||||||
@@ -453,6 +447,7 @@ public class XMLValidator extends Validator {
|
|||||||
|
|
||||||
String thisFailText = "";
|
String thisFailText = "";
|
||||||
String thisFailID = "";
|
String thisFailID = "";
|
||||||
|
String thisFailIDStr = "";
|
||||||
String thisFailTest = "";
|
String thisFailTest = "";
|
||||||
String thisFailLocation = "";
|
String thisFailLocation = "";
|
||||||
if (failedAsserts.getLength() > 0) {
|
if (failedAsserts.getLength() > 0) {
|
||||||
@@ -461,7 +456,8 @@ public class XMLValidator extends Validator {
|
|||||||
//nodes.item(i).getTextContent())) {
|
//nodes.item(i).getTextContent())) {
|
||||||
Node currentFailNode = failedAsserts.item(nodeIndex);
|
Node currentFailNode = failedAsserts.item(nodeIndex);
|
||||||
if (currentFailNode.getAttributes().getNamedItem("id") != null) {
|
if (currentFailNode.getAttributes().getNamedItem("id") != null) {
|
||||||
thisFailID = " [ID " + currentFailNode.getAttributes().getNamedItem("id").getNodeValue() + "]";
|
thisFailID = currentFailNode.getAttributes().getNamedItem("id").getNodeValue();
|
||||||
|
thisFailIDStr = " [ID " + thisFailID + "]";
|
||||||
}
|
}
|
||||||
if (currentFailNode.getAttributes().getNamedItem("test") != null) {
|
if (currentFailNode.getAttributes().getNamedItem("test") != null) {
|
||||||
thisFailTest = currentFailNode.getAttributes().getNamedItem("test").getNodeValue();
|
thisFailTest = currentFailNode.getAttributes().getNamedItem("test").getNodeValue();
|
||||||
@@ -470,14 +466,15 @@ public class XMLValidator extends Validator {
|
|||||||
thisFailLocation = currentFailNode.getAttributes().getNamedItem("location").getNodeValue();
|
thisFailLocation = currentFailNode.getAttributes().getNamedItem("location").getNodeValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentFailNode.getAttributes().getNamedItem("flag") != null) {
|
ESeverity severity;
|
||||||
|
if (defaultSeverity == ESeverity.notice) {
|
||||||
|
severity = defaultSeverity;
|
||||||
|
} else if (currentFailNode.getAttributes().getNamedItem("flag") != null
|
||||||
|
&& currentFailNode.getAttributes().getNamedItem("flag").getNodeValue().equals("warning")) {
|
||||||
// the XR issues warnings with flag=warning
|
// the XR issues warnings with flag=warning
|
||||||
if (currentFailNode.getAttributes().getNamedItem("flag").getNodeValue().equals("warning")) {
|
severity = ESeverity.warning;
|
||||||
if (defaultSeverity!=ESeverity.notice) {
|
} else {
|
||||||
severity=ESeverity.warning;
|
severity = ESeverity.error;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
NodeList failChilds = currentFailNode.getChildNodes();
|
NodeList failChilds = currentFailNode.getChildNodes();
|
||||||
@@ -494,9 +491,9 @@ public class XMLValidator extends Validator {
|
|||||||
|
|
||||||
LOGGER.info("FailedAssert ", thisFailText);
|
LOGGER.info("FailedAssert ", thisFailText);
|
||||||
|
|
||||||
context.addResultItem(new ValidationResultItem(severity, thisFailText + thisFailID + " from " + xsltFilename + ")")
|
context.addResultItem(new ValidationResultItem(severity, thisFailText + thisFailIDStr + " from " + xsltFilename + ")")
|
||||||
.setLocation(thisFailLocation).setCriterion(thisFailTest).setSection(section)
|
.setLocation(thisFailLocation).setCriterion(thisFailTest).setSection(section).setID(thisFailID)
|
||||||
.setPart(EPart.fx));
|
.setPart(EPart.fx));
|
||||||
failedRules++;
|
failedRules++;
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -527,7 +524,7 @@ public class XMLValidator extends Validator {
|
|||||||
|
|
||||||
if (firedRules == 0) {
|
if (firedRules == 0) {
|
||||||
context.addResultItem(new ValidationResultItem(ESeverity.error, "No rules matched, XML to minimal?").setSection(26)
|
context.addResultItem(new ValidationResultItem(ESeverity.error, "No rules matched, XML to minimal?").setSection(26)
|
||||||
.setPart(EPart.fx));
|
.setPart(EPart.fx));
|
||||||
|
|
||||||
}
|
}
|
||||||
// for (String currentString : sout.getText()) {
|
// for (String currentString : sout.getText()) {
|
||||||
|
|||||||
@@ -318,7 +318,7 @@ public class ZUGFeRDValidator {
|
|||||||
LOGGER.info("Parsed PDF:" + pdfResult + " XML:" + (xmlValidity ? "valid" : "invalid")
|
LOGGER.info("Parsed PDF:" + pdfResult + " XML:" + (xmlValidity ? "valid" : "invalid")
|
||||||
+ " Signature:" + Signature + " Checksum:" + sha1Checksum + " Profile:" + context.getProfile()
|
+ " Signature:" + Signature + " Checksum:" + sha1Checksum + " Profile:" + context.getProfile()
|
||||||
+ " Version:" + context.getGeneration() + " Took:" + duration + "ms Errors:[" + context.getCSVResult()
|
+ " Version:" + context.getGeneration() + " Took:" + duration + "ms Errors:[" + context.getCSVResult()
|
||||||
+ "] " + toBeAppended);
|
+ "] ErrorIDs: [" + context.getCSVIDResult() + "]" + toBeAppended);
|
||||||
wasCompletelyValid = ((pdfValidity) && (xmlValidity));
|
wasCompletelyValid = ((pdfValidity) && (xmlValidity));
|
||||||
return sw.toString();
|
return sw.toString();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@
|
|||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.0.07_BASICWL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.07.2_BASICWL_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.0.07_BASICWL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.07.2_BASICWL_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
||||||
<xs:complexType name="CreditorFinancialAccountType">
|
<xs:complexType name="CreditorFinancialAccountType">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.0.07_BASIC_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.07.2_BASIC_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.0.07_BASIC_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.07.2_BASIC_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
||||||
<xs:complexType name="CreditorFinancialAccountType">
|
<xs:complexType name="CreditorFinancialAccountType">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.0.07_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.07.2_EN16931_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
||||||
<xs:complexType name="CreditorFinancialAccountType">
|
<xs:complexType name="CreditorFinancialAccountType">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
<xs:element name="IBANID" type="udt:IDType" minOccurs="0"/>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.0.07_EXTENDED_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.07.2_EXTENDED_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.0.07_EXTENDED_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.07.2_EXTENDED_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
||||||
<xs:complexType name="AdvancePaymentType">
|
<xs:complexType name="AdvancePaymentType">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="PaidAmount" type="udt:AmountType"/>
|
<xs:element name="PaidAmount" type="udt:AmountType"/>
|
||||||
@@ -5,8 +5,8 @@
|
|||||||
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
xmlns:udt="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100"
|
||||||
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
targetNamespace="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"
|
||||||
elementFormDefault="qualified">
|
elementFormDefault="qualified">
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.0.07_MINIMUM_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:QualifiedDataType:100" schemaLocation="Factur-X_1.07.2_MINIMUM_urn_un_unece_uncefact_data_standard_QualifiedDataType_100.xsd"/>
|
||||||
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.0.07_MINIMUM_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
<xs:import namespace="urn:un:unece:uncefact:data:standard:UnqualifiedDataType:100" schemaLocation="Factur-X_1.07.2_MINIMUM_urn_un_unece_uncefact_data_standard_UnqualifiedDataType_100.xsd"/>
|
||||||
<xs:complexType name="DocumentContextParameterType">
|
<xs:complexType name="DocumentContextParameterType">
|
||||||
<xs:sequence>
|
<xs:sequence>
|
||||||
<xs:element name="ID" type="udt:IDType"/>
|
<xs:element name="ID" type="udt:IDType"/>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
||||||
<title>Schema for Factur-X; 1.0.07; Accounting, BASIC without Lines</title>
|
<title>Schema for Factur-X; 1.07.2; Accounting, BASIC without Lines</title>
|
||||||
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
||||||
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
||||||
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
||||||
@@ -164,7 +164,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -236,7 +236,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -322,12 +322,16 @@
|
|||||||
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayeePartyCreditorFinancialAccount">
|
||||||
|
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
|
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
||||||
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
||||||
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
|
||||||
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<codedb>
|
<codedb>
|
||||||
<cl id="1">
|
<cl id="1">
|
||||||
<enumeration value="urn:factur-x.eu:1p0:basicwl"/>
|
<enumeration value="urn:factur-x.eu:1p0:basicwl"/>
|
||||||
|
<enumeration value="urn:zugferd.de:2p0:basicwl"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="2">
|
<cl id="2">
|
||||||
<enumeration value="71"/>
|
<enumeration value="71"/>
|
||||||
@@ -692,6 +693,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="6">
|
<cl id="6">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -919,6 +928,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="7">
|
<cl id="7">
|
||||||
<enumeration value="AD"/>
|
<enumeration value="AD"/>
|
||||||
@@ -1189,6 +1206,7 @@
|
|||||||
<enumeration value="0147"/>
|
<enumeration value="0147"/>
|
||||||
<enumeration value="0151"/>
|
<enumeration value="0151"/>
|
||||||
<enumeration value="0170"/>
|
<enumeration value="0170"/>
|
||||||
|
<enumeration value="0177"/>
|
||||||
<enumeration value="0183"/>
|
<enumeration value="0183"/>
|
||||||
<enumeration value="0184"/>
|
<enumeration value="0184"/>
|
||||||
<enumeration value="0188"/>
|
<enumeration value="0188"/>
|
||||||
@@ -1220,6 +1238,7 @@
|
|||||||
<enumeration value="0221"/>
|
<enumeration value="0221"/>
|
||||||
<enumeration value="0225"/>
|
<enumeration value="0225"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
<enumeration value="9901"/>
|
<enumeration value="9901"/>
|
||||||
<enumeration value="9910"/>
|
<enumeration value="9910"/>
|
||||||
<enumeration value="9913"/>
|
<enumeration value="9913"/>
|
||||||
@@ -1336,7 +1355,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -1429,6 +1447,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -1453,6 +1472,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="12">
|
<cl id="12">
|
||||||
@@ -1588,6 +1608,8 @@
|
|||||||
<enumeration value="VATEX-EU-143-1J"/>
|
<enumeration value="VATEX-EU-143-1J"/>
|
||||||
<enumeration value="VATEX-EU-143-1K"/>
|
<enumeration value="VATEX-EU-143-1K"/>
|
||||||
<enumeration value="VATEX-EU-143-1L"/>
|
<enumeration value="VATEX-EU-143-1L"/>
|
||||||
|
<enumeration value="VATEX-EU-144"/>
|
||||||
|
<enumeration value="VATEX-EU-146-1E"/>
|
||||||
<enumeration value="VATEX-EU-148"/>
|
<enumeration value="VATEX-EU-148"/>
|
||||||
<enumeration value="VATEX-EU-148-A"/>
|
<enumeration value="VATEX-EU-148-A"/>
|
||||||
<enumeration value="VATEX-EU-148-B"/>
|
<enumeration value="VATEX-EU-148-B"/>
|
||||||
@@ -1603,6 +1625,7 @@
|
|||||||
<enumeration value="VATEX-EU-151-1C"/>
|
<enumeration value="VATEX-EU-151-1C"/>
|
||||||
<enumeration value="VATEX-EU-151-1D"/>
|
<enumeration value="VATEX-EU-151-1D"/>
|
||||||
<enumeration value="VATEX-EU-151-1E"/>
|
<enumeration value="VATEX-EU-151-1E"/>
|
||||||
|
<enumeration value="VATEX-EU-159"/>
|
||||||
<enumeration value="VATEX-EU-309"/>
|
<enumeration value="VATEX-EU-309"/>
|
||||||
<enumeration value="VATEX-EU-79-C"/>
|
<enumeration value="VATEX-EU-79-C"/>
|
||||||
<enumeration value="VATEX-EU-AE"/>
|
<enumeration value="VATEX-EU-AE"/>
|
||||||
@@ -1884,7 +1907,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -1977,6 +1999,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -2001,6 +2024,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="20">
|
<cl id="20">
|
||||||
@@ -2065,7 +2089,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -2158,6 +2181,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -2182,6 +2206,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="21">
|
<cl id="21">
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
||||||
<title>Schema for Factur-X; 1.0.07; EN16931-COMPLIANT-BASIC</title>
|
<title>Schema for Factur-X; 1.07.2; EN16931-COMPLIANT-BASIC</title>
|
||||||
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
||||||
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
||||||
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
||||||
@@ -118,7 +118,7 @@
|
|||||||
[BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier.</assert>
|
[BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier.</assert>
|
||||||
<assert id="FX-SCH-A-000210" test="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)">
|
<assert id="FX-SCH-A-000210" test="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)">
|
||||||
[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).</assert>
|
[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).</assert>
|
||||||
<assert id="FX-SCH-A-000211" test="string-length(substring-after(ram:SpecifiedTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
<assert id="FX-SCH-A-000211" test="string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
||||||
[BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.</assert>
|
[BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -246,7 +246,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -318,7 +318,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -406,12 +406,16 @@
|
|||||||
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayeePartyCreditorFinancialAccount">
|
||||||
|
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
|
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
||||||
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
||||||
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
|
||||||
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
@@ -546,7 +550,7 @@
|
|||||||
<rule context="//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000245" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000245" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000246" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000246" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<codedb>
|
<codedb>
|
||||||
<cl id="1">
|
<cl id="1">
|
||||||
<enumeration value="urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"/>
|
<enumeration value="urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"/>
|
||||||
|
<enumeration value="urn:cen.eu:en16931:2017#compliant#urn:zugferd.de:2p0:basic"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="2">
|
<cl id="2">
|
||||||
<enumeration value="71"/>
|
<enumeration value="71"/>
|
||||||
@@ -692,6 +693,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="6">
|
<cl id="6">
|
||||||
<enumeration value="10"/>
|
<enumeration value="10"/>
|
||||||
@@ -3298,6 +3307,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="12">
|
<cl id="12">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -3525,6 +3542,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="13">
|
<cl id="13">
|
||||||
<enumeration value="AD"/>
|
<enumeration value="AD"/>
|
||||||
@@ -3795,6 +3820,7 @@
|
|||||||
<enumeration value="0147"/>
|
<enumeration value="0147"/>
|
||||||
<enumeration value="0151"/>
|
<enumeration value="0151"/>
|
||||||
<enumeration value="0170"/>
|
<enumeration value="0170"/>
|
||||||
|
<enumeration value="0177"/>
|
||||||
<enumeration value="0183"/>
|
<enumeration value="0183"/>
|
||||||
<enumeration value="0184"/>
|
<enumeration value="0184"/>
|
||||||
<enumeration value="0188"/>
|
<enumeration value="0188"/>
|
||||||
@@ -3826,6 +3852,7 @@
|
|||||||
<enumeration value="0221"/>
|
<enumeration value="0221"/>
|
||||||
<enumeration value="0225"/>
|
<enumeration value="0225"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
<enumeration value="9901"/>
|
<enumeration value="9901"/>
|
||||||
<enumeration value="9910"/>
|
<enumeration value="9910"/>
|
||||||
<enumeration value="9913"/>
|
<enumeration value="9913"/>
|
||||||
@@ -3942,7 +3969,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -4035,6 +4061,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -4059,6 +4086,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="18">
|
<cl id="18">
|
||||||
@@ -4180,6 +4208,8 @@
|
|||||||
<enumeration value="VATEX-EU-143-1J"/>
|
<enumeration value="VATEX-EU-143-1J"/>
|
||||||
<enumeration value="VATEX-EU-143-1K"/>
|
<enumeration value="VATEX-EU-143-1K"/>
|
||||||
<enumeration value="VATEX-EU-143-1L"/>
|
<enumeration value="VATEX-EU-143-1L"/>
|
||||||
|
<enumeration value="VATEX-EU-144"/>
|
||||||
|
<enumeration value="VATEX-EU-146-1E"/>
|
||||||
<enumeration value="VATEX-EU-148"/>
|
<enumeration value="VATEX-EU-148"/>
|
||||||
<enumeration value="VATEX-EU-148-A"/>
|
<enumeration value="VATEX-EU-148-A"/>
|
||||||
<enumeration value="VATEX-EU-148-B"/>
|
<enumeration value="VATEX-EU-148-B"/>
|
||||||
@@ -4195,6 +4225,7 @@
|
|||||||
<enumeration value="VATEX-EU-151-1C"/>
|
<enumeration value="VATEX-EU-151-1C"/>
|
||||||
<enumeration value="VATEX-EU-151-1D"/>
|
<enumeration value="VATEX-EU-151-1D"/>
|
||||||
<enumeration value="VATEX-EU-151-1E"/>
|
<enumeration value="VATEX-EU-151-1E"/>
|
||||||
|
<enumeration value="VATEX-EU-159"/>
|
||||||
<enumeration value="VATEX-EU-309"/>
|
<enumeration value="VATEX-EU-309"/>
|
||||||
<enumeration value="VATEX-EU-79-C"/>
|
<enumeration value="VATEX-EU-79-C"/>
|
||||||
<enumeration value="VATEX-EU-AE"/>
|
<enumeration value="VATEX-EU-AE"/>
|
||||||
@@ -4476,7 +4507,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -4569,6 +4599,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -4593,6 +4624,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="24">
|
<cl id="24">
|
||||||
@@ -4657,7 +4689,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -4750,6 +4781,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -4774,6 +4806,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="25">
|
<cl id="25">
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
||||||
<title>Schema for Factur-X; 1.0.07; EN16931-COMPLIANT (FULLY)</title>
|
<title>Schema for Factur-X; 1.07.2; EN16931-COMPLIANT (FULLY)</title>
|
||||||
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
||||||
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
||||||
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
[BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier.</assert>
|
[BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier.</assert>
|
||||||
<assert id="FX-SCH-A-000210" test="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)">
|
<assert id="FX-SCH-A-000210" test="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)">
|
||||||
[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).</assert>
|
[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).</assert>
|
||||||
<assert id="FX-SCH-A-000211" test="string-length(substring-after(ram:SpecifiedTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
<assert id="FX-SCH-A-000211" test="string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
||||||
[BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.</assert>
|
[BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -258,7 +258,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -330,7 +330,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -418,12 +418,16 @@
|
|||||||
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayeePartyCreditorFinancialAccount">
|
||||||
|
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
|
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
||||||
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
||||||
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
|
||||||
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
@@ -558,7 +562,7 @@
|
|||||||
<rule context="//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000245" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000245" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000246" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000246" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -692,6 +692,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="6">
|
<cl id="6">
|
||||||
<enumeration value="AA"/>
|
<enumeration value="AA"/>
|
||||||
@@ -4561,6 +4569,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="16">
|
<cl id="16">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -4788,6 +4804,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="17">
|
<cl id="17">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -4805,6 +4829,7 @@
|
|||||||
<enumeration value="0147"/>
|
<enumeration value="0147"/>
|
||||||
<enumeration value="0151"/>
|
<enumeration value="0151"/>
|
||||||
<enumeration value="0170"/>
|
<enumeration value="0170"/>
|
||||||
|
<enumeration value="0177"/>
|
||||||
<enumeration value="0183"/>
|
<enumeration value="0183"/>
|
||||||
<enumeration value="0184"/>
|
<enumeration value="0184"/>
|
||||||
<enumeration value="0188"/>
|
<enumeration value="0188"/>
|
||||||
@@ -4836,6 +4861,7 @@
|
|||||||
<enumeration value="0221"/>
|
<enumeration value="0221"/>
|
||||||
<enumeration value="0225"/>
|
<enumeration value="0225"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
<enumeration value="9901"/>
|
<enumeration value="9901"/>
|
||||||
<enumeration value="9910"/>
|
<enumeration value="9910"/>
|
||||||
<enumeration value="9913"/>
|
<enumeration value="9913"/>
|
||||||
@@ -4969,7 +4995,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -5062,6 +5087,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -5086,6 +5112,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="25">
|
<cl id="25">
|
||||||
@@ -5207,6 +5234,8 @@
|
|||||||
<enumeration value="VATEX-EU-143-1J"/>
|
<enumeration value="VATEX-EU-143-1J"/>
|
||||||
<enumeration value="VATEX-EU-143-1K"/>
|
<enumeration value="VATEX-EU-143-1K"/>
|
||||||
<enumeration value="VATEX-EU-143-1L"/>
|
<enumeration value="VATEX-EU-143-1L"/>
|
||||||
|
<enumeration value="VATEX-EU-144"/>
|
||||||
|
<enumeration value="VATEX-EU-146-1E"/>
|
||||||
<enumeration value="VATEX-EU-148"/>
|
<enumeration value="VATEX-EU-148"/>
|
||||||
<enumeration value="VATEX-EU-148-A"/>
|
<enumeration value="VATEX-EU-148-A"/>
|
||||||
<enumeration value="VATEX-EU-148-B"/>
|
<enumeration value="VATEX-EU-148-B"/>
|
||||||
@@ -5222,6 +5251,7 @@
|
|||||||
<enumeration value="VATEX-EU-151-1C"/>
|
<enumeration value="VATEX-EU-151-1C"/>
|
||||||
<enumeration value="VATEX-EU-151-1D"/>
|
<enumeration value="VATEX-EU-151-1D"/>
|
||||||
<enumeration value="VATEX-EU-151-1E"/>
|
<enumeration value="VATEX-EU-151-1E"/>
|
||||||
|
<enumeration value="VATEX-EU-159"/>
|
||||||
<enumeration value="VATEX-EU-309"/>
|
<enumeration value="VATEX-EU-309"/>
|
||||||
<enumeration value="VATEX-EU-79-C"/>
|
<enumeration value="VATEX-EU-79-C"/>
|
||||||
<enumeration value="VATEX-EU-AE"/>
|
<enumeration value="VATEX-EU-AE"/>
|
||||||
@@ -5506,7 +5536,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -5599,6 +5628,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -5623,6 +5653,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="32">
|
<cl id="32">
|
||||||
@@ -5687,7 +5718,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -5780,6 +5810,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -5804,6 +5835,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="33">
|
<cl id="33">
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
||||||
<title>Schema for Factur-X; 1.0.07; EN16931-CONFORMANT-EXTENDED</title>
|
<title>Schema for Factur-X; 1.07.2; EN16931-CONFORMANT-EXTENDED</title>
|
||||||
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
||||||
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
||||||
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
||||||
@@ -102,6 +102,12 @@
|
|||||||
[BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161).</assert>
|
[BR-54]-Each Item attribute (BG-32) shall contain an Item attribute name (BT-160) and an Item attribute value (BT-161).</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="//ram:ApplicableProductCharacteristic/ram:TypeCode">
|
||||||
|
<assert flag="warning" id="FX-SCH-A-000345" test="not(contains(normalize-space(.), ' ')) and contains(' A AAA AAB AAC AAD AAF AAG AAH AAI AAJ AAK AAM AAN AAO AAP AAQ AAR AAS AAT AAU AAV AAW AAX AAY AAZ ABA ABB ABC ABD ABE ABF ABG ABH ABI ABJ ABK ABL ABM ABN ABO ABP ABS ABT ABX ABY ABZ ACA ACE ACG ACN ACP ACS ACV ACW ACX ADR ADS ADT ADU ADV ADW ADX ADY ADZ AEA AEB AEC AED AEE AEF AEG AEH AEI AEJ AEK AEL AEM AEN AEO AEP AEQ AER AES AET AEU AEV AEW AEX AEY AEZ AF AFA AFB AFC AFD AFE AFF AFG AFH AFI AFJ AFK AFL AFM AFN AFO AFP AFQ AFR AFS AFT AFU AFV AFW AFX B BL BMY BMZ BNA BNB BNC BND BNE BNF BNG BNH BNI BNJ BNK BNL BNM BNN BNO BNP BNQ BNR BNS BNT BNU BNV BNW BNX BNY BNZ BR BRA BRB BRC BRD BRE BRF BRG BRH BRI BRJ BRK BRL BRM BRN BRO BRP BRQ BRR BRS BRT BRU BRV BS BSW BSX BSY BSZ BTA BTB BTC BTD BTE BTF BTG BTH BTI BTJ BTK BTL BTM BW CHN CHO CM CT CV CZ D DI DL DN DP DR DS DW E EA F FI FL FN FV GG GW HF HM HT IB ID L LM LN LND M MO MW N OD PRS PTN RA RF RJ RMW RP RUN RY SQ T TC TH TN TT VGM VH VW WA WD WM WU XH XQ XZ YS ZAL ZAS ZB ZBI ZC ZCA ZCB ZCE ZCL ZCO ZCR ZCU ZFE ZFS ZGE ZH ZK ZMG ZMN ZMO ZN ZNA ZNB ZNI ZO ZP ZPB ZS ZSB ZSE ZSI ZSL ZSN ZTA ZTE ZTI ZV ZW ZWA ZZN ZZR ZZZ BEST_BEFORE_DATE COLOR_TEXT COMMISSION DEPOSIT_SYSTEM DEPOSIT_TYPE ENERGY_CLASS EXPIRATION_DATE FEE KIND_OF_ARTICLE MATERIAL METER_LOCATION METER_NUMBER ORGANIC_CONTROL_BODY PACKAGING_MATERIAL PACKAGING_TYPE PROMOTIONAL_VARIANT SEAL_NUMBER SIZE_CODE SIZE_TEXT TRADING_UNIT WASTE_CODE WASTE_FRACTION WEEE_NUMBER ', concat(' ', normalize-space(.), ' '))">
|
||||||
|
[BR-FXEXT-04]-To ensure automated processing of the article attributes without bilateral reconciliation, only values from the code list UNTDED 6313+Factur-X-Extension should be used. </assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="//ram:ApplicableTradeSettlementFinancialCard">
|
<rule context="//ram:ApplicableTradeSettlementFinancialCard">
|
||||||
<assert id="FX-SCH-A-000281" test="string-length(ram:ID)<=10">
|
<assert id="FX-SCH-A-000281" test="string-length(ram:ID)<=10">
|
||||||
@@ -138,7 +144,7 @@
|
|||||||
[BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier.</assert>
|
[BR-65]-The Item classification identifier (BT-158) shall have a Scheme identifier.</assert>
|
||||||
<assert id="FX-SCH-A-000210" test="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)">
|
<assert id="FX-SCH-A-000210" test="(ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[upper-case(ram:TypeCode) = 'VAT']/ram:CategoryCode)">
|
||||||
[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).</assert>
|
[BR-CO-04]-Each Invoice line (BG-25) shall be categorized with an Invoiced item VAT category code (BT-151).</assert>
|
||||||
<assert id="FX-SCH-A-000211" test="string-length(substring-after(ram:SpecifiedTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
<assert id="FX-SCH-A-000211" test="string-length(substring-after(ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount,'.'))<=2">
|
||||||
[BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.</assert>
|
[BR-DEC-23]-The allowed maximum number of decimals for the Invoice line net amount (BT-131) is 2.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -272,7 +278,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000091" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-03]-An Invoice that contains a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000092" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-06]-In a Document level allowance (BG-20) where the Document level allowance VAT category code (BT-95) is "IPSI" the Document level allowance VAT rate (BT-96) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -342,7 +348,7 @@
|
|||||||
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:CategoryTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000109" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-04]-An Invoice that contains a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller Tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000110" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-07]-In a Document level charge (BG-21) where the Document level charge VAT category code (BT-102) is "IPSI" the Document level charge VAT rate (BT-103) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -380,9 +386,9 @@
|
|||||||
[BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112).</assert>
|
[BR-14]-An Invoice shall have the Invoice total amount with VAT (BT-112).</assert>
|
||||||
<assert id="FX-SCH-A-000005" test="(ram:DuePayableAmount)">
|
<assert id="FX-SCH-A-000005" test="(ram:DuePayableAmount)">
|
||||||
[BR-15]-An Invoice shall have the Amount due for payment (BT-115).</assert>
|
[BR-15]-An Invoice shall have the Amount due for payment (BT-115).</assert>
|
||||||
<assert id="FX-SCH-A-000304" test="for $calculatedAmount in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100), $totalAmount in xs:decimal(ram:AllowanceTotalAmount), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])), $tolerance in xs:decimal(0.01), $maxTolerance in $nbAllowanceItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance or (not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']) and not (ram:AllowanceTotalAmount))">
|
<assert id="FX-SCH-A-000304" test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']) and not (ram:AllowanceTotalAmount)) or (for $calculatedAmount in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100), $totalAmount in xs:decimal(ram:AllowanceTotalAmount), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])), $tolerance in xs:decimal(0.01), $maxTolerance in $nbAllowanceItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance)">
|
||||||
[BR-FXEXT-CO-11]-Absolute Value of (Sum of allowances on document level (BT-107) - Σ Document level allowance amounts (BT-92))<= 0,01 * Number of Document level allowance amounts (BT-92).</assert>
|
[BR-FXEXT-CO-11]-Absolute Value of (Sum of allowances on document level (BT-107) - Σ Document level allowance amounts (BT-92))<= 0,01 * Number of Document level allowance amounts (BT-92).</assert>
|
||||||
<assert id="FX-SCH-A-000305" test="for $calculatedAmount in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)), $totalAmount in xs:decimal(ram:ChargeTotalAmount), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $nbChargeItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance or (not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount))">
|
<assert id="FX-SCH-A-000305" test="(not(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true'])and not (ram:ChargeTotalAmount)) or (for $calculatedAmount in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)), $totalAmount in xs:decimal(ram:ChargeTotalAmount), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $nbChargeItems * $tolerance, $diff in xs:decimal($totalAmount - $calculatedAmount), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance)">
|
||||||
[BR-FXEXT-CO-12]-Absolute Value of (Sum of charges on document level (BT-108) - Σ Document level charge amounts (BT-99) - Σ Logistics Service fee amounts (BT-x-272))<= 0,01 * (Number of Document level charge amounts (BT-99) + Number of Logistics Service fee amounts (BT-X-272)).</assert>
|
[BR-FXEXT-CO-12]-Absolute Value of (Sum of charges on document level (BT-108) - Σ Document level charge amounts (BT-99) - Σ Logistics Service fee amounts (BT-x-272))<= 0,01 * (Number of Document level charge amounts (BT-99) + Number of Logistics Service fee amounts (BT-X-272)).</assert>
|
||||||
<assert id="FX-SCH-A-000306" test="for $BT109 in xs:decimal(ram:TaxBasisTotalAmount), $BT131Sum in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)), $BT92Sum in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100), $BT99Sum in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem)), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems), $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance">
|
<assert id="FX-SCH-A-000306" test="for $BT109 in xs:decimal(ram:TaxBasisTotalAmount), $BT131Sum in xs:decimal(round(sum(../../ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:SpecifiedTradeSettlementLineMonetarySummation/ram:LineTotalAmount) * xs:decimal(100)) div xs:decimal(100)), $BT92Sum in xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false']/ram:ActualAmount)* 10 * 10 ) div 100), $BT99Sum in xs:decimal(xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']/ram:ActualAmount)* 100 ) div 100)+ xs:decimal(round(sum(/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedLogisticsServiceCharge/ram:AppliedAmount)* 10 * 10 ) div 100)), $nbLineItems in xs:decimal(count(../../ram:IncludedSupplyChainTradeLineItem)), $nbAllowanceItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='false'])), $nbChargeItems in xs:decimal(count(../ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator='true']) + count(../ram:SpecifiedLogisticsServiceCharge)), $tolerance in xs:decimal(0.01), $maxTolerance in $tolerance * ($nbLineItems + $nbAllowanceItems + $nbChargeItems), $diff in xs:decimal($BT109 - $BT131Sum + $BT92Sum - $BT99Sum), $abs in xs:decimal(abs($diff)) return $abs le $maxTolerance">
|
||||||
[BR-FXEXT-CO-13]-Absolute Value of (Invoice total amount without VAT (BT-109) - ∑ Invoice line net amounts (BT-131) + Σ Document level allowance amounts (BT-92) - Σ Document level charge amounts (BT-99)) <= 0,01 * (Number of line net amounts (BT-131) + Number of Document level allowance amounts (BT-92) + Number of Document level charge amounts (BT-99)).</assert>
|
[BR-FXEXT-CO-13]-Absolute Value of (Invoice total amount without VAT (BT-109) - ∑ Invoice line net amounts (BT-131) + Σ Document level allowance amounts (BT-92) - Σ Document level charge amounts (BT-99)) <= 0,01 * (Number of line net amounts (BT-131) + Number of Document level allowance amounts (BT-92) + Number of Document level charge amounts (BT-99)).</assert>
|
||||||
@@ -428,12 +434,16 @@
|
|||||||
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
[BR-CO-27]-Either the IBAN or a Proprietary ID (BT-84) shall be used.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayeePartyCreditorFinancialAccount">
|
||||||
|
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
|
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
<rule context="//ram:SpecifiedTradeSettlementPaymentMeans[ram:TypeCode='30' or ram:TypeCode='58']/ram:PayerPartyDebtorFinancialAccount">
|
||||||
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
<assert id="FX-SCH-A-000133" test="(ram:IBANID) or (ram:ProprietaryID)">
|
||||||
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
[BR-50]-A Payment account identifier (BT-84) shall be present if Credit transfer (BG-16) information is provided in the Invoice.</assert>
|
||||||
<assert id="FX-SCH-A-000134" test="(ram:IBANID) or (ram:ProprietaryID)">
|
|
||||||
[BR-61]-If the Payment means type code (BT-81) means SEPA credit transfer, Local credit transfer or Non-SEPA international credit transfer, the Payment account identifier (BT-84) shall be present.</assert>
|
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
@@ -560,7 +570,7 @@
|
|||||||
<rule context="//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']">
|
<rule context="//rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeSettlement/ram:ApplicableTradeTax[ram:CategoryCode = 'M']">
|
||||||
<assert id="FX-SCH-A-000245" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
<assert id="FX-SCH-A-000245" test="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = ('VA', 'FC')] or /rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedTaxRegistration/ram:ID[@schemeID = 'VA']">
|
||||||
[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
[BR-AG-02]-An Invoice that contains an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" shall contain the Seller VAT Identifier (BT-31), the Seller tax registration identifier (BT-32) and/or the Seller tax representative VAT identifier (BT-63).</assert>
|
||||||
<assert id="FX-SCH-A-000246" test="ram:RateApplicablePercent > 0">
|
<assert id="FX-SCH-A-000246" test="ram:RateApplicablePercent >= 0">
|
||||||
[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</assert>
|
[BR-AG-05]-In an Invoice line (BG-25) where the Invoiced item VAT category code (BT-151) is "IPSI" the Invoiced item VAT rate (BT-152) shall be 0 (zero) or greater than zero.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1131,8 +1141,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerAgentTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerAgentTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1165,8 +1175,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerAgentTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerAgentTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1371,8 +1381,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1405,8 +1415,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTaxRepresentativeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTaxRepresentativeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1548,8 +1558,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1582,8 +1592,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:BuyerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1796,8 +1806,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ProductEndUserTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ProductEndUserTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -1830,8 +1840,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ProductEndUserTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:ProductEndUserTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2036,8 +2046,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SalesAgentTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SalesAgentTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2070,8 +2080,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SalesAgentTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SalesAgentTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2278,8 +2288,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2312,8 +2322,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTaxRepresentativeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2462,8 +2472,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2496,8 +2506,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeAgreement/ram:SellerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2849,6 +2859,13 @@
|
|||||||
Element 'ram:ModeCode' must occur exactly 1 times.</assert>
|
Element 'ram:ModeCode' must occur exactly 1 times.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:RelatedSupplyChainConsignment/ram:SpecifiedLogisticsTransportMovement/ram:ModeCode">
|
||||||
|
<let name="codeValue34" value="."/>
|
||||||
|
<assert id="FX-SCH-A-000346" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=34]/enumeration[@value=$codeValue34]">
|
||||||
|
Value of 'ram:ModeCode' is not allowed.</assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipFromTradeParty">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipFromTradeParty">
|
||||||
<assert id="FX-SCH-A-000163" test="count(ram:ID)<=1">
|
<assert id="FX-SCH-A-000163" test="count(ram:ID)<=1">
|
||||||
@@ -2938,8 +2955,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipFromTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipFromTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -2972,8 +2989,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipFromTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipFromTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3115,8 +3132,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3149,8 +3166,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:ShipToTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3292,8 +3309,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:UltimateShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:UltimateShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3326,8 +3343,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:UltimateShipToTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeDelivery/ram:UltimateShipToTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3435,8 +3452,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:DueDateTypeCode">
|
||||||
<let name="codeValue37" value="."/>
|
<let name="codeValue38" value="."/>
|
||||||
<assert id="FX-SCH-A-000180" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=37]/enumeration[@value=$codeValue37]">
|
<assert id="FX-SCH-A-000180" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=38]/enumeration[@value=$codeValue38]">
|
||||||
Value of 'ram:DueDateTypeCode' is not allowed.</assert>
|
Value of 'ram:DueDateTypeCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3473,8 +3490,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString[@format]">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ApplicableTradeTax/ram:TaxPointDate/udt:DateString[@format]">
|
||||||
<let name="codeValue36" value="@format"/>
|
<let name="codeValue37" value="@format"/>
|
||||||
<assert id="FX-SCH-A-000022" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=36]/enumeration[@value=$codeValue36]">
|
<assert id="FX-SCH-A-000022" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=37]/enumeration[@value=$codeValue37]">
|
||||||
Value of '@format' is not allowed.</assert>
|
Value of '@format' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3531,8 +3548,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceCurrencyCode">
|
||||||
<let name="codeValue34" value="."/>
|
<let name="codeValue35" value="."/>
|
||||||
<assert id="FX-SCH-A-000040" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=34]/enumeration[@value=$codeValue34]">
|
<assert id="FX-SCH-A-000040" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=35]/enumeration[@value=$codeValue35]">
|
||||||
Value of 'ram:InvoiceCurrencyCode' is not allowed.</assert>
|
Value of 'ram:InvoiceCurrencyCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3589,8 +3606,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:TypeCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceReferencedDocument/ram:TypeCode">
|
||||||
<let name="codeValue42" value="."/>
|
<let name="codeValue43" value="."/>
|
||||||
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=42]/enumeration[@value=$codeValue42]">
|
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=43]/enumeration[@value=$codeValue43]">
|
||||||
Value of 'ram:TypeCode' is not allowed.</assert>
|
Value of 'ram:TypeCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3691,8 +3708,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3725,8 +3742,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoiceeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3870,8 +3887,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoicerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoicerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -3904,8 +3921,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoicerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:InvoicerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4049,8 +4066,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4083,8 +4100,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4228,8 +4245,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayerTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4262,8 +4279,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:PayerTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4324,8 +4341,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:TypeCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:ReceivableSpecifiedTradeAccountingAccount/ram:TypeCode">
|
||||||
<let name="codeValue43" value="."/>
|
<let name="codeValue44" value="."/>
|
||||||
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=43]/enumeration[@value=$codeValue43]">
|
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=44]/enumeration[@value=$codeValue44]">
|
||||||
Value of 'ram:TypeCode' is not allowed.</assert>
|
Value of 'ram:TypeCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4480,8 +4497,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedAdvancePayment/ram:InvoiceSpecifiedReferencedDocument/ram:TypeCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedAdvancePayment/ram:InvoiceSpecifiedReferencedDocument/ram:TypeCode">
|
||||||
<let name="codeValue44" value="."/>
|
<let name="codeValue45" value="."/>
|
||||||
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=44]/enumeration[@value=$codeValue44]">
|
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=45]/enumeration[@value=$codeValue45]">
|
||||||
Value of 'ram:TypeCode' is not allowed.</assert>
|
Value of 'ram:TypeCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4692,8 +4709,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ram:ReasonCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="false"]/ram:ReasonCode">
|
||||||
<let name="codeValue38" value="."/>
|
<let name="codeValue39" value="."/>
|
||||||
<assert id="FX-SCH-A-000186" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=38]/enumeration[@value=$codeValue38]">
|
<assert id="FX-SCH-A-000186" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=39]/enumeration[@value=$codeValue39]">
|
||||||
Value of 'ram:ReasonCode' is not allowed.</assert>
|
Value of 'ram:ReasonCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4798,8 +4815,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="true"]/ram:ReasonCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeAllowanceCharge[ram:ChargeIndicator/udt:Indicator="true"]/ram:ReasonCode">
|
||||||
<let name="codeValue39" value="."/>
|
<let name="codeValue40" value="."/>
|
||||||
<assert id="FX-SCH-A-000186" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=39]/enumeration[@value=$codeValue39]">
|
<assert id="FX-SCH-A-000186" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=40]/enumeration[@value=$codeValue40]">
|
||||||
Value of 'ram:ReasonCode' is not allowed.</assert>
|
Value of 'ram:ReasonCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -4987,8 +5004,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -5021,8 +5038,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradePaymentTerms/ram:PayeeTradeParty/ram:SpecifiedLegalOrganization/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -5149,8 +5166,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=../../ram:InvoiceCurrencyCode and @currencyID]">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=../../ram:InvoiceCurrencyCode and @currencyID]">
|
||||||
<let name="codeValue40" value="@currencyID"/>
|
<let name="codeValue41" value="@currencyID"/>
|
||||||
<assert id="FX-SCH-A-000045" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=40]/enumeration[@value=$codeValue40]">
|
<assert id="FX-SCH-A-000045" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=41]/enumeration[@value=$codeValue41]">
|
||||||
Value of '@currencyID' is not allowed.</assert>
|
Value of '@currencyID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -5162,8 +5179,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=../../ram:TaxCurrencyCode and @currencyID]">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementHeaderMonetarySummation/ram:TaxTotalAmount[@currencyID=../../ram:TaxCurrencyCode and @currencyID]">
|
||||||
<let name="codeValue41" value="@currencyID"/>
|
<let name="codeValue42" value="@currencyID"/>
|
||||||
<assert id="FX-SCH-A-000045" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=41]/enumeration[@value=$codeValue41]">
|
<assert id="FX-SCH-A-000045" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=42]/enumeration[@value=$codeValue42]">
|
||||||
Value of '@currencyID' is not allowed.</assert>
|
Value of '@currencyID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -5239,8 +5256,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:SpecifiedTradeSettlementPaymentMeans/ram:TypeCode">
|
||||||
<let name="codeValue35" value="."/>
|
<let name="codeValue36" value="."/>
|
||||||
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=35]/enumeration[@value=$codeValue35]">
|
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=36]/enumeration[@value=$codeValue36]">
|
||||||
Value of 'ram:TypeCode' is not allowed.</assert>
|
Value of 'ram:TypeCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -5259,22 +5276,22 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxApplicableTradeCurrencyExchange/ram:SourceCurrencyCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxApplicableTradeCurrencyExchange/ram:SourceCurrencyCode">
|
||||||
<let name="codeValue34" value="."/>
|
<let name="codeValue35" value="."/>
|
||||||
<assert id="FX-SCH-A-000332" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=34]/enumeration[@value=$codeValue34]">
|
<assert id="FX-SCH-A-000332" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=35]/enumeration[@value=$codeValue35]">
|
||||||
Value of 'ram:SourceCurrencyCode' is not allowed.</assert>
|
Value of 'ram:SourceCurrencyCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxApplicableTradeCurrencyExchange/ram:TargetCurrencyCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxApplicableTradeCurrencyExchange/ram:TargetCurrencyCode">
|
||||||
<let name="codeValue34" value="."/>
|
<let name="codeValue35" value="."/>
|
||||||
<assert id="FX-SCH-A-000333" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=34]/enumeration[@value=$codeValue34]">
|
<assert id="FX-SCH-A-000333" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=35]/enumeration[@value=$codeValue35]">
|
||||||
Value of 'ram:TargetCurrencyCode' is not allowed.</assert>
|
Value of 'ram:TargetCurrencyCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:ApplicableHeaderTradeSettlement/ram:TaxCurrencyCode">
|
||||||
<let name="codeValue34" value="."/>
|
<let name="codeValue35" value="."/>
|
||||||
<assert id="FX-SCH-A-000196" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=34]/enumeration[@value=$codeValue34]">
|
<assert id="FX-SCH-A-000196" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=35]/enumeration[@value=$codeValue35]">
|
||||||
Value of 'ram:TaxCurrencyCode' is not allowed.</assert>
|
Value of 'ram:TaxCurrencyCode' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -6273,8 +6290,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:ShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -6435,8 +6452,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:UltimateShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedLineTradeDelivery/ram:UltimateShipToTradeParty/ram:PostalTradeAddress/ram:CountryID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000036" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:CountryID' is not allowed.</assert>
|
Value of 'ram:CountryID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -6915,13 +6932,6 @@
|
|||||||
Element 'ram:Value' must occur exactly 1 times.</assert>
|
Element 'ram:Value' must occur exactly 1 times.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:TypeCode">
|
|
||||||
<let name="codeValue8" value="."/>
|
|
||||||
<assert id="FX-SCH-A-000023" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=8]/enumeration[@value=$codeValue8]">
|
|
||||||
Value of 'ram:TypeCode' is not allowed.</assert>
|
|
||||||
</rule>
|
|
||||||
</pattern>
|
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:TypeCode[@listID]">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:ApplicableProductCharacteristic/ram:TypeCode[@listID]">
|
||||||
<report test="true()">
|
<report test="true()">
|
||||||
@@ -6960,8 +6970,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode[@listID]">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:DesignatedProductClassification/ram:ClassCode[@listID]">
|
||||||
<let name="codeValue9" value="@listID"/>
|
<let name="codeValue8" value="@listID"/>
|
||||||
<assert id="FX-SCH-A-000297" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
<assert id="FX-SCH-A-000297" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=8]/enumeration[@value=$codeValue8]">
|
||||||
Value of '@listID' is not allowed.</assert>
|
Value of '@listID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
@@ -7010,6 +7020,13 @@
|
|||||||
Attribute '@schemeID' is required in this context.</assert>
|
Attribute '@schemeID' is required in this context.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
|
<pattern>
|
||||||
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:IncludedReferencedProduct/ram:GlobalID[@schemeID]">
|
||||||
|
<let name="codeValue10" value="@schemeID"/>
|
||||||
|
<assert id="FX-SCH-A-000031" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
||||||
|
Value of '@schemeID' is not allowed.</assert>
|
||||||
|
</rule>
|
||||||
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:IncludedReferencedProduct/ram:ID[@schemeID]">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:IncludedReferencedProduct/ram:ID[@schemeID]">
|
||||||
<report test="true()">
|
<report test="true()">
|
||||||
@@ -7073,8 +7090,8 @@
|
|||||||
</pattern>
|
</pattern>
|
||||||
<pattern>
|
<pattern>
|
||||||
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID">
|
<rule context="/rsm:CrossIndustryInvoice/rsm:SupplyChainTradeTransaction/ram:IncludedSupplyChainTradeLineItem/ram:SpecifiedTradeProduct/ram:OriginTradeCountry/ram:ID">
|
||||||
<let name="codeValue10" value="."/>
|
<let name="codeValue9" value="."/>
|
||||||
<assert id="FX-SCH-A-000026" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=10]/enumeration[@value=$codeValue10]">
|
<assert id="FX-SCH-A-000026" test="document('FACTUR-X_EXTENDED_codedb.xml')//cl[@id=9]/enumeration[@value=$codeValue9]">
|
||||||
Value of 'ram:ID' is not allowed.</assert>
|
Value of 'ram:ID' is not allowed.</assert>
|
||||||
</rule>
|
</rule>
|
||||||
</pattern>
|
</pattern>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?><schema xmlns="http://purl.oclc.org/dsdl/schematron" queryBinding="xslt2" schemaVersion="iso">
|
||||||
<title>Schema for Factur-X; 1.0.07; Accounting, MINIMUM</title>
|
<title>Schema for Factur-X; 1.07.2; Accounting, MINIMUM</title>
|
||||||
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
<ns prefix="rsm" uri="urn:un:unece:uncefact:data:standard:CrossIndustryInvoice:100"/>
|
||||||
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
<ns prefix="qdt" uri="urn:un:unece:uncefact:data:standard:QualifiedDataType:100"/>
|
||||||
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
<ns prefix="ram" uri="urn:un:unece:uncefact:data:standard:ReusableAggregateBusinessInformationEntity:100"/>
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<codedb>
|
<codedb>
|
||||||
<cl id="1">
|
<cl id="1">
|
||||||
<enumeration value="urn:factur-x.eu:1p0:minimum"/>
|
<enumeration value="urn:factur-x.eu:1p0:minimum"/>
|
||||||
|
<enumeration value="urn:zugferd.de:2p0:minimum"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="2">
|
<cl id="2">
|
||||||
<enumeration value="71"/>
|
<enumeration value="71"/>
|
||||||
@@ -289,6 +290,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="5">
|
<cl id="5">
|
||||||
<enumeration value="AD"/>
|
<enumeration value="AD"/>
|
||||||
@@ -605,7 +614,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -698,6 +706,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -722,6 +731,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="7">
|
<cl id="7">
|
||||||
@@ -786,7 +796,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -879,6 +888,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -903,6 +913,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
</codedb>
|
</codedb>
|
||||||
@@ -211,7 +211,7 @@
|
|||||||
<xsl:variable name="CEF-EAS-EXT-CODES" select="' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0151 0183 0184 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0208 0209 0210 0211 0212 0213 9901 9902 9904 9905 9906 9907 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9955 9957 AN AQ AS AU EM XR01 XR02 XR03 '" />
|
<xsl:variable name="CEF-EAS-EXT-CODES" select="' 0002 0007 0009 0037 0060 0088 0096 0097 0106 0130 0135 0142 0151 0183 0184 0190 0191 0192 0193 0194 0195 0196 0198 0199 0200 0201 0202 0203 0204 0208 0209 0210 0211 0212 0213 9901 9902 9904 9905 9906 9907 9910 9913 9914 9915 9918 9919 9920 9922 9923 9924 9925 9926 9927 9928 9929 9930 9931 9932 9933 9934 9935 9936 9937 9938 9939 9940 9941 9942 9943 9944 9945 9946 9947 9948 9949 9950 9951 9952 9953 9955 9957 AN AQ AS AU EM XR01 XR02 XR03 '" />
|
||||||
<xsl:template match="text()" mode="M7" priority="-1" />
|
<xsl:template match="text()" mode="M7" priority="-1" />
|
||||||
<xsl:template match="@*|node()" mode="M7" priority="-2">
|
<xsl:template match="@*|node()" mode="M7" priority="-2">
|
||||||
<xsl:apply-templates mode="M7" select="*" />
|
<xsl:apply-templates mode="M7" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--PATTERN cii-pattern-->
|
<!--PATTERN cii-pattern-->
|
||||||
@@ -344,7 +344,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -365,7 +365,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -386,7 +386,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -422,7 +422,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -503,7 +503,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -539,7 +539,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -575,7 +575,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -626,7 +626,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -662,7 +662,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -713,7 +713,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -734,11 +734,11 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="text()" mode="M8" priority="-1" />
|
<xsl:template match="text()" mode="M8" priority="-1" />
|
||||||
<xsl:template match="@*|node()" mode="M8" priority="-2">
|
<xsl:template match="@*|node()" mode="M8" priority="-2">
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--PATTERN cii-extension-pattern-->
|
<!--PATTERN cii-extension-pattern-->
|
||||||
@@ -764,7 +764,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -787,7 +787,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -810,7 +810,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -833,7 +833,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -856,10 +856,10 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="text()" mode="M9" priority="-1" />
|
<xsl:template match="text()" mode="M9" priority="-1" />
|
||||||
<xsl:template match="@*|node()" mode="M9" priority="-2">
|
<xsl:template match="@*|node()" mode="M9" priority="-2">
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|||||||
@@ -214,7 +214,7 @@
|
|||||||
<xsl:variable name="CEF-EAS-EXT-CODES" select="concat($DIGA-CODES, $CEF-EAS-CODES)" />
|
<xsl:variable name="CEF-EAS-EXT-CODES" select="concat($DIGA-CODES, $CEF-EAS-CODES)" />
|
||||||
<xsl:template match="text()" mode="M7" priority="-1" />
|
<xsl:template match="text()" mode="M7" priority="-1" />
|
||||||
<xsl:template match="@*|node()" mode="M7" priority="-2">
|
<xsl:template match="@*|node()" mode="M7" priority="-2">
|
||||||
<xsl:apply-templates mode="M7" select="*" />
|
<xsl:apply-templates mode="M7" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--PATTERN cii-pattern-->
|
<!--PATTERN cii-pattern-->
|
||||||
@@ -396,7 +396,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -417,7 +417,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -438,7 +438,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -474,7 +474,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -555,7 +555,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -591,7 +591,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -627,7 +627,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -678,7 +678,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -714,7 +714,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -765,7 +765,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -786,11 +786,11 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="text()" mode="M8" priority="-1" />
|
<xsl:template match="text()" mode="M8" priority="-1" />
|
||||||
<xsl:template match="@*|node()" mode="M8" priority="-2">
|
<xsl:template match="@*|node()" mode="M8" priority="-2">
|
||||||
<xsl:apply-templates mode="M8" select="*" />
|
<xsl:apply-templates mode="M8" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--PATTERN cii-extension-pattern-->
|
<!--PATTERN cii-extension-pattern-->
|
||||||
@@ -816,7 +816,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -839,7 +839,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -862,7 +862,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -885,7 +885,7 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--RULE -->
|
<!--RULE -->
|
||||||
@@ -908,10 +908,10 @@
|
|||||||
</svrl:failed-assert>
|
</svrl:failed-assert>
|
||||||
</xsl:otherwise>
|
</xsl:otherwise>
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
<xsl:template match="text()" mode="M9" priority="-1" />
|
<xsl:template match="text()" mode="M9" priority="-1" />
|
||||||
<xsl:template match="@*|node()" mode="M9" priority="-2">
|
<xsl:template match="@*|node()" mode="M9" priority="-2">
|
||||||
<xsl:apply-templates mode="M9" select="*" />
|
<xsl:apply-templates mode="M9" select="@*|*" />
|
||||||
</xsl:template>
|
</xsl:template>
|
||||||
</xsl:stylesheet>
|
</xsl:stylesheet>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
<codedb>
|
<codedb>
|
||||||
<cl id="1">
|
<cl id="1">
|
||||||
<enumeration value="urn:factur-x.eu:1p0:basicwl"/>
|
<enumeration value="urn:factur-x.eu:1p0:basicwl"/>
|
||||||
|
<enumeration value="urn:zugferd.de:2p0:basicwl"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="2">
|
<cl id="2">
|
||||||
<enumeration value="71"/>
|
<enumeration value="71"/>
|
||||||
@@ -692,6 +693,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="6">
|
<cl id="6">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -919,6 +928,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="7">
|
<cl id="7">
|
||||||
<enumeration value="AD"/>
|
<enumeration value="AD"/>
|
||||||
@@ -1189,6 +1206,7 @@
|
|||||||
<enumeration value="0147"/>
|
<enumeration value="0147"/>
|
||||||
<enumeration value="0151"/>
|
<enumeration value="0151"/>
|
||||||
<enumeration value="0170"/>
|
<enumeration value="0170"/>
|
||||||
|
<enumeration value="0177"/>
|
||||||
<enumeration value="0183"/>
|
<enumeration value="0183"/>
|
||||||
<enumeration value="0184"/>
|
<enumeration value="0184"/>
|
||||||
<enumeration value="0188"/>
|
<enumeration value="0188"/>
|
||||||
@@ -1220,6 +1238,7 @@
|
|||||||
<enumeration value="0221"/>
|
<enumeration value="0221"/>
|
||||||
<enumeration value="0225"/>
|
<enumeration value="0225"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
<enumeration value="9901"/>
|
<enumeration value="9901"/>
|
||||||
<enumeration value="9910"/>
|
<enumeration value="9910"/>
|
||||||
<enumeration value="9913"/>
|
<enumeration value="9913"/>
|
||||||
@@ -1336,7 +1355,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -1429,6 +1447,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -1453,6 +1472,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="12">
|
<cl id="12">
|
||||||
@@ -1588,6 +1608,8 @@
|
|||||||
<enumeration value="VATEX-EU-143-1J"/>
|
<enumeration value="VATEX-EU-143-1J"/>
|
||||||
<enumeration value="VATEX-EU-143-1K"/>
|
<enumeration value="VATEX-EU-143-1K"/>
|
||||||
<enumeration value="VATEX-EU-143-1L"/>
|
<enumeration value="VATEX-EU-143-1L"/>
|
||||||
|
<enumeration value="VATEX-EU-144"/>
|
||||||
|
<enumeration value="VATEX-EU-146-1E"/>
|
||||||
<enumeration value="VATEX-EU-148"/>
|
<enumeration value="VATEX-EU-148"/>
|
||||||
<enumeration value="VATEX-EU-148-A"/>
|
<enumeration value="VATEX-EU-148-A"/>
|
||||||
<enumeration value="VATEX-EU-148-B"/>
|
<enumeration value="VATEX-EU-148-B"/>
|
||||||
@@ -1603,6 +1625,7 @@
|
|||||||
<enumeration value="VATEX-EU-151-1C"/>
|
<enumeration value="VATEX-EU-151-1C"/>
|
||||||
<enumeration value="VATEX-EU-151-1D"/>
|
<enumeration value="VATEX-EU-151-1D"/>
|
||||||
<enumeration value="VATEX-EU-151-1E"/>
|
<enumeration value="VATEX-EU-151-1E"/>
|
||||||
|
<enumeration value="VATEX-EU-159"/>
|
||||||
<enumeration value="VATEX-EU-309"/>
|
<enumeration value="VATEX-EU-309"/>
|
||||||
<enumeration value="VATEX-EU-79-C"/>
|
<enumeration value="VATEX-EU-79-C"/>
|
||||||
<enumeration value="VATEX-EU-AE"/>
|
<enumeration value="VATEX-EU-AE"/>
|
||||||
@@ -1884,7 +1907,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -1977,6 +1999,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -2001,6 +2024,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="20">
|
<cl id="20">
|
||||||
@@ -2065,7 +2089,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -2158,6 +2181,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -2182,6 +2206,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="21">
|
<cl id="21">
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@
|
|||||||
<codedb>
|
<codedb>
|
||||||
<cl id="1">
|
<cl id="1">
|
||||||
<enumeration value="urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"/>
|
<enumeration value="urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic"/>
|
||||||
|
<enumeration value="urn:cen.eu:en16931:2017#compliant#urn:zugferd.de:2p0:basic"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="2">
|
<cl id="2">
|
||||||
<enumeration value="71"/>
|
<enumeration value="71"/>
|
||||||
@@ -692,6 +693,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="6">
|
<cl id="6">
|
||||||
<enumeration value="10"/>
|
<enumeration value="10"/>
|
||||||
@@ -3298,6 +3307,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="12">
|
<cl id="12">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -3525,6 +3542,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="13">
|
<cl id="13">
|
||||||
<enumeration value="AD"/>
|
<enumeration value="AD"/>
|
||||||
@@ -3795,6 +3820,7 @@
|
|||||||
<enumeration value="0147"/>
|
<enumeration value="0147"/>
|
||||||
<enumeration value="0151"/>
|
<enumeration value="0151"/>
|
||||||
<enumeration value="0170"/>
|
<enumeration value="0170"/>
|
||||||
|
<enumeration value="0177"/>
|
||||||
<enumeration value="0183"/>
|
<enumeration value="0183"/>
|
||||||
<enumeration value="0184"/>
|
<enumeration value="0184"/>
|
||||||
<enumeration value="0188"/>
|
<enumeration value="0188"/>
|
||||||
@@ -3826,6 +3852,7 @@
|
|||||||
<enumeration value="0221"/>
|
<enumeration value="0221"/>
|
||||||
<enumeration value="0225"/>
|
<enumeration value="0225"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
<enumeration value="9901"/>
|
<enumeration value="9901"/>
|
||||||
<enumeration value="9910"/>
|
<enumeration value="9910"/>
|
||||||
<enumeration value="9913"/>
|
<enumeration value="9913"/>
|
||||||
@@ -3942,7 +3969,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -4035,6 +4061,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -4059,6 +4086,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="18">
|
<cl id="18">
|
||||||
@@ -4180,6 +4208,8 @@
|
|||||||
<enumeration value="VATEX-EU-143-1J"/>
|
<enumeration value="VATEX-EU-143-1J"/>
|
||||||
<enumeration value="VATEX-EU-143-1K"/>
|
<enumeration value="VATEX-EU-143-1K"/>
|
||||||
<enumeration value="VATEX-EU-143-1L"/>
|
<enumeration value="VATEX-EU-143-1L"/>
|
||||||
|
<enumeration value="VATEX-EU-144"/>
|
||||||
|
<enumeration value="VATEX-EU-146-1E"/>
|
||||||
<enumeration value="VATEX-EU-148"/>
|
<enumeration value="VATEX-EU-148"/>
|
||||||
<enumeration value="VATEX-EU-148-A"/>
|
<enumeration value="VATEX-EU-148-A"/>
|
||||||
<enumeration value="VATEX-EU-148-B"/>
|
<enumeration value="VATEX-EU-148-B"/>
|
||||||
@@ -4195,6 +4225,7 @@
|
|||||||
<enumeration value="VATEX-EU-151-1C"/>
|
<enumeration value="VATEX-EU-151-1C"/>
|
||||||
<enumeration value="VATEX-EU-151-1D"/>
|
<enumeration value="VATEX-EU-151-1D"/>
|
||||||
<enumeration value="VATEX-EU-151-1E"/>
|
<enumeration value="VATEX-EU-151-1E"/>
|
||||||
|
<enumeration value="VATEX-EU-159"/>
|
||||||
<enumeration value="VATEX-EU-309"/>
|
<enumeration value="VATEX-EU-309"/>
|
||||||
<enumeration value="VATEX-EU-79-C"/>
|
<enumeration value="VATEX-EU-79-C"/>
|
||||||
<enumeration value="VATEX-EU-AE"/>
|
<enumeration value="VATEX-EU-AE"/>
|
||||||
@@ -4476,7 +4507,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -4569,6 +4599,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -4593,6 +4624,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="24">
|
<cl id="24">
|
||||||
@@ -4657,7 +4689,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -4750,6 +4781,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -4774,6 +4806,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="25">
|
<cl id="25">
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -692,6 +692,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="6">
|
<cl id="6">
|
||||||
<enumeration value="AA"/>
|
<enumeration value="AA"/>
|
||||||
@@ -4561,6 +4569,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="16">
|
<cl id="16">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -4788,6 +4804,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="17">
|
<cl id="17">
|
||||||
<enumeration value="0002"/>
|
<enumeration value="0002"/>
|
||||||
@@ -4805,6 +4829,7 @@
|
|||||||
<enumeration value="0147"/>
|
<enumeration value="0147"/>
|
||||||
<enumeration value="0151"/>
|
<enumeration value="0151"/>
|
||||||
<enumeration value="0170"/>
|
<enumeration value="0170"/>
|
||||||
|
<enumeration value="0177"/>
|
||||||
<enumeration value="0183"/>
|
<enumeration value="0183"/>
|
||||||
<enumeration value="0184"/>
|
<enumeration value="0184"/>
|
||||||
<enumeration value="0188"/>
|
<enumeration value="0188"/>
|
||||||
@@ -4836,6 +4861,7 @@
|
|||||||
<enumeration value="0221"/>
|
<enumeration value="0221"/>
|
||||||
<enumeration value="0225"/>
|
<enumeration value="0225"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
<enumeration value="9901"/>
|
<enumeration value="9901"/>
|
||||||
<enumeration value="9910"/>
|
<enumeration value="9910"/>
|
||||||
<enumeration value="9913"/>
|
<enumeration value="9913"/>
|
||||||
@@ -4969,7 +4995,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -5062,6 +5087,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -5086,6 +5112,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="25">
|
<cl id="25">
|
||||||
@@ -5207,6 +5234,8 @@
|
|||||||
<enumeration value="VATEX-EU-143-1J"/>
|
<enumeration value="VATEX-EU-143-1J"/>
|
||||||
<enumeration value="VATEX-EU-143-1K"/>
|
<enumeration value="VATEX-EU-143-1K"/>
|
||||||
<enumeration value="VATEX-EU-143-1L"/>
|
<enumeration value="VATEX-EU-143-1L"/>
|
||||||
|
<enumeration value="VATEX-EU-144"/>
|
||||||
|
<enumeration value="VATEX-EU-146-1E"/>
|
||||||
<enumeration value="VATEX-EU-148"/>
|
<enumeration value="VATEX-EU-148"/>
|
||||||
<enumeration value="VATEX-EU-148-A"/>
|
<enumeration value="VATEX-EU-148-A"/>
|
||||||
<enumeration value="VATEX-EU-148-B"/>
|
<enumeration value="VATEX-EU-148-B"/>
|
||||||
@@ -5222,6 +5251,7 @@
|
|||||||
<enumeration value="VATEX-EU-151-1C"/>
|
<enumeration value="VATEX-EU-151-1C"/>
|
||||||
<enumeration value="VATEX-EU-151-1D"/>
|
<enumeration value="VATEX-EU-151-1D"/>
|
||||||
<enumeration value="VATEX-EU-151-1E"/>
|
<enumeration value="VATEX-EU-151-1E"/>
|
||||||
|
<enumeration value="VATEX-EU-159"/>
|
||||||
<enumeration value="VATEX-EU-309"/>
|
<enumeration value="VATEX-EU-309"/>
|
||||||
<enumeration value="VATEX-EU-79-C"/>
|
<enumeration value="VATEX-EU-79-C"/>
|
||||||
<enumeration value="VATEX-EU-AE"/>
|
<enumeration value="VATEX-EU-AE"/>
|
||||||
@@ -5506,7 +5536,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -5599,6 +5628,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -5623,6 +5653,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="32">
|
<cl id="32">
|
||||||
@@ -5687,7 +5718,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -5780,6 +5810,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -5804,6 +5835,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="33">
|
<cl id="33">
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -153,7 +153,7 @@
|
|||||||
|
|
||||||
<!--SCHEMA SETUP-->
|
<!--SCHEMA SETUP-->
|
||||||
<xsl:template match="/">
|
<xsl:template match="/">
|
||||||
<svrl:schematron-output schemaVersion="iso" title="Schema for Factur-X; 1.0.07; Accounting, MINIMUM">
|
<svrl:schematron-output schemaVersion="iso" title="Schema for Factur-X; 1.07.2; Accounting, MINIMUM">
|
||||||
<xsl:comment>
|
<xsl:comment>
|
||||||
<xsl:value-of select="$archiveDirParameter" />
|
<xsl:value-of select="$archiveDirParameter" />
|
||||||
<xsl:value-of select="$archiveNameParameter" />
|
<xsl:value-of select="$archiveNameParameter" />
|
||||||
@@ -455,7 +455,7 @@
|
|||||||
</xsl:template>
|
</xsl:template>
|
||||||
|
|
||||||
<!--SCHEMATRON PATTERNS-->
|
<!--SCHEMATRON PATTERNS-->
|
||||||
<svrl:text>Schema for Factur-X; 1.0.07; Accounting, MINIMUM</svrl:text>
|
<svrl:text>Schema for Factur-X; 1.07.2; Accounting, MINIMUM</svrl:text>
|
||||||
|
|
||||||
<!--PATTERN -->
|
<!--PATTERN -->
|
||||||
|
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
<codedb>
|
<codedb>
|
||||||
<cl id="1">
|
<cl id="1">
|
||||||
<enumeration value="urn:factur-x.eu:1p0:minimum"/>
|
<enumeration value="urn:factur-x.eu:1p0:minimum"/>
|
||||||
|
<enumeration value="urn:zugferd.de:2p0:minimum"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="2">
|
<cl id="2">
|
||||||
<enumeration value="71"/>
|
<enumeration value="71"/>
|
||||||
@@ -289,6 +290,14 @@
|
|||||||
<enumeration value="0228"/>
|
<enumeration value="0228"/>
|
||||||
<enumeration value="0229"/>
|
<enumeration value="0229"/>
|
||||||
<enumeration value="0230"/>
|
<enumeration value="0230"/>
|
||||||
|
<enumeration value="0231"/>
|
||||||
|
<enumeration value="0232"/>
|
||||||
|
<enumeration value="0233"/>
|
||||||
|
<enumeration value="0234"/>
|
||||||
|
<enumeration value="0235"/>
|
||||||
|
<enumeration value="0236"/>
|
||||||
|
<enumeration value="0237"/>
|
||||||
|
<enumeration value="0238"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="5">
|
<cl id="5">
|
||||||
<enumeration value="AD"/>
|
<enumeration value="AD"/>
|
||||||
@@ -605,7 +614,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -698,6 +706,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -722,6 +731,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
<cl id="7">
|
<cl id="7">
|
||||||
@@ -786,7 +796,6 @@
|
|||||||
<enumeration value="GYD"/>
|
<enumeration value="GYD"/>
|
||||||
<enumeration value="HKD"/>
|
<enumeration value="HKD"/>
|
||||||
<enumeration value="HNL"/>
|
<enumeration value="HNL"/>
|
||||||
<enumeration value="HRK"/>
|
|
||||||
<enumeration value="HTG"/>
|
<enumeration value="HTG"/>
|
||||||
<enumeration value="HUF"/>
|
<enumeration value="HUF"/>
|
||||||
<enumeration value="IDR"/>
|
<enumeration value="IDR"/>
|
||||||
@@ -879,6 +888,7 @@
|
|||||||
<enumeration value="UYU"/>
|
<enumeration value="UYU"/>
|
||||||
<enumeration value="UYW"/>
|
<enumeration value="UYW"/>
|
||||||
<enumeration value="UZS"/>
|
<enumeration value="UZS"/>
|
||||||
|
<enumeration value="VED"/>
|
||||||
<enumeration value="VES"/>
|
<enumeration value="VES"/>
|
||||||
<enumeration value="VND"/>
|
<enumeration value="VND"/>
|
||||||
<enumeration value="VUV"/>
|
<enumeration value="VUV"/>
|
||||||
@@ -903,6 +913,7 @@
|
|||||||
<enumeration value="YER"/>
|
<enumeration value="YER"/>
|
||||||
<enumeration value="ZAR"/>
|
<enumeration value="ZAR"/>
|
||||||
<enumeration value="ZMW"/>
|
<enumeration value="ZMW"/>
|
||||||
|
<enumeration value="ZWG"/>
|
||||||
<enumeration value="ZWL"/>
|
<enumeration value="ZWL"/>
|
||||||
</cl>
|
</cl>
|
||||||
</codedb>
|
</codedb>
|
||||||
@@ -216,10 +216,10 @@ public class ZUGFeRDValidatorTest extends ResourceCase {
|
|||||||
|
|
||||||
assertThat(res).valueByXPath("count(//error)")
|
assertThat(res).valueByXPath("count(//error)")
|
||||||
.asInt()
|
.asInt()
|
||||||
.isEqualTo(1);
|
.isEqualTo(2);
|
||||||
assertThat(res).valueByXPath("count(//warning)")
|
assertThat(res).valueByXPath("count(//warning)")
|
||||||
.asInt()
|
.asInt()
|
||||||
.isEqualTo(3);
|
.isEqualTo(2);
|
||||||
|
|
||||||
assertThat(res).valueByXPath("count(//notice)")
|
assertThat(res).valueByXPath("count(//notice)")
|
||||||
.asInt()
|
.asInt()
|
||||||
|
|||||||
Reference in New Issue
Block a user