mirror of
https://github.com/whekin/household-bot.git
synced 2026-03-31 13:54:02 +00:00
feat(purchase): add per-purchase participant splits
This commit is contained in:
@@ -22,5 +22,6 @@ export type {
|
||||
SettlementMemberLine,
|
||||
SettlementPurchaseInput,
|
||||
SettlementResult,
|
||||
PurchaseSplitMode,
|
||||
UtilitySplitMode
|
||||
} from './settlement-primitives'
|
||||
|
||||
@@ -3,6 +3,7 @@ import type { BillingCycleId, MemberId, PurchaseEntryId } from './ids'
|
||||
import type { Money } from './money'
|
||||
|
||||
export type UtilitySplitMode = 'equal' | 'weighted_by_days'
|
||||
export type PurchaseSplitMode = 'equal' | 'custom_amounts'
|
||||
|
||||
export interface SettlementMemberInput {
|
||||
memberId: MemberId
|
||||
@@ -19,6 +20,11 @@ export interface SettlementPurchaseInput {
|
||||
payerId: MemberId
|
||||
amount: Money
|
||||
description?: string
|
||||
splitMode?: PurchaseSplitMode
|
||||
participants?: readonly {
|
||||
memberId: MemberId
|
||||
shareAmount?: Money
|
||||
}[]
|
||||
}
|
||||
|
||||
export interface SettlementInput {
|
||||
|
||||
Reference in New Issue
Block a user