Use ZUGFeRD2PullProvider#buildNotes in inherited classes

This commit is contained in:
Sebastian Sieber
2023-07-13 12:04:01 +02:00
parent 96f26439d4
commit b1bced360b
4 changed files with 33 additions and 65 deletions

View File

@@ -22,6 +22,7 @@ package org.mustangproject;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Date;
import java.util.List;
@@ -679,6 +680,17 @@ public class Invoice implements IExportableTransaction {
return this;
}
public Invoice addNotes(Collection<IncludedNote> notes) {
if (notes == null) {
return this;
}
if (includedNotes == null) {
includedNotes = new ArrayList<>();
}
includedNotes.addAll(notes);
return this;
}
/**
* adds a free text paragraph, which will become an includedNote element with explicit
* subjectCode {@link SubjectCode#AAI}