Fix current validation errors.

This commit is contained in:
langfr
2024-09-18 14:39:01 +01:00
parent 575d1d3fac
commit d338037447
2 changed files with 8 additions and 1 deletions

View File

@@ -93,6 +93,9 @@ public class Product implements IZUGFeRDExportableProduct {
*/
@Override
public String getTaxCategoryCode() {
if (taxCategoryCode == null) {
return IZUGFeRDExportableProduct.super.getTaxCategoryCode();
}
return taxCategoryCode;
}

View File

@@ -144,8 +144,12 @@ public class ZUGFeRD2PullProvider implements IXMLProvider {
if (party.getLegalOrganisation() != null) {
xml += "<ram:SpecifiedLegalOrganization> ";
if (party.getLegalOrganisation().getSchemedID() != null) {
if (profile == Profiles.getByName("Minimum")) {
xml += "<ram:ID>" + XMLTools.encodeXML(party.getLegalOrganisation().getSchemedID().getID()) + "</ram:ID>";
} else {
xml += "<ram:ID schemeID=\"" + XMLTools.encodeXML(party.getLegalOrganisation().getSchemedID().getScheme()) + "\">" + XMLTools.encodeXML(party.getLegalOrganisation().getSchemedID().getID()) + "</ram:ID>";
}
}
if (party.getLegalOrganisation().getTradingBusinessName() != null) {
xml += "<ram:TradingBusinessName>" + XMLTools.encodeXML(party.getLegalOrganisation().getTradingBusinessName()) + "</ram:TradingBusinessName>";
}