changed additional references by line from String to List and

implemented it on Item
This commit is contained in:
MellowGiant
2024-08-22 11:40:22 +02:00
parent 44d63a075e
commit 40f35d8764

View File

@@ -64,6 +64,7 @@ public class Item implements IZUGFeRDExportableItem {
String referencedLineID = null;
ArrayList<ReferencedDocument> rdocs = null;
ArrayList<ReferencedDocument> additionalReferences = null;
// nodes.item(i).getTextContent())) {
@@ -271,10 +272,10 @@ public class Item implements IZUGFeRDExportableItem {
ReferencedDocument rd = new ReferencedDocument(IssuerAssignedID, TypeCode,
ReferenceTypeCode);
if (rdocs == null) {
rdocs = new ArrayList<>();
if (additionalReferences == null) {
additionalReferences = new ArrayList<>();
}
rdocs.add(rd);
additionalReferences.add(rd);
}
@@ -304,6 +305,11 @@ public class Item implements IZUGFeRDExportableItem {
addReferencedDocument(rdoc);
}
}
if (additionalReferences != null) {
for (ReferencedDocument rdoc : additionalReferences) {
addAdditionalReference(rdoc);
}
}
addReferencedLineID( referencedLineID );
}