working on legelorganisationname

This commit is contained in:
jstaerk
2024-11-27 11:47:56 +01:00
parent 9f694d209b
commit 914e8f1a6e

View File

@@ -17,7 +17,6 @@ import org.w3c.dom.NodeList;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import static org.apache.fop.fonts.type1.AdobeStandardEncoding.a;
/***
* A organisation, i.e. usually a company
@@ -148,8 +147,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
addGlobalID(sID);
//&& ((currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0110") && currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0100"))
}
else{
} else {
setID(currentNode.getTextContent());
}
@@ -173,8 +171,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
if (taxSchemechilds.item(taxSchemechildsIndex).getLocalName() != null) {
if (taxSchemechilds.item(taxSchemechildsIndex).getTextContent().equals("FC") || (taxSchemechilds.item(taxSchemechildsIndex).getTextContent().equals("NOVAT"))) {
setTaxID(CompanyId);
}
else{
} else {
setVATID(CompanyId);
}
}
@@ -195,12 +192,27 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
NodeList legal = party.item(partyIndex).getChildNodes();
for (int legalChildIndex = 0; legalChildIndex < legal.getLength(); legalChildIndex++) {
if (legal.item(legalChildIndex).getLocalName() != null) {
LegalOrganisation lo = null;
if (legal.item(legalChildIndex).getLocalName().equals("RegistrationName")) {
setName(legal.item(legalChildIndex).getTextContent());
if (lo == null) {
lo = new LegalOrganisation();
}
if (legal.item(legalChildIndex).getLocalName().equals("CompanyLegalForm")) {
setDescription(legal.item(legalChildIndex).getTextContent());
lo.setTradingBusinessName(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);
}
}
}
}
@@ -302,8 +314,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
addGlobalID(sID);
//&& ((currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0110") && currentNode.getAttributes().getNamedItem("schemeID").getNodeValue().equals("0100"))
}
else{
} else {
setID(currentNode.getTextContent());
}
@@ -600,6 +611,7 @@ public class TradeParty implements IZUGFeRDExportableTradeParty {
/**
* primarily for invoiceimporter and JSON
*
* @return the list of sepa mandates
*/
public List<DirectDebit> getDebitDetails() {