diff --git a/nummi/main/templates/main/transaction.html b/nummi/main/templates/main/transaction.html
index 17b9a30..78e8355 100644
--- a/nummi/main/templates/main/transaction.html
+++ b/nummi/main/templates/main/transaction.html
@@ -18,6 +18,7 @@
{{ field }}
{% endfor %}
diff --git a/nummi/main/urls.py b/nummi/main/urls.py
index 384ab79..44141fd 100644
--- a/nummi/main/urls.py
+++ b/nummi/main/urls.py
@@ -11,6 +11,7 @@ urlpatterns = [
path(
"transaction//update", views.update_transaction, name="update_transaction"
),
+ path("transaction//del", views.del_transaction, name="del_transaction"),
path("transaction//add_invoice", views.add_invoice, name="add_invoice"),
path(
"transaction//del_invoice/",
diff --git a/nummi/main/views.py b/nummi/main/views.py
index 3bd4e6b..b429579 100644
--- a/nummi/main/views.py
+++ b/nummi/main/views.py
@@ -66,6 +66,13 @@ def update_transaction(request, uuid):
return redirect(transaction, uuid=uuid)
+@login_required
+def del_transaction(request, uuid):
+ _transaction = get_object_or_404(Transaction, id=uuid)
+ _transaction.delete()
+ return redirect(index)
+
+
@login_required
def invoice(request, uuid):
_invoice = get_object_or_404(Invoice, id=uuid)