split_expense
Calculates who owes whom after dividing an expense among members, supporting equal shares or custom shares that must sum to the total.
Instructions
Split an expense and simplify who owes whom.
Equal split: the remainder poisha go to the first members, so the shares always add up exactly. Custom split: shares must sum exactly to the total, otherwise a validation error is returned.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| members | Yes | ||
| paid_by | Yes | ||
| total_amount | Yes | ||
| custom_shares | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |