fix(miniapp): show original ledger currencies

This commit is contained in:
2026-03-10 15:58:33 +04:00
parent d55bf42c7b
commit 4c0508f618
9 changed files with 35 additions and 12 deletions

View File

@@ -72,6 +72,7 @@ export interface FinanceDashboardLedgerEntry {
kind: 'purchase' | 'utility'
title: string
amount: Money
currency: CurrencyCode
actorDisplayName: string | null
occurredAt: string | null
}
@@ -182,6 +183,7 @@ async function buildFinanceDashboard(
kind: 'utility' as const,
title: bill.billName,
amount: Money.fromMinor(bill.amountMinor, bill.currency),
currency: bill.currency,
actorDisplayName: bill.createdByMemberId
? (memberNameById.get(bill.createdByMemberId) ?? null)
: null,
@@ -191,7 +193,8 @@ async function buildFinanceDashboard(
id: purchase.id,
kind: 'purchase' as const,
title: purchase.description ?? 'Shared purchase',
amount: Money.fromMinor(purchase.amountMinor, rentRule.currency),
amount: Money.fromMinor(purchase.amountMinor, purchase.currency),
currency: purchase.currency,
actorDisplayName: memberNameById.get(purchase.payerMemberId) ?? null,
occurredAt: purchase.occurredAt?.toString() ?? null
}))