feat(finance): add billing correction APIs and cycle rollover

This commit is contained in:
2026-03-10 22:03:30 +04:00
parent 05561a397d
commit 753286a1f6
11 changed files with 943 additions and 26 deletions

View File

@@ -135,6 +135,11 @@ function onboardingRepository(): HouseholdConfigurationRepository {
function createFinanceServiceStub(): FinanceCommandService {
return {
getMemberByTelegramUserId: async () => null,
ensureExpectedCycle: async () => ({
id: 'cycle-2026-03',
period: '2026-03',
currency: 'USD'
}),
getOpenCycle: async () => ({
id: 'cycle-2026-03',
period: '2026-03',
@@ -187,6 +192,24 @@ function createFinanceServiceStub(): FinanceCommandService {
currency: 'USD'
}),
deleteUtilityBill: async () => true,
updatePurchase: async () => ({
purchaseId: 'purchase-1',
amount: Money.fromMinor(3000n, 'USD'),
currency: 'USD'
}),
deletePurchase: async () => true,
addPayment: async () => ({
paymentId: 'payment-1',
amount: Money.fromMinor(10000n, 'USD'),
currency: 'USD',
period: '2026-03'
}),
updatePayment: async () => ({
paymentId: 'payment-1',
amount: Money.fromMinor(10000n, 'USD'),
currency: 'USD'
}),
deletePayment: async () => true,
generateDashboard: async () => null,
generateStatement: async () => null
}