``` val incomeAmount = when (incomeType) { Incom...
# announcements
j
Copy code
val incomeAmount = when (incomeType) {
  IncomeType.INTEREST -> interestPayers.sumBy { it.payerAmount }
  IncomeType.DIVIDEND -> dividendPayers.sumBy { it.payerAmount }
  else -> ...
}