improved profile handling, corrected test

This commit is contained in:
Jochen Stärk
2020-09-29 21:04:52 +02:00
parent d1b16f6b4d
commit b707559507
3 changed files with 8 additions and 6 deletions

View File

@@ -43,7 +43,6 @@ public class Invoice implements IExportableTransaction {
Charges = new ArrayList<IZUGFeRDAllowanceCharge>(), LogisticsServiceCharges = new ArrayList<IZUGFeRDAllowanceCharge>();
protected IZUGFeRDTradeSettlement[] getTradeSettlement = null;
protected IZUGFeRDPaymentTerms paymentTerms = null;
private Profile profile;
public Invoice() {

View File

@@ -46,11 +46,14 @@ public class Profiles {
public static Profile getByName(String name, int version) {
Profile result=null;
if (version==1) {
return zf1Map.get(name);
result=zf1Map.get(name.toUpperCase());
} else {
return zf2Map.get(name);
result=zf2Map.get(name.toUpperCase());
}
if (result==null) { throw new RuntimeException("Profile not found"); }
return result;
}
public static Profile getByName(String name) {
return getByName(name, ZUGFeRDExporterFromA3.DefaultZUGFeRDVersion);