- else:
- for currency, amount in booking.sink.items():
- moneys += {(amount, currency)}
- money = '['
- for m in moneys:
- money += f'{m[0]} {m[1]} '
- money += ']'
- balance = ''
- for amount, currency in moneys:
- path = ''
- for tok in account_toks:
- path += tok
- if not currency in account_sums[path].keys():
- account_sums[path][currency] = 0
- account_sums[path][currency] += amount
- path += ':'
- balance += f'{account_sums[account][currency]} {currency}'
- booking_lines += [{'acc': booking_line[0], 'money':money, 'balance':balance}]
- elements_to_write += [booking_tmpl.render(
+ else: ##
+ for currency, amount in booking.sink.items(): ##
+ moneys += {(amount, currency)} ##
+ money = '[' ##
+ for m in moneys: ##
+ money += f'{m[0]} {m[1]} ' ##
+ money += ']' ##
+ balance = '' ##
+ for amount, currency in moneys: ##
+ path = '' ##
+ for tok in account_toks: ##
+ path += tok ##
+ if not currency in account_sums[path].keys(): ##
+ account_sums[path][currency] = 0 ##
+ account_sums[path][currency] += amount ##
+ path += ':' ##
+ balance += f'{account_sums[account][currency]} {currency}' ##
+ booking_lines += [{'acc': booking_line[0], 'money':money, 'comment':balance}] ##
+ elements_to_write += [self.booking_tmpl.render(