+ show = ("Expenditure of %s paid for by %s %s." %
+ (e.amount, e.spender, op))
+ h.flash(show)
+
+ # Send email notification to involved users if they have an email set.
+ involved_users = set(sp.user for sp in e.splits if sp.share != 0)
+ involved_users.add(e.spender)
+ body = render('/emails/expenditure.txt',
+ extra_vars={'expenditure': e,
+ 'op': op})
+ g.handle_notification(involved_users, show, body)
+