Merge branch 'ZUGFeRD:master' into master

This commit is contained in:
Kemal Taskin
2024-12-05 09:21:56 +01:00
committed by GitHub
4 changed files with 21 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 -> {
@@ -233,6 +232,11 @@ public class Item implements IZUGFeRDExportableItem {
return lineTotalAmount;
}
public Item setNotesWithSubjectCode(List<IncludedNote> theList) {
includedNotes=theList;
return this;
}
/**
* should only be set by calculator classes or maybe when reading from XML
*
@@ -378,6 +382,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;
}