fix: align total costs with visible budgets
This commit is contained in:
@@ -180,3 +180,18 @@ def test_personal_account_names_fill_with_admin_if_only_one_editor_is_active(app
|
||||
|
||||
assert personal_labels["persoenlich-flo"] == "Person A"
|
||||
assert personal_labels["persoenlich-desi"] == "Admin"
|
||||
|
||||
|
||||
def test_compute_summary_ignores_inactive_budget_entries(app):
|
||||
service = app.extensions["saldo.month_service"]
|
||||
month = Month.query.filter_by(label="2026-04").first()
|
||||
value = next(item for item in month.entry_values if item.entry.name == "Miete")
|
||||
|
||||
baseline = service.compute_summary(month)
|
||||
value.entry.is_active = False
|
||||
db.session.commit()
|
||||
|
||||
summary = service.compute_summary(month)
|
||||
|
||||
assert summary.fixed_costs == baseline.fixed_costs - Decimal("920.00")
|
||||
assert summary.total_costs == baseline.total_costs - Decimal("920.00")
|
||||
|
||||
Reference in New Issue
Block a user