For each item or group, set the payer and who’s splitting it just once — even if the group has several line items — and it works out who owes whom.