dev #17
@ -623,6 +623,15 @@ def account_edit(request, pk):
|
||||
|
||||
@login_required
|
||||
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)
|
||||
|
||||
if request.method == "POST":
|
||||
|
||||
Binary file not shown.
Loading…
Reference in New Issue
Block a user