Пример #1
0
def test_tree_cap(example_ledger):
    closing_entries = summarize.cap_opt(example_ledger.entries,
                                        example_ledger.options)
    real_account = realization.realize(closing_entries)

    tree = Tree(example_ledger.entries)
    tree.cap(example_ledger.options, 'Unrealized')

    for account in realization.iter_children(real_account):
        name = account.account
        node = tree[name]
        if not name:
            continue
        if name.startswith('Expenses') or name.startswith('Income'):
            continue
        _compare_inv_and_counter(account.balance, node.balance)
Пример #2
0
 def root_tree_closed(self):
     """A root tree for the balance sheet."""
     tree = Tree(self.entries)
     tree.cap(self.options, self.fava_options["unrealized"])
     return tree
Пример #3
0
 def root_tree_closed(self) -> Tree:
     """A root tree for the balance sheet."""
     tree = Tree(self.entries)
     tree.cap(self.ledger.options, self.ledger.fava_options.unrealized)
     return tree
Пример #4
0
 def root_tree_closed(self):
     """A root tree for the balance sheet."""
     tree = Tree(self.entries)
     tree.cap(self.options, self.fava_options['unrealized'])
     return tree