From 83e6e80bb89cc08d7572f566e5bb480e347d4bb4 Mon Sep 17 00:00:00 2001 From: "Bradley M. Kuhn" Date: Mon, 6 Dec 2021 10:43:32 -0800 Subject: [PATCH] =?UTF-8?q?meta=5Fpayroll=5Ftype=20=E2=80=94=20US:PTO=20?= =?UTF-8?q?=E2=80=94=20distinguish=20between=20Earned=20and=20Taken?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Metadata `payroll-type` will go on `Liabilities:Payable:Vacation` and `Expenses:Payroll:Salary`, but we need to distinguish as to whether the Payroll was earned or taken. Later, `Liabilities:Payable:Vacation` should require a `payroll-type` metadata of either `US:PTO:Taken` or `US:PTO:Earned`, and the `CA:` equivalents. --- conservancy_beancount/plugin/meta_payroll_type.py | 3 ++- tests/test_meta_payroll_type.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/conservancy_beancount/plugin/meta_payroll_type.py b/conservancy_beancount/plugin/meta_payroll_type.py index 0a8d665..40064bc 100644 --- a/conservancy_beancount/plugin/meta_payroll_type.py +++ b/conservancy_beancount/plugin/meta_payroll_type.py @@ -75,7 +75,8 @@ class SalaryHook(_PayrollTypeHook): 'US:MA:Disability:PML', 'US:NY:Disability', 'US:NY:Disability:PFL', - 'US:PTO', + 'US:PTO:Earned', + 'US:PTO:Taken', *_tax_values, ], { value.replace(':Tax:', ':Taxes:', 1): value diff --git a/tests/test_meta_payroll_type.py b/tests/test_meta_payroll_type.py index 6c3b91e..c060e4a 100644 --- a/tests/test_meta_payroll_type.py +++ b/tests/test_meta_payroll_type.py @@ -42,7 +42,8 @@ HOOK_DATA = [ 'US:Taxes:Medicare', 'CA:General', 'US:403b:Match', - 'US:PTO', + 'US:PTO:Earned', + 'US:PTO:Taken', ), HookData.from_hook(meta_payroll_type.TaxHook, 'CA:PP', 'US:IL:Unemployment', 'US:SocialSecurity'),