Removing datechecked Xrechnung version switch (became effective 2020-01-01 anyway)

This commit is contained in:
jstaerk
2021-01-03 10:48:02 +01:00
parent 3d90d215b2
commit 9fa8db04ae
4 changed files with 22 additions and 23 deletions

View File

@@ -126,13 +126,19 @@ public interface IExportableTransaction {
return null;
}
IZUGFeRDAllowanceCharge[] getZFAllowances();
default IZUGFeRDAllowanceCharge[] getZFAllowances() {
return null;
}
IZUGFeRDAllowanceCharge[] getZFCharges();
default IZUGFeRDAllowanceCharge[] getZFCharges() {
return null;
}
IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges();
default IZUGFeRDAllowanceCharge[] getZFLogisticsServiceCharges() {
return null;
}
IZUGFeRDExportableItem[] getZFItems();
@@ -290,7 +296,7 @@ public interface IExportableTransaction {
* @return three character currency of this invoice
*/
default String getCurrency() {
return null;
return "EUR";
}

View File

@@ -37,13 +37,17 @@ public interface IZUGFeRDExportableItem extends IAbsoluteValueProvider{
* item level discounts
* @return array of the discounts on a single item
*/
IZUGFeRDAllowanceCharge[] getItemAllowances();
default IZUGFeRDAllowanceCharge[] getItemAllowances() {
return null;
}
/**
* item level price additions
* @return array of the additional charges on the item
*/
IZUGFeRDAllowanceCharge[] getItemCharges();
default IZUGFeRDAllowanceCharge[] getItemCharges() {
return null;
}
/**

View File

@@ -68,17 +68,13 @@ public interface IZUGFeRDExportableTradeParty {
*
* @return First and last name of the recipient
*/
default String getName() {
return null;
}
String getName();
/**
* Postal code of the recipient
*
* @return Postal code of the recipient
*/
default String getZIP() {
return null;
}
String getZIP();
/**
@@ -96,9 +92,7 @@ public interface IZUGFeRDExportableTradeParty {
*
* @return two-letter iso country code of the contact
*/
default String getCountry() {
return null;
}
String getCountry();
/**
@@ -106,9 +100,7 @@ public interface IZUGFeRDExportableTradeParty {
*
* @return Returns the city of the recipient
*/
default String getLocation() {
return null;
}
String getLocation();
/**
@@ -116,9 +108,7 @@ public interface IZUGFeRDExportableTradeParty {
*
* @return street address (street+number) of the contact
*/
default String getStreet() {
return null;
}
String getStreet();
/**
* returns additional address information which is display in xml tag "LineTwo"

View File

@@ -20,7 +20,6 @@
*/
package org.mustangproject.ZUGFeRD;
import java.time.Year;
import java.util.Map;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -32,7 +31,7 @@ public class Profiles {
{"BASIC", new Profile("BASIC", "urn:cen.eu:en16931:2017#compliant#urn:factur-x.eu:1p0:basic")},
{"EN16931", new Profile("EN16931", "urn:cen.eu:en16931:2017")},
{"EXTENDED", new Profile("EXTENDED", "urn:cen.eu:en16931:2017#conformant#urn:factur-x.eu:1p0:extended")},
{"XRECHNUNG", new Profile("XRECHNUNG", "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_"+((Year.now().getValue()<=2020)?"1.2":"2.0"))} //intentionally switch to XRechnung 2.0 on 01.01.2021
{"XRECHNUNG", new Profile("XRECHNUNG", "urn:cen.eu:en16931:2017#compliant#urn:xoev-de:kosit:standard:xrechnung_2.0")} //switched to XRechnung 2.0 in 2021
}).collect(Collectors.toMap(data -> (String) data[0], data -> (Profile) data[1]));
static Map<String, Profile> zf1Map = Stream.of(new Object[][]{