prevent accidental invoice template updates (#3493)
This commit is contained in:
@@ -465,6 +465,9 @@ final class ServiceInvoice
|
||||
throw new \Exception('Cannot create invoice model without template');
|
||||
}
|
||||
|
||||
// prevent that changes on the template will be persisted
|
||||
$this->invoiceRepository->preventTemplateUpdate($template);
|
||||
|
||||
if (null === $template->getLanguage()) {
|
||||
$template->setLanguage(Constants::DEFAULT_LOCALE);
|
||||
@trigger_error('Using invoice templates without a language is is deprecated and trigger and will throw an exception with 2.0', E_USER_DEPRECATED);
|
||||
|
||||
Reference in New Issue
Block a user