Loading muffin/analysis/CashFlowAnalysis.py +11 −1 Original line number Diff line number Diff line from pathlib import Path from itertools import chain from dataclasses import dataclass from typing import Self from decimal import Decimal Loading Loading @@ -57,7 +58,16 @@ class CashFlowAnalysis: @property def total_income(self) -> Decimal: pass # Assignments (Zuweisungen) and reserves (Rücklagen) is the only kind of income we automatically get assignments = self.budget_plan.group("1") reserves = self.budget_plan.group("3") return sum( item.amount for item in chain( assignments.items if assignments else [], reserves.items if reserves else [] ) ) @property def total_expenses(self) -> Decimal: Loading Loading
muffin/analysis/CashFlowAnalysis.py +11 −1 Original line number Diff line number Diff line from pathlib import Path from itertools import chain from dataclasses import dataclass from typing import Self from decimal import Decimal Loading Loading @@ -57,7 +58,16 @@ class CashFlowAnalysis: @property def total_income(self) -> Decimal: pass # Assignments (Zuweisungen) and reserves (Rücklagen) is the only kind of income we automatically get assignments = self.budget_plan.group("1") reserves = self.budget_plan.group("3") return sum( item.amount for item in chain( assignments.items if assignments else [], reserves.items if reserves else [] ) ) @property def total_expenses(self) -> Decimal: Loading