Stabilize purchase functionality: fix ID prefix, uniqueness, and split participant inclusion

This commit is contained in:
2026-03-13 22:29:17 +04:00
parent 31dd1dc2ee
commit 1274cefc0f
14 changed files with 489 additions and 19 deletions

View File

@@ -172,6 +172,20 @@ export interface FinanceRepository {
currency: CurrencyCode
createdByMemberId: string
}): Promise<void>
addParsedPurchase(input: {
cycleId: string
payerMemberId: string
amountMinor: bigint
currency: CurrencyCode
description: string | null
occurredAt: Instant
splitMode?: 'equal' | 'custom_amounts'
participants?: readonly {
memberId: string
included?: boolean
shareAmountMinor: bigint | null
}[]
}): Promise<FinanceParsedPurchaseRecord>
updateParsedPurchase(input: {
purchaseId: string
amountMinor: bigint