Changeset - 5c6d9d6f69e3
[Not reviewed]
0 2 0
Brett Smith - 3 years ago 2021-01-18 20:49:39
brettcsmith@brettcsmith.org
tax_implication: Bugfix "Corp" abbreviation in values.
2 files changed with 3 insertions and 1 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/meta_tax_implication.py
Show inline comments
...
 
@@ -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 = [
tests/test_meta_tax_implication.py
Show inline comments
...
 
@@ -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',
0 comments (0 inline, 0 general)