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

@@ -165,6 +165,13 @@ export interface FinanceRepository {
currency: CurrencyCode
createdByMemberId: string
}): Promise<void>
updateParsedPurchase(input: {
purchaseId: string
amountMinor: bigint
currency: CurrencyCode
description: string | null
}): Promise<FinanceParsedPurchaseRecord | null>
deleteParsedPurchase(purchaseId: string): Promise<boolean>
updateUtilityBill(input: {
billId: string
billName: string
@@ -172,6 +179,22 @@ export interface FinanceRepository {
currency: CurrencyCode
}): Promise<FinanceUtilityBillRecord | null>
deleteUtilityBill(billId: string): Promise<boolean>
addPaymentRecord(input: {
cycleId: string
memberId: string
kind: FinancePaymentKind
amountMinor: bigint
currency: CurrencyCode
recordedAt: Instant
}): Promise<FinancePaymentRecord>
updatePaymentRecord(input: {
paymentId: string
memberId: string
kind: FinancePaymentKind
amountMinor: bigint
currency: CurrencyCode
}): Promise<FinancePaymentRecord | null>
deletePaymentRecord(paymentId: string): Promise<boolean>
getRentRuleForPeriod(period: string): Promise<FinanceRentRuleRecord | null>
getUtilityTotalForCycle(cycleId: string): Promise<bigint>
listUtilityBillsForCycle(cycleId: string): Promise<readonly FinanceUtilityBillRecord[]>