Release 1.29 (#3622)
This commit is contained in:
@@ -17,11 +17,11 @@ class Constants
|
||||
/**
|
||||
* The current release version
|
||||
*/
|
||||
public const VERSION = '1.28.1';
|
||||
public const VERSION = '1.29.0';
|
||||
/**
|
||||
* The current release: major * 10000 + minor * 100 + patch
|
||||
*/
|
||||
public const VERSION_ID = 12801;
|
||||
public const VERSION_ID = 12900;
|
||||
/**
|
||||
* The current release status, either "stable" or "dev"
|
||||
*/
|
||||
|
||||
@@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user