Caring Brothers B.V. I think you could label the 50 euro you got back from your friend with “food” too.
Hopefully the negative will make it correct again.
This could be automated though since the system knows you split it.
A different strategy would be with an outbox. You pay with this subaccount and then split the bill with another subaccount and your friend. (0%, 50%, 50%).
You mark every payment as hidden except the one from yourself to yourself. (€50)