Merge branch 'issues/503-ubl'
# Conflicts: # library/src/test/java/org/mustangproject/ZUGFeRD/ZF2ZInvoiceImporterTest.java
This commit is contained in:
@@ -84,19 +84,19 @@ public class BankDetails implements IZUGFeRDTradeSettlementPayment {
|
|||||||
/***
|
/***
|
||||||
* getOwn... methods will be removed in the future in favor of Tradeparty (e.g. Sender) class
|
* getOwn... methods will be removed in the future in favor of Tradeparty (e.g. Sender) class
|
||||||
* */
|
* */
|
||||||
@Override
|
// @Override
|
||||||
@Deprecated
|
// @Deprecated
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
public String getOwnBIC() {
|
// public String getOwnBIC() {
|
||||||
return getBIC();
|
// return getBIC();
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@Deprecated
|
// @Deprecated
|
||||||
@JsonIgnore
|
// @JsonIgnore
|
||||||
public String getOwnIBAN() {
|
// public String getOwnIBAN() {
|
||||||
return getIBAN();
|
// return getIBAN();
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -13,6 +13,8 @@ import java.math.BigDecimal;
|
|||||||
import java.math.RoundingMode;
|
import java.math.RoundingMode;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashMap;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* describes any invoice line
|
* describes any invoice line
|
||||||
@@ -37,6 +39,7 @@ 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 HashMap<String, String> attributes = new HashMap<>();
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* default constructor
|
* default constructor
|
||||||
@@ -64,8 +67,33 @@ 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%
|
||||||
|
|
||||||
|
// Bharti's homework 20241126:Streams https://www.youtube.com/watch?v=Lf01cBzmuXw
|
||||||
|
// and Lambdas https://www.youtube.com/watch?v=HCyx31NW8xg
|
||||||
setProduct(new Product());
|
setProduct(new Product());
|
||||||
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);
|
||||||
});
|
});
|
||||||
@@ -86,11 +114,21 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
product.setUnit(icn.getAttributes().getNamedItem("unitCode").getNodeValue());
|
product.setUnit(icn.getAttributes().getNamedItem("unitCode").getNodeValue());
|
||||||
});
|
});
|
||||||
|
|
||||||
|
itemMap.getAsNodeMap("OrderLineReference")
|
||||||
|
.flatMap(bordNodes -> bordNodes.getAsString("LineID"))
|
||||||
|
.ifPresent(this::addReferencedLineID);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
itemMap.getAllNodes("DocumentReference").map(ReferencedDocument::fromNode)
|
||||||
|
.forEach(this::addAdditionalReference);
|
||||||
|
|
||||||
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);
|
||||||
@@ -100,7 +138,8 @@ public class Item implements IZUGFeRDExportableItem {
|
|||||||
.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")
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ 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;
|
||||||
@@ -59,11 +60,15 @@ 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,18 @@ 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("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 ->
|
||||||
|
|||||||
@@ -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,6 +74,33 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
|
|
||||||
if (currentItemNode.getLocalName() != null) {
|
if (currentItemNode.getLocalName() != null) {
|
||||||
String currentUBLChild = currentItemNode.getLocalName();
|
String currentUBLChild = currentItemNode.getLocalName();
|
||||||
|
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")) {
|
if (currentUBLChild.equals("Party")) {
|
||||||
|
|
||||||
NodeList party = currentItemNode.getChildNodes();
|
NodeList party = currentItemNode.getChildNodes();
|
||||||
@@ -90,42 +120,105 @@ 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();
|
|
||||||
for (int partyTaxSchemeIndex = 0; partyTaxSchemeIndex < partyTaxScheme.getLength(); partyTaxSchemeIndex++) {
|
|
||||||
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName() != null) {
|
|
||||||
if (partyTaxScheme.item(partyTaxSchemeIndex).getLocalName().equals("CompanyID")) {
|
|
||||||
setTaxID(partyTaxScheme.item(partyTaxSchemeIndex).getTextContent());
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
// if (party.item(partyIndex).getLocalName().equals("AccountingSupplierParty")) {
|
||||||
|
// NodeList payeeParty = party.item(partyIndex).getChildNodes();
|
||||||
|
// for (int payeePartyIndex = 0; payeePartyIndex < payeeParty.getLength(); payeePartyIndex++) {
|
||||||
|
// if (payeeParty.item(payeePartyIndex).getLocalName() != null) {
|
||||||
|
if (currentTopElementName.equals("PartyIdentification")) {
|
||||||
|
NodeList partyID = party.item(partyIndex).getChildNodes();
|
||||||
|
for (int partyIDIndex = 0; partyIDIndex < partyID.getLength(); partyIDIndex++) {
|
||||||
|
if (partyID.item(partyIDIndex).getLocalName() != null) {
|
||||||
|
if (partyID.item(partyIDIndex).getLocalName().equals("ID")) {
|
||||||
|
Node currentNode = partyID.item(partyIDIndex);
|
||||||
|
if ((currentNode.getAttributes() != null &&
|
||||||
|
(currentNode.getAttributes().getNamedItem("schemeID") != null))
|
||||||
|
) {
|
||||||
|
//SchemedID gid = new SchemedID().setScheme(nodes.item(nodeIndex).getAttributes().getNamedItem("schemeID").getNodeValue()).setId(nodes.item(nodeIndex).getTextContent());
|
||||||
|
// addGlobalID(gid);
|
||||||
|
SchemedID sID = new SchemedID().setScheme(currentNode.getAttributes().getNamedItem("schemeID").getTextContent()).setId(currentNode.getTextContent());
|
||||||
|
addGlobalID(sID);
|
||||||
|
|
||||||
|
//&& ((currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0110") && currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0100"))
|
||||||
// if (currentTopElementName.equals("PartyTaxScheme")) {
|
}
|
||||||
// NodeList partyTaxScheme = party.item(partyIndex).getChildNodes();
|
// else {
|
||||||
// for (int partyTaxSchemeIndex = 0; partyTaxSchemeIndex < partyTaxScheme.getLength(); partyTaxSchemeIndex++) {
|
// setID(currentNode.getTextContent());
|
||||||
// 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());
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
// }
|
||||||
// }
|
|
||||||
//
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// if (currentTopElementName.equals("AccountingCustomerParty")) {
|
||||||
|
// NodeList partyID = party.item(partyIndex).getChildNodes();
|
||||||
|
// for (int partyIDIndex = 0; partyIDIndex < partyID.getLength(); partyIDIndex++) {
|
||||||
|
// if (partyID.item(partyIDIndex).getLocalName() != null) {
|
||||||
|
// if (partyID.item(partyIDIndex).getLocalName().equals("ID")) {
|
||||||
|
// Node currentNode = partyID.item(partyIDIndex);
|
||||||
|
// //setID(currentNode.getTextContent());
|
||||||
|
//
|
||||||
|
// if ((currentNode.getAttributes() != null &&
|
||||||
|
// (currentNode.getAttributes().getNamedItem("schemeID") != null))
|
||||||
|
// ) {
|
||||||
|
// //SchemedID gid = new SchemedID().setScheme(nodes.item(nodeIndex).getAttributes().getNamedItem("schemeID").getNodeValue()).setId(nodes.item(nodeIndex).getTextContent());
|
||||||
|
// //addGlobalID(gid);
|
||||||
|
// //SchemedID sID = new SchemedID(currentNode.getAttributes().getNamedItem("schemeID").getTextContent(), currentNode.getTextContent());
|
||||||
|
// //addGlobalID(sID);
|
||||||
|
// // SchemedID sID = new SchemedID().setScheme(deliveryLocation.item(deliveryLocationIndex).getAttributes().getNamedItem("schemeID").getTextContent());
|
||||||
|
// // addGlobalID(sID);
|
||||||
|
// SchemedID sID = new SchemedID().setScheme(currentNode.getAttributes().getNamedItem("schemeID").getTextContent()).setId(currentNode.getTextContent());
|
||||||
|
// addGlobalID(sID);
|
||||||
|
//
|
||||||
|
// //&& ((currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0110") && currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0100"))
|
||||||
|
// } 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
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
|
||||||
@@ -135,15 +228,34 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
NodeList legal = party.item(partyIndex).getChildNodes();
|
NodeList legal = party.item(partyIndex).getChildNodes();
|
||||||
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) {
|
||||||
|
LegalOrganisation lo = 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 +303,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 +320,6 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentUBLChild.equals("GlobalID")) {
|
if (currentUBLChild.equals("GlobalID")) {
|
||||||
@@ -224,57 +333,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 +616,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() {
|
||||||
|
|||||||
@@ -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;
|
||||||
@@ -273,6 +274,9 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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
|
||||||
@@ -302,10 +306,82 @@ public class ZUGFeRDInvoiceImporter {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//UBL...
|
||||||
|
XPathExpression shipExUBL = xpath.compile("//*[local-name()=\"Delivery\"]");
|
||||||
|
Node deliveryNode = (Node) shipExUBL.evaluate(getDocument(), XPathConstants.NODE);
|
||||||
|
|
||||||
|
if (deliveryNode != null) {
|
||||||
|
TradeParty delivery=new TradeParty();
|
||||||
|
NodeMap nodeMap = new NodeMap(deliveryNode).getAsNodeMap("DeliveryLocation").get();
|
||||||
|
|
||||||
|
if (nodeMap != null) {
|
||||||
|
nodeMap.getNode("ID").ifPresent(s -> {
|
||||||
|
SchemedID sID = new SchemedID().setScheme(s.getAttributes().getNamedItem("schemeID").getTextContent()).setId(s.getTextContent());
|
||||||
|
delivery.addGlobalID(sID);
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("StreetName").ifPresent(t -> delivery.setStreet(t));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("AdditionalStreetName").ifPresent(t -> delivery.setAdditionalAddress(t));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("CityName").ifPresent(t -> delivery.setLocation(t));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("PostalZone").ifPresent(t -> delivery.setZIP(t));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsNodeMap("Country").ifPresent(t -> t.getAsString("IdentificationCode").ifPresent(u -> delivery.setCountry(u)));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsNodeMap("AddressLine").ifPresent(t -> t.getAsString("Line").ifPresent(u -> delivery.setAdditionalAddressExtension(u)));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("AdditionalStreetName").ifPresent(t -> delivery.setAdditionalAddress(t));
|
||||||
|
});
|
||||||
|
nodeMap.getAsNodeMap("Address").ifPresent(s -> {
|
||||||
|
s.getAsString("AdditionalStreetName").ifPresent(t -> delivery.setAdditionalAddress(t));
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
NodeMap partyMap = new NodeMap(deliveryNode).getAsNodeMap("DeliveryParty").get();
|
||||||
|
if (partyMap!=null) {
|
||||||
|
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\"]|//*[local-name()=\"PayeeParty\"]//*");
|
||||||
NodeList payeeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
NodeList payeeNodes = (NodeList) xpr.evaluate(getDocument(), XPathConstants.NODESET);
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
xpr = xpath.compile("//*[local-name()=\"ExchangedDocument\"]|//*[local-name()=\"HeaderExchangedDocument\"]");
|
||||||
@@ -408,7 +484,7 @@ 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++) {
|
||||||
@@ -480,7 +556,7 @@ 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);
|
||||||
|
|
||||||
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]|//*[local-name()=\"ApplicableSupplyChainTradeSettlement\"]");
|
xpr = xpath.compile("//*[local-name()=\"ApplicableHeaderTradeSettlement\"]|//*[local-name()=\"ApplicableSupplyChainTradeSettlement\"]");
|
||||||
@@ -599,7 +675,21 @@ 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.setDueDate(dueDate).setDeliveryDate(deliveryDate).setIssueDate(issueDate).setSender(new TradeParty(SellerNodes)).setRecipient(new TradeParty(BuyerNodes)).setNumber(number).setDocumentCode(typeCode);
|
||||||
@@ -617,15 +707,18 @@ 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.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());
|
||||||
@@ -671,7 +764,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();
|
||||||
@@ -685,24 +778,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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -278,12 +278,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;
|
||||||
@@ -293,9 +297,18 @@ 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());
|
||||||
assertTrue(invoice.getTradeSettlement().length == 1);
|
|
||||||
|
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()[0] instanceof IZUGFeRDTradeSettlementPayment);
|
assertTrue(invoice.getTradeSettlement()[0] instanceof IZUGFeRDTradeSettlementPayment);
|
||||||
IZUGFeRDTradeSettlementPayment paym = (IZUGFeRDTradeSettlementPayment) invoice.getTradeSettlement()[0];
|
IZUGFeRDTradeSettlementPayment paym = (IZUGFeRDTradeSettlementPayment) invoice.getTradeSettlement()[0];
|
||||||
assertEquals("DE12500105170648489890", paym.getOwnIBAN());
|
assertEquals("DE12500105170648489890", paym.getOwnIBAN());
|
||||||
@@ -375,6 +388,62 @@ public class ZF2ZInvoiceImporterTest extends ResourceCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
this would test if for all elements/attributes
|
||||||
|
*/
|
||||||
|
|
||||||
|
public void testEEISI_300_cii_Import() throws XPathExpressionException, ParseException {
|
||||||
|
boolean hasExceptions = false;
|
||||||
|
File inputCII = getResourceAsFile("not_validating_full_invoice_based_onTest_EeISI_300_CENfullmodel.cii.xml");
|
||||||
|
File inputUBL = getResourceAsFile("not_validating_full_invoice_based_onTest_EeISI_300_CENfullmodel.ubl.xml");
|
||||||
|
|
||||||
|
|
||||||
|
ZUGFeRDInvoiceImporter zii = new ZUGFeRDInvoiceImporter();
|
||||||
|
zii.doIgnoreCalculationErrors();
|
||||||
|
try {
|
||||||
|
zii.fromXML(new String(Files.readAllBytes(inputCII.toPath()), StandardCharsets.UTF_8));
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Invoice invoiceUBL = null;
|
||||||
|
invoiceUBL = zii.extractInvoice();
|
||||||
|
|
||||||
|
try {
|
||||||
|
zii.ignoreCalculationErrors=true;
|
||||||
|
zii.fromXML(new String(Files.readAllBytes(inputUBL.toPath()), StandardCharsets.UTF_8));
|
||||||
|
|
||||||
|
} catch (IOException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
Invoice invoiceCII = null;
|
||||||
|
try {
|
||||||
|
invoiceCII = zii.extractInvoice();
|
||||||
|
ObjectMapper mapper = new ObjectMapper();
|
||||||
|
String ubl=mapper.writeValueAsString(invoiceUBL).replace("," ,"\n");
|
||||||
|
String cii=mapper.writeValueAsString(invoiceCII).replace("," ,"\n");
|
||||||
|
|
||||||
|
assertEquals(cii,ubl);
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
<cbc:Name>Seller contact point</cbc:Name>
|
||||||
|
<cbc:Telephone>+41 345 654455</cbc:Telephone>
|
||||||
|
<cbc:ElectronicMail>seller@contact.de);*/
|
||||||
|
} catch (XPathExpressionException | ParseException e) {
|
||||||
|
hasExceptions = true;
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
throw new RuntimeException(e);
|
||||||
|
}
|
||||||
|
assertFalse(hasExceptions);
|
||||||
|
|
||||||
|
// TransactionCalculator tc = new TransactionCalculator(invoiceCII);
|
||||||
|
// assertEquals(new BigDecimal("205.00"), tc.getGrandTotal());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -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,404 @@
|
|||||||
<?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: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: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>
|
|
||||||
Reference in New Issue
Block a user