income_type: Set a default for TrademarkSales. RT#8869.

This commit is contained in:
Brett Smith 2020-06-25 13:52:37 -04:00
parent f3c68ff462
commit 9699f4e527
2 changed files with 2 additions and 0 deletions

View file

@ -40,6 +40,7 @@ class MetaIncomeType(core._NormalizePostingMetadataHook):
'Income:Sales': 'RBI',
'Income:SoftwareDevelopment': 'RBI',
'Income:TrademarkLicensing': 'RBI',
'Income:TrademarkSales': 'RBI',
}
def _run_on_post(self, txn: Transaction, post: data.Posting) -> bool:

View file

@ -111,6 +111,7 @@ def test_non_income_accounts_skipped(hook, account):
('Income:Sales', 'RBI'),
('Income:SoftwareDevelopment', 'RBI'),
('Income:TrademarkLicensing', 'RBI'),
('Income:TrademarkSales', 'RBI'),
])
def test_default_values(hook, account, set_value):
txn = testutil.Transaction(postings=[