test ubl item level note import

This commit is contained in:
jstaerk
2024-12-04 16:42:34 +01:00
parent f4036a5b6d
commit d61c20d05a
4 changed files with 16 additions and 3 deletions

View File

@@ -182,7 +182,6 @@ public class Item implements IZUGFeRDExportableItem {
icnm.getAllNodes("AdditionalReferencedDocument").map(ReferencedDocument::fromNode).forEach(this::addAdditionalReference);
});
itemMap.getAsString("Note").ifPresent(this::addNote);
itemMap.getAsNodeMap("AssociatedDocumentLineDocument").ifPresent(adld -> {
List<IncludedNote> includedNotes = new ArrayList<>();
adld.getAllNodes("IncludedNote").forEach(item -> {
@@ -378,6 +377,13 @@ public class Item implements IZUGFeRDExportableItem {
notes = new ArrayList<>();
}
notes.add(text);
if (includedNotes == null) {
includedNotes = new ArrayList<>();
}
includedNotes.add(IncludedNote.unspecifiedNote(text));
return this;
}