feat: additional receipts as attachments to teamer invoices
addresses #869dv97u9
This commit is contained in:
1 parent
16d847137d
commit
52926ec6cc
29 files changed
+682
-23
No files matched your search
@@ -188,6 +188,20 @@ class Disposition implements BlameableEntityInterface, TimestampableEntityInterf
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Unlike getDocumentByType() this returns every match, for the types a disposition can hold
|
||||
* more than one of. Belege are the only such type today: there is exactly one Honorarvertrag
|
||||
* and one Honorarnote, but any number of receipts backing the latter.
|
||||
*
|
||||
* @return Collection<int, Upload>
|
||||
*/
|
||||
public function getDocumentsByType(string $type): Collection
|
||||
{
|
||||
return $this->documents->filter(function (Upload $upload) use ($type) {
|
||||
return $type === $upload->getType();
|
||||
});
|
||||
}
|
||||
|
||||
public function addDocument(Upload $document): static
|
||||
{
|
||||
if (!$this->documents->contains($document)) {
|
||||
|
||||
Reference in new issue
Block a user