Drop deductions of deleted intervention #322
Labels
No Label
backlog
bug
duplicate
enhancement
feature
help wanted
invalid
question
wontfix
bug
duplicate
enhancement
help wanted
in discussion
invalid
priority
1
priority
2
priority
3
priority
4
priority
5
question
wontfix
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: IT-Naturschutz/konova#322
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Status quo
If an intervention is marked as deleted and therefore hidden for the user, its deductions are still substracted from the related ecoaccount's rest surface.
Solution
At the very moment an intervention is being deleted, it's deductions should be dropped completely from the database. In the end, the recalculation of the ecoaccount's
deductable_rest
should be performed.Could we not simply keep the 'removed' deductions and recalculate without them?
No - if the deleted intervention would be recovered, the recalculation of
deductable_rest
should be run again. At this moment, the ecoaccount balance could suddenly overflow into a negative area, since it already might be at 0 fordeductable_rest
.If a once deleted intervention should be recovered, the old deductions should be gone to avoid conflicts with newer deductions from the account.
Merged in #323