continue
wealth_before = accounts_before[path].wealth
wealth_after = accounts_after[path].wealth
- diff = {c: a for c, a in (wealth_after - wealth_before
- ).moneys.items()
- if a != 0}
- if diff:
+ directly_set = full_name == path
+ diff = {
+ c: a for c, a in (wealth_after - wealth_before
+ ).moneys.items()
+ if a != 0
+ or (directly_set
+ and c in booking.account_changes[full_name].moneys)}
+ if diff or directly_set:
displayed_currencies = set(diff.keys())
for wealth in wealth_before, wealth_after:
wealth.ensure_currencies(displayed_currencies)