Release 1.29 (#3622)

This commit is contained in:
Kevin Papst
2022-11-06 20:44:30 +01:00
committed by GitHub
parent 323baa2d65
commit 608a45408a
6 changed files with 22 additions and 8 deletions

View File

@@ -525,13 +525,17 @@ final class InvoiceController extends AbstractController
foreach ($documentRepository->findBuiltIn() as $doc) {
if ($doc->getId() === $id) {
throw new \Exception('Document is built-in and cannot be deleted');
$this->flashError('Document is built-in and cannot be deleted.');
return $this->redirectToRoute('admin_invoice_document_upload');
}
}
foreach ($this->templateRepository->findAll() as $template) {
if ($template->getRenderer() === $id) {
throw new \Exception('Document is used and cannot be deleted');
$this->flashError('Document is used and cannot be deleted.');
return $this->redirectToRoute('admin_invoice_document_upload');
}
}