tax_implication: Bugfix "Corp" abbreviation in values.

This commit is contained in:
Brett Smith 2021-01-18 15:49:39 -05:00
parent 31cee4e0ba
commit 5c6d9d6f69
2 changed files with 3 additions and 1 deletions

View file

@ -31,7 +31,7 @@ def _make_aliases(s: str, stdname: Optional[str]=None) -> Iterator[Tuple[str, st
elif s.startswith('USA-'):
yield from _make_aliases(f'US-{s[4:]}', stdname)
if s.endswith('-Corporation'):
yield from _make_aliases(f's[:-12]-Corp', stdname)
yield from _make_aliases(f'{s[:-12]}-Corp', stdname)
class MetaTaxImplication(core._NormalizePostingMetadataHook):
_STDNAMES = [

View file

@ -20,6 +20,7 @@ VALID_VALUES = {
'Bank-Transfer': 'Bank-Transfer',
'Chargeback': 'Chargeback',
'Foreign-Corporation': 'Foreign-Corporation',
'foreign-corp': 'Foreign-Corporation',
'Foreign-Grantee': 'Foreign-Grantee',
'Foreign-Individual-Contractor': 'Foreign-Individual-Contractor',
'Loan': 'Loan',
@ -29,6 +30,7 @@ VALID_VALUES = {
'Tax-Payment': 'Tax-Payment',
'USA-501c3': 'USA-501c3',
'USA-Corporation': 'USA-Corporation',
'us-corp': 'USA-Corporation',
'USA-Grantee': 'USA-Grantee',
'US-Grantee': 'USA-Grantee',
'W2': 'W2',