Withdraw to deduct

* refactors Models and attributes
This commit is contained in:
mipel
2021-08-30 11:34:35 +02:00
parent 3f6f576095
commit 50a3e6a21c
5 changed files with 14 additions and 14 deletions

View File

@@ -97,7 +97,7 @@ def open_view(request: HttpRequest, id: str):
# Calculate rest of available surface for deductions
available = acc.get_available_rest(as_percentage=True)
deductions = acc.withdraws.filter(
deductions = acc.deductions.filter(
intervention__deleted=None,
)
@@ -156,7 +156,7 @@ def deduction_remove_view(request: HttpRequest, id: str, deduction_id: str):
"""
acc = get_object_or_404(EcoAccount, id=id)
try:
eco_deduction = acc.withdraws.get(id=deduction_id)
eco_deduction = acc.deductions.get(id=deduction_id)
except ObjectDoesNotExist:
raise Http404("Unknown deduction")