From c4e0d565bcde891beea87300be79fa4f742657e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bar=C3=A1=C5=A1ek?= Date: Mon, 7 Feb 2022 21:47:07 +0100 Subject: [PATCH] Overview: Show safe regenerate button when invoice has been created in past. --- templates/overview.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/templates/overview.js b/templates/overview.js index c107e48..dbe1449 100644 --- a/templates/overview.js +++ b/templates/overview.js @@ -233,8 +233,11 @@ Vue.component('cms-order-overview', {
Invoice
-
- Create +
+ + + +

No invoice.

@@ -546,6 +549,9 @@ Vue.component('cms-order-overview', { }); }, createInvoice() { + if (this.order.invoiceNumber !== null && confirm('Do you really want to re-generate the invoice?') === false) { + return; + } axiosApi.post('cms-order/create-invoice', { id: this.id }).then(() => {