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.
This commit is contained in:
Brett Smith 2020-12-23 18:31:32 -05:00
parent 7c18bc221f
commit e06b400998
2 changed files with 21 additions and 14 deletions

View file

@ -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):

View file

@ -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+',