mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 11:54:03 +00:00
fix(miniapp): clarify cycle summary and balance sections
This commit is contained in:
@@ -140,6 +140,9 @@ export interface FinanceDashboardLedgerEntry {
|
||||
export interface FinanceDashboard {
|
||||
period: string
|
||||
currency: CurrencyCode
|
||||
timezone: string
|
||||
rentDueDay: number
|
||||
utilitiesDueDay: number
|
||||
paymentBalanceAdjustmentPolicy: 'utilities' | 'rent' | 'separate'
|
||||
totalDue: Money
|
||||
totalPaid: Money
|
||||
@@ -559,6 +562,9 @@ async function buildFinanceDashboard(
|
||||
return {
|
||||
period: cycle.period,
|
||||
currency: cycle.currency,
|
||||
timezone: settings.timezone,
|
||||
rentDueDay: settings.rentDueDay,
|
||||
utilitiesDueDay: settings.utilitiesDueDay,
|
||||
paymentBalanceAdjustmentPolicy: settings.paymentBalanceAdjustmentPolicy ?? 'utilities',
|
||||
totalDue: settlement.totalDue,
|
||||
totalPaid: paymentRecords.reduce(
|
||||
|
||||
@@ -112,6 +112,9 @@ describe('createPaymentConfirmationService', () => {
|
||||
generateDashboard: async () => ({
|
||||
period: '2026-03',
|
||||
currency: 'GEL',
|
||||
timezone: 'Asia/Tbilisi',
|
||||
rentDueDay: 20,
|
||||
utilitiesDueDay: 4,
|
||||
paymentBalanceAdjustmentPolicy: 'utilities',
|
||||
totalDue: Money.fromMajor('1030', 'GEL'),
|
||||
totalPaid: Money.zero('GEL'),
|
||||
@@ -175,6 +178,9 @@ describe('createPaymentConfirmationService', () => {
|
||||
generateDashboard: async () => ({
|
||||
period: '2026-03',
|
||||
currency: 'GEL',
|
||||
timezone: 'Asia/Tbilisi',
|
||||
rentDueDay: 20,
|
||||
utilitiesDueDay: 4,
|
||||
paymentBalanceAdjustmentPolicy: 'utilities',
|
||||
totalDue: Money.fromMajor('1030', 'GEL'),
|
||||
totalPaid: Money.zero('GEL'),
|
||||
|
||||
Reference in New Issue
Block a user