Skip to content

Commit

Permalink
paid for all, split evenly (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
mertd authored Jan 26, 2024
1 parent 545cf75 commit 58ee685
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/expense-form.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ export function ExpenseForm({
expenseDate: new Date(),
amount: 0,
category: 0, // category with Id 0 is General
paidFor: [],
// paid for all, split evenly
paidFor: group.participants.map(({ id }) => ({
participant: id,
shares: 1,
})),
paidBy: getSelectedPayer(),
isReimbursement: false,
splitMode: 'EVENLY',
Expand Down

0 comments on commit 58ee685

Please sign in to comment.