Withdraw to deduct
* refactors Models and attributes
This commit is contained in:
@@ -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")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user