Changeset - e06b400998a9
[Not reviewed]
0 2 0
Brett Smith - 3 years ago 2020-12-23 23:31:32
brettcsmith@brettcsmith.org
meta_payroll_type: Prefer :Tax: over :Taxes: in metadata values.

This is something we're doing generally, e.g., in our chart of accounts.
Do it here too for consistency. Accept the :Taxes: versions as synonyms.
2 files changed with 21 insertions and 14 deletions:
0 comments (0 inline, 0 general)
conservancy_beancount/plugin/meta_payroll_type.py
Show inline comments
...
 
@@ -58,30 +58,37 @@ class OtherBenefitsHook(_PayrollTypeHook):
 

	
 
class SalaryHook(_PayrollTypeHook):
 
    ACCOUNT = 'Expenses:Payroll:Salary'
 
    _tax_values = [
 
        'CA:Tax:EI',
 
        'CA:Tax:Income',
 
        'CA:Tax:PP',
 
        'US:IL:Tax:Income',
 
        'US:MA:Tax:Income',
 
        'US:NY:Tax:Income',
 
        'US:NY:Tax:NYC',
 
        'US:OR:Tax:Income',
 
        'US:OR:Tax:STT',
 
        'US:Tax:Income',
 
        'US:Tax:Medicare',
 
        'US:Tax:SocialSecurity',
 
    ]
 
    VALUES_ENUM = core.MetadataEnum(METADATA_KEY, [
 
        'CA:General',
 
        'CA:PTO',
 
        'CA:Taxes:EI',
 
        'CA:Taxes:Income',
 
        'CA:Taxes:PP',
 
        'US:403b:Employee',
 
        'US:403b:Match',
 
        'US:General',
 
        'US:IL:Taxes:Income',
 
        'US:MA:Disability:PFL',
 
        'US:MA:Disability:PML',
 
        'US:MA:Taxes:Income',
 
        'US:NY:Disability',
 
        'US:NY:Disability:PFL',
 
        'US:NY:Taxes:Income',
 
        'US:NY:Taxes:NYC',
 
        'US:OR:Taxes:Income',
 
        'US:OR:Taxes:STT',
 
        'US:PTO',
 
        'US:Taxes:Income',
 
        'US:Taxes:Medicare',
 
        'US:Taxes:SocialSecurity',
 
    ])
 
        *_tax_values,
 
    ], {
 
        value.replace(':Tax:', ':Taxes:', 1): value
 
        for value in _tax_values
 
    })
 
    del _tax_values
 

	
 

	
 
class TaxHook(_PayrollTypeHook):
setup.py
Show inline comments
...
 
@@ -5,7 +5,7 @@ from setuptools import setup
 
setup(
 
    name='conservancy_beancount',
 
    description="Plugin, library, and reports for reading Conservancy's books",
 
    version='1.14.0',
 
    version='1.14.1',
 
    author='Software Freedom Conservancy',
 
    author_email='info@sfconservancy.org',
 
    license='GNU AGPLv3+',
0 comments (0 inline, 0 general)