Invoices: show only custom documents in upload form (#1786)

This commit is contained in:
Kevin Papst
2020-06-19 18:31:08 +02:00
committed by GitHub
parent 470a6b30e0
commit 381f46cdd8
16 changed files with 222 additions and 42 deletions

View File

@@ -134,10 +134,15 @@ final class ServiceInvoice
/**
* Returns an array of invoice renderer, which will consist of a unique name and a controller action.
*
* @param bool $customOnly
* @return InvoiceDocument[]
*/
public function getDocuments(): array
public function getDocuments(bool $customOnly = false): array
{
if ($customOnly) {
return $this->documents->findCustom();
}
return $this->documents->findAll();
}