We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71c561a commit b04dd36Copy full SHA for b04dd36
src/store/addStore.ts
@@ -270,7 +270,7 @@ export function calculateSplitShareBasedOnAmount(
270
// For equal split, split share should be amount/participants or 0 if amount is 0
271
updatedParticipants = participants.map((p) => ({
272
...p,
273
- splitShare: p.amount === 0 ? 0 : 1,
+ splitShare: (paidBy?.id === p.id ? (p.amount ?? 0) - amount : p.amount) === 0 ? 0 : 1,
274
}));
275
break;
276
0 commit comments