docs: def needs_settling(self, e: AccountEntry) -> bool:
          """
          Returns True if all of following conditions are True:
          a) entry type is settlement
          b) entry has been recorded to this account
          c) invoice to be settled has been set
          d) entry has not been settled (=child set empty)
          :param e: AccountEntry (settlement)
          :return: bool
          """
          return e.type and e.type.is_settlement and e.account.id == self.id and e.settled_invoice and AccountEntry.objects.filter(parent=e).count() == 0