Verified Commit 7c07a38b authored by Jakob Moser's avatar Jakob Moser
Browse files

Draft more properties

parent 6846a1bc
Loading
Loading
Loading
Loading
+12 −0
Original line number Diff line number Diff line
@@ -55,6 +55,18 @@ class CashFlowAnalysis:
            colalign=("right", "left", "right", "right", "right"),
        )

    @property
    def total_income(self) -> Decimal:
        pass

    @property
    def total_expenses(self) -> Decimal:
        return sum(po.amount for po in self.payment_orders)

    @property
    def balance(self) -> Decimal:
        return self.total_income - self.total_expenses

    @classmethod
    def from_files(cls, payment_orders_path: Path, budget_plan_path: Path) -> Self:
        budget_plan = load_pdf(budget_plan_path)