Return Account Holder´s name in prefrence over Seller´s Name.

This commit is contained in:
langfr
2025-06-24 15:22:45 +01:00
parent dfcc5f1a1c
commit ce0941848d
2 changed files with 13 additions and 3 deletions

View File

@@ -351,6 +351,16 @@ public class ZUGFeRDImporter extends ZUGFeRDInvoiceImporter {
public String getHolder() {
if (importedInvoice!=null && importedInvoice.getTradeSettlement()!=null) {
for (IZUGFeRDTradeSettlement settlement : importedInvoice.getTradeSettlement()) {
if (settlement instanceof IZUGFeRDTradeSettlementPayment) {
String s = ((IZUGFeRDTradeSettlementPayment) settlement).getAccountName();
if ( s != null ) {
return s;
}
}
}
}
return extractString("//*[local-name() = 'SellerTradeParty']/*[local-name() = 'Name']");
}