dev #17

Merged
jkuijperm merged 4 commits from dev into main 2026-07-28 11:01:05 +00:00
2 changed files with 9 additions and 0 deletions
Showing only changes of commit 166a0b8d18 - Show all commits

View File

@ -623,6 +623,15 @@ def account_edit(request, pk):
@login_required @login_required
def account_delete(request, pk): def account_delete(request, pk):
"""Delete an account via *soft-delete* (sets active=False).
Unlike expense_delete, tag_delete or income_delete, which delete the
record for real, accounts are never physically removed: they are
deactivated. Historical expenses and incomes keep their ForeignKey to
the account, so balances and charts for past periods remain correct.
An inactive account disappears from forms (querysets filtered by
active=True) but stays visible and dimmed in the account list.
"""
account = get_object_or_404(Account, pk=pk, owner=request.user) account = get_object_or_404(Account, pk=pk, owner=request.user)
if request.method == "POST": if request.method == "POST":

Binary file not shown.