docs: def get_item_balances(self, acc: Account) -> list:
          """
          Returns balances of items of the invoice.
          :param acc: Account
          :return: list (AccountEntry, Decimal) in item id order
          """
          items = []
          entries = self.get_entries(acc)
          for item in entries.filter(source_invoice=self).order_by('id'):
              assert isinstance(item, AccountEntry)
              settlements = sum_queryset(entries.filter(settled_item=item))
              bal = item.amount + settlements if item.amount is not None else settlements
              items.append((item, bal))
          return items