feat: unify income payment cards and drop period comparisons (WealthLedger/main#33) (#83)
feat: unify income payment cards and drop period comparisons (WealthLedger/main#33)
This commit was merged in pull request #83.
This commit is contained in:
@@ -2,6 +2,7 @@ import { BadRequestException, Injectable } from '@nestjs/common';
|
||||
|
||||
import {
|
||||
add,
|
||||
type Decimal,
|
||||
decimalFromString,
|
||||
formatDecimal,
|
||||
isZero,
|
||||
@@ -280,7 +281,7 @@ function dateWindow(query: UpcomingEventsQueryDto) {
|
||||
}
|
||||
|
||||
function incomeTotals(events: UpcomingEventDto[]): MoneyDto[] {
|
||||
const totals = new Map<string, ReturnType<typeof decimalFromString>>();
|
||||
const totals = new Map<string, Decimal>();
|
||||
for (const event of events) {
|
||||
if (!['coupon', 'dividend'].includes(event.type) || !event.projectedAmount) {
|
||||
continue;
|
||||
|
||||
Reference in New Issue
Block a user