Changeset - 89aaae821b30
[Not reviewed]
0 2 0
Brett Smith - 4 years ago 2020-03-18 20:25:37
brettcsmith@brettcsmith.org
data.Account: Exclude PrepaidVacation from "real" assets.

Same rationale as PrepaidExpenses.
2 files changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/data.py
Show inline comments
...
 
@@ -39,6 +39,7 @@ class Account(str):
 
        return (
 
            self.is_under('Assets:')
 
            and not self.is_under('Assets:PrepaidExpenses')
 
            and not self.is_under('Assets:PrepaidVacation')
 
        )
 

	
 
    def is_under(self, acct_s: str) -> bool:
tests/test_data_account.py
Show inline comments
...
 
@@ -37,6 +37,7 @@ def test_is_under(acct_name, under_arg, expected):
 
    ('Assets:Cash', True),
 
    ('Assets:Cash:EUR', True),
 
    ('Assets:PrepaidExpenses', False),
 
    ('Assets:PrepaidVacation', False),
 
    ('Assets:Bank:Checking', True),
 
    ('Expenses:General', False),
 
    ('Income:Donations', False),
0 comments (0 inline, 0 general)