jw
val incomeAmount = when (incomeType) { IncomeType.INTEREST -> interestPayers.sumBy { it.payerAmount } IncomeType.DIVIDEND -> dividendPayers.sumBy { it.payerAmount } else -> ... }