finance-mgn - v2.1.0
    Preparing search index...

    Function compareIncomesVsExpenses

    • Compares total incomes versus total expenses and calculates financial metrics.

      Parameters

      • incomes: Transaction[]

        Array of income transactions where each transaction contains financial data

      • expenses: Transaction[]

        Array of expense transactions where each transaction contains financial data

      Returns {
          expenseRatio: string;
          expensesTotal: string;
          incomesTotal: string;
          isPositive: boolean;
          netIncome: string;
          savingsRate: string;
          status: string;
      }

      An object containing calculated financial metrics including:

      • incomesTotal: Total income amount formatted as Czech currency
      • expensesTotal: Total expense amount formatted as Czech currency
      • netIncome: Net income (incomes - expenses) formatted as Czech currency
      • savingsRate: Percentage of income saved, formatted to 1 decimal place
      • expenseRatio: Percentage of income spent, formatted to 1 decimal place
      • isPositive: Boolean indicating if net income is positive
      • status: String describing financial status ('Surplus', 'Deficit', or 'Break Even')