Merge pull request #741 from InnuceEAN/position_accounting_reference

read position accountingReference
This commit is contained in:
Jochen Staerk
2025-04-01 16:30:45 +02:00
committed by GitHub
3 changed files with 24 additions and 0 deletions

View File

@@ -42,6 +42,7 @@ public class Item implements IZUGFeRDExportableItem {
protected ArrayList<IZUGFeRDAllowanceCharge> Allowances = new ArrayList<>();
protected ArrayList<IZUGFeRDAllowanceCharge> Charges = new ArrayList<>();
protected List<IncludedNote> includedNotes = null;
protected String accountingReference;
//protected HashMap<String, String> attributes = new HashMap<>();
/***
@@ -214,6 +215,8 @@ public class Item implements IZUGFeRDExportableItem {
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).forEach(this::addAdditionalReference);
icnm.getAsString("ReceivableSpecifiedTradeAccountingAccount").ifPresent(s -> this.accountingReference = s == null ? null : s.trim());
icnm.getAsNodeMap("BillingSpecifiedPeriod").ifPresent(periodNode -> {
Date start = periodNode.getAsNodeMap("StartDateTime").flatMap(dateTimeNode -> dateTimeNode.getNode("DateTimeString")).map(dts -> XMLTools.tryDate(dts)).orElse(null);
Date end = periodNode.getAsNodeMap("EndDateTime").flatMap(dateTimeNode -> dateTimeNode.getNode("DateTimeString")).map(dts -> XMLTools.tryDate(dts)).orElse(null);
@@ -561,4 +564,9 @@ public class Item implements IZUGFeRDExportableItem {
public List<IncludedNote> getNotesWithSubjectCode() {
return includedNotes;
}
@Override
public String getAccountingReference() {
return accountingReference;
}
}

View File

@@ -172,4 +172,8 @@ public interface IZUGFeRDExportableItem extends IAbsoluteValueProvider{
default List<IncludedNote> getNotesWithSubjectCode() {
return null;
}
default String getAccountingReference() {
return null;
}
}