You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: frontend/src/lib/i18n/locales/de.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@
18
18
"Appearance heading": "Darstellung",
19
19
"Applies to invoice headings and status labels": "Gilt für Rechnungstitel und Statusbezeichnungen",
20
20
"Apply": "Anwenden",
21
+
"Allow editing and deleting sent/paid invoices": "Bearbeiten und Löschen von gesendeten/bezahlten Rechnungen erlauben",
22
+
"Allowing edits/deletes for sent or paid invoices can violate invoice retention laws. Only enable this if you understand the legal impact.": "Das Bearbeiten/Löschen von gesendeten oder bezahlten Rechnungen kann gegen Aufbewahrungspflichten verstoßen. Aktivieren Sie dies nur, wenn Sie die rechtlichen Folgen kennen.",
21
23
"Are you sure?": "Sind Sie sicher?",
22
24
"Back to Customer": "Zurück zum Kunden",
23
25
"Bank Account": "Bankkonto",
@@ -336,6 +338,7 @@
336
338
"View all": "Alle anzeigen",
337
339
"View public link": "Öffentlichen Link anzeigen",
338
340
"Void Invoice": "Rechnung stornieren",
341
+
"Warning: you are editing a sent/paid invoice. Ensure this is legally allowed in your jurisdiction.": "Warnung: Sie bearbeiten eine gesendete/bezahlte Rechnung. Stellen Sie sicher, dass dies in Ihrer Rechtsordnung zulässig ist.",
339
342
"Void this invoice? The invoice will be preserved but marked as voided.": "Diese Rechnung stornieren? Die Rechnung wird aufbewahrt, aber als storniert markiert.",
340
343
"Voided": "Storniert",
341
344
"What you need to do:": "Was Sie tun müssen:",
@@ -344,6 +347,8 @@
344
347
"XML profiles helper": "Profile sind momentan nur eingebaut. UBL 2.1 ist der Standard und bevorzugt für E-Rechnungs Netzwerke (PEPPOL). Das stub Profile ist für interne Testzwecke.",
"You are about to delete a sent/paid invoice. This may violate invoice retention laws and cannot be undone. Continue?": "Sie sind dabei, eine gesendete/bezahlte Rechnung zu löschen. Dies kann gegen Aufbewahrungspflichten verstoßen und kann nicht rückgängig gemacht werden. Fortfahren?",
351
+
"You are about to edit a sent/paid invoice. Ensure this is legally allowed in your jurisdiction. Continue?": "Sie sind dabei, eine gesendete/bezahlte Rechnung zu bearbeiten. Stellen Sie sicher, dass dies in Ihrer Rechtsordnung zulässig ist. Fortfahren?",
Copy file name to clipboardExpand all lines: frontend/src/lib/i18n/locales/en.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -10,6 +10,8 @@
10
10
"2FA code": "2FA code",
11
11
"2FA QR code": "2FA QR code",
12
12
"Adjust the look and feel of the application.": "Adjust the look and feel of the application.",
13
+
"Allow editing and deleting sent/paid invoices": "Allow editing and deleting sent/paid invoices",
14
+
"Allowing edits/deletes for sent or paid invoices can violate invoice retention laws. Only enable this if you understand the legal impact.": "Allowing edits/deletes for sent or paid invoices can violate invoice retention laws. Only enable this if you understand the legal impact.",
13
15
"Admin": "Admin",
14
16
"Administrator": "Administrator",
15
17
"Administrators have full access to all features.": "Administrators have full access to all features.",
@@ -271,6 +273,7 @@
271
273
"View HTML": "View HTML",
272
274
"View public link": "View public link",
273
275
"Void Invoice": "Void Invoice",
276
+
"Warning: you are editing a sent/paid invoice. Ensure this is legally allowed in your jurisdiction.": "Warning: you are editing a sent/paid invoice. Ensure this is legally allowed in your jurisdiction.",
274
277
"Void this invoice?": "Void this invoice?",
275
278
"Voided": "Voided",
276
279
"Welcome to Invio": "Welcome to Invio",
@@ -280,6 +283,8 @@
280
283
"XML Profile ID": "XML Profile ID",
281
284
"Yes": "Yes",
282
285
"Yes, disable": "Yes, disable",
286
+
"You are about to delete a sent/paid invoice. This may violate invoice retention laws and cannot be undone. Continue?": "You are about to delete a sent/paid invoice. This may violate invoice retention laws and cannot be undone. Continue?",
287
+
"You are about to edit a sent/paid invoice. Ensure this is legally allowed in your jurisdiction. Continue?": "You are about to edit a sent/paid invoice. Ensure this is legally allowed in your jurisdiction. Continue?",
283
288
"You do not have permission to modify settings.": "You do not have permission to modify settings.",
284
289
"You do not have permission to view customers. Contact an administrator to request access.": "You do not have permission to view customers. Contact an administrator to request access.",
285
290
"You do not have permission to view invoices. Contact an administrator to request access.": "You do not have permission to view invoices. Contact an administrator to request access.",
Copy file name to clipboardExpand all lines: frontend/src/lib/i18n/locales/nl.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@
18
18
"Appearance heading": "Weergave",
19
19
"Applies to invoice headings and status labels": "Van toepassing op factuurtitels en statuslabels",
20
20
"Apply": "Toepassen",
21
+
"Allow editing and deleting sent/paid invoices": "Bewerken en verwijderen van verzonden/betaalde facturen toestaan",
22
+
"Allowing edits/deletes for sent or paid invoices can violate invoice retention laws. Only enable this if you understand the legal impact.": "Het bewerken/verwijderen van verzonden of betaalde facturen kan in strijd zijn met de bewaarplicht. Schakel dit alleen in als je de juridische gevolgen begrijpt.",
21
23
"Are you sure?": "Weet je het zeker?",
22
24
"Back to Customer": "Terug naar klant",
23
25
"Bank Account": "Bankrekening",
@@ -336,6 +338,7 @@
336
338
"View all": "Alles bekijken",
337
339
"View public link": "Openbare link bekijken",
338
340
"Void Invoice": "Factuur nietig verklaren",
341
+
"Warning: you are editing a sent/paid invoice. Ensure this is legally allowed in your jurisdiction.": "Waarschuwing: je bewerkt een verzonden/betaalde factuur. Controleer of dit juridisch is toegestaan in jouw rechtsgebied.",
339
342
"Void this invoice? The invoice will be preserved but marked as voided.": "Deze factuur nietig verklaren? De factuur wordt bewaard maar gemarkeerd als nietig.",
340
343
"Voided": "Nietig",
341
344
"What you need to do:": "Wat je moet doen:",
@@ -344,6 +347,8 @@
344
347
"XML profiles helper": "Profielen zijn momenteel alleen ingebouwd. UBL 2.1 is de standaard en heeft de voorkeur voor e-factuurnetwerken (PEPPOL). Het stub-profiel is voor interne tests.",
"You are about to delete a sent/paid invoice. This may violate invoice retention laws and cannot be undone. Continue?": "Je staat op het punt een verzonden/betaalde factuur te verwijderen. Dit kan in strijd zijn met de bewaarplicht en kan niet ongedaan worden gemaakt. Doorgaan?",
351
+
"You are about to edit a sent/paid invoice. Ensure this is legally allowed in your jurisdiction. Continue?": "Je staat op het punt een verzonden/betaalde factuur te bewerken. Controleer of dit juridisch is toegestaan in jouw rechtsgebied. Doorgaan?",
Copy file name to clipboardExpand all lines: frontend/src/lib/i18n/locales/pt-br.json
+5Lines changed: 5 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@
18
18
"Appearance heading": "Aparência",
19
19
"Applies to invoice headings and status labels": "Aplica-se aos cabeçalhos da fatura e etiquetas de status",
20
20
"Apply": "Aplicar",
21
+
"Allow editing and deleting sent/paid invoices": "Permitir edição e exclusão de faturas enviadas/pagas",
22
+
"Allowing edits/deletes for sent or paid invoices can violate invoice retention laws. Only enable this if you understand the legal impact.": "Permitir edições/exclusões em faturas enviadas ou pagas pode violar leis de retenção de faturas. Ative apenas se você entender o impacto legal.",
21
23
"Are you sure?": "Tem certeza?",
22
24
"Back to Customer": "Voltar ao Cliente",
23
25
"Bank Account": "Conta Bancária",
@@ -336,6 +338,7 @@
336
338
"View all": "Ver tudo",
337
339
"View public link": "Ver link público",
338
340
"Void Invoice": "Anular fatura",
341
+
"Warning: you are editing a sent/paid invoice. Ensure this is legally allowed in your jurisdiction.": "Aviso: você está editando uma fatura enviada/paga. Garanta que isso seja legalmente permitido na sua jurisdição.",
339
342
"Void this invoice? The invoice will be preserved but marked as voided.": "Anular esta fatura? A fatura será preservada, mas marcada como anulada.",
340
343
"Voided": "Anulada",
341
344
"What you need to do:": "O que você precisa fazer:",
@@ -344,6 +347,8 @@
344
347
"XML profiles helper": "Os perfis atualmente são apenas integrados. O UBL 2.1 é o padrão e preferido para redes de faturamento eletrônico (PEPPOL). O perfil 'stub' é para testes internos.",
"You are about to delete a sent/paid invoice. This may violate invoice retention laws and cannot be undone. Continue?": "Você está prestes a excluir uma fatura enviada/paga. Isso pode violar leis de retenção de faturas e não pode ser desfeito. Continuar?",
351
+
"You are about to edit a sent/paid invoice. Ensure this is legally allowed in your jurisdiction. Continue?": "Você está prestes a editar uma fatura enviada/paga. Garanta que isso seja legalmente permitido na sua jurisdição. Continuar?",
Copy file name to clipboardExpand all lines: frontend/src/routes/invoices/[id]/+page.svelte
+27-6Lines changed: 27 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,10 @@
31
31
let canDelete =$derived(hasPermission(user, "invoices", "delete"));
32
32
let canPublish =$derived(hasPermission(user, "invoices", "publish"));
33
33
let canVoid =$derived(hasPermission(user, "invoices", "void"));
34
+
let allowProtectedInvoiceChanges =$derived(Boolean(data.allowProtectedInvoiceChanges));
35
+
let isRetentionProtectedInvoice =$derived(invoice?.status==="sent"||invoice?.status==="paid"||invoice?.status==="complete"||invoice?.status==="overdue");
36
+
let canEditInvoice =$derived(canUpdate&&Boolean(invoice&& (invoice.status==="draft"|| (allowProtectedInvoiceChanges&&invoice.status!=="voided"))));
37
+
let canDeleteInvoice =$derived(canDelete&&Boolean(invoice&& (invoice.status==="draft"||invoice.status==="voided"|| (allowProtectedInvoiceChanges&&invoice.status!=="voided"))));
34
38
35
39
let paidPaymentMethod =$state("");
36
40
@@ -64,11 +68,19 @@
64
68
alert(t("Link copied!"));
65
69
}
66
70
67
-
function confirmAction(message:string):SubmitFunction {
71
+
function confirmAction(message:string| (() =>string)):SubmitFunction {
68
72
return ({ cancel }) => {
69
-
if (!confirm(message)) cancel();
73
+
const text =typeofmessage==="function"?message() :message;
74
+
if (!confirm(text)) cancel();
70
75
};
71
76
}
77
+
78
+
function confirmEditNavigation(event:MouseEvent) {
79
+
if (!allowProtectedInvoiceChanges||!isRetentionProtectedInvoice) return;
80
+
if (!confirm(t("You are about to edit a sent/paid invoice. Ensure this is legally allowed in your jurisdiction. Continue?"))) {
81
+
event.preventDefault();
82
+
}
83
+
}
72
84
</script>
73
85
74
86
<divclass="mb-6">
@@ -156,14 +168,23 @@
156
168
<formid="inv-void"method="post"class="hidden"use:enhance={confirmAction(t("Void this invoice?"))}>
157
169
<inputtype="hidden"name="intent"value="void" />
158
170
</form>
159
-
<formid="inv-delete"method="post"class="hidden"use:enhance={confirmAction(t("Delete this invoice? This cannot be undone."))}>
171
+
<form
172
+
id="inv-delete"
173
+
method="post"
174
+
class="hidden"
175
+
use:enhance={confirmAction(() =>
176
+
isRetentionProtectedInvoice
177
+
?t("You are about to delete a sent/paid invoice. This may violate invoice retention laws and cannot be undone. Continue?")
178
+
:t("Delete this invoice? This cannot be undone."),
0 commit comments