feat(payments): track household payment confirmations

This commit is contained in:
2026-03-10 17:00:45 +04:00
parent fb85219409
commit 1988521931
31 changed files with 4795 additions and 19 deletions

View File

@@ -125,10 +125,25 @@ class FinanceRepositoryStub implements FinanceRepository {
return this.utilityBills
}
async listPaymentRecordsForCycle() {
return []
}
async listParsedPurchasesForRange(): Promise<readonly FinanceParsedPurchaseRecord[]> {
return this.purchases
}
async getSettlementSnapshotLines() {
return []
}
async savePaymentConfirmation() {
return {
status: 'needs_review' as const,
reviewReason: 'settlement_not_ready' as const
}
}
async replaceSettlementSnapshot(snapshot: SettlementSnapshotRecord): Promise<void> {
this.replacedSnapshot = snapshot
}
@@ -347,9 +362,11 @@ describe('createFinanceCommandService', () => {
[
'Statement for 2026-03',
'Rent: 700.00 USD (~1890.00 GEL)',
'- Alice: 990.00 GEL',
'- Bob: 1020.00 GEL',
'Total: 2010.00 GEL'
'- Alice: due 990.00 GEL, paid 0.00 GEL, remaining 990.00 GEL',
'- Bob: due 1020.00 GEL, paid 0.00 GEL, remaining 1020.00 GEL',
'Total due: 2010.00 GEL',
'Total paid: 0.00 GEL',
'Total remaining: 2010.00 GEL'
].join('\n')
)
expect(repository.replacedSnapshot).not.toBeNull()