diff --git a/conservancy_beancount/plugin/meta_tax_implication.py b/conservancy_beancount/plugin/meta_tax_implication.py index af2cb41..a0e7b28 100644 --- a/conservancy_beancount/plugin/meta_tax_implication.py +++ b/conservancy_beancount/plugin/meta_tax_implication.py @@ -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 = [ diff --git a/tests/test_meta_tax_implication.py b/tests/test_meta_tax_implication.py index 98c0162..9c2aa31 100644 --- a/tests/test_meta_tax_implication.py +++ b/tests/test_meta_tax_implication.py @@ -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',