mirror of
https://gitlab.com/hibou-io/hibou-odoo/suite.git
synced 2025-01-20 12:37:31 +02:00
This refactor bases all/most 'wage' categories off of BASIC instead of GROSS to allow all 'Income Tax' rules to continue to be based on GROSS.
701 lines
22 KiB
XML
Executable File
701 lines
22 KiB
XML
Executable File
<?xml version="1.0" encoding="utf-8"?>
|
|
<odoo>
|
|
<data>
|
|
|
|
<!-- HR SALARY RULES-->
|
|
<!-- UNEMPLOYMENT -->
|
|
<record id="hr_payroll_rules_nj_unemp_wages_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="423"/>
|
|
<field name="category_id" ref="hr_payroll_nj_unemp_wages"/>
|
|
<field name="name">New Jersey Unemployment Insurance Tax - Wages (2018)</field>
|
|
<field name="code">NJ_UNEMP_WAGES_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
###
|
|
ytd = payslip.sum('NJ_UNEMP_WAGES_2018', '2018-01-01', '2019-01-01')
|
|
ytd += contract.external_wages
|
|
remaining = 33700.0 - ytd
|
|
if remaining <= 0.0:
|
|
result = 0
|
|
elif remaining < categories.BASIC:
|
|
result = remaining
|
|
else:
|
|
result = categories.BASIC
|
|
</field>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
<record id="hr_payroll_rules_nj_unemp_employee_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="443"/>
|
|
<field name="category_id" ref="hr_payroll_nj_unemp_employee"/>
|
|
<field name="name">New Jersey Unemployment - Employee(2018)</field>
|
|
<field name="code">NJ_UNEMP_EMPLOYEE_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
result_rate = -contract.nj_unemp_employee_rate(2018)
|
|
result = categories.NJ_UNEMP_WAGES
|
|
|
|
# result_rate of 0 implies 100% due to bug
|
|
if result_rate == 0.0:
|
|
result = 0.0
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_unemp_employee"/>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
<record id="hr_payroll_rules_nj_unemp_company_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="443"/>
|
|
<field name="category_id" ref="hr_payroll_nj_unemp_company"/>
|
|
<field name="name">New Jersey Unemployment - Employer(2018)</field>
|
|
<field name="code">NJ_UNEMP_COMPANY_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
result_rate = -contract.nj_unemp_company_rate(2018)
|
|
result = categories.NJ_UNEMP_WAGES
|
|
|
|
# result_rate of 0 implies 100% due to bug
|
|
if result_rate == 0.0:
|
|
result = 0.0
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_unemp_employee"/>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
|
|
<!-- STATE DISABILITY INSURANCE -->
|
|
|
|
<record id="hr_payroll_rules_nj_sdi_wages_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="423"/>
|
|
<field name="category_id" ref="hr_payroll_nj_sdi_wages"/>
|
|
<field name="name">New Jersey State Disability Tax - Wages (2018)</field>
|
|
<field name="code">NJ_SDI_WAGES_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
###
|
|
ytd = payslip.sum('NJ_SDI_WAGES_2018', '2018-01-01', '2019-01-01')
|
|
ytd += contract.external_wages
|
|
remaining = 33700.0 - ytd
|
|
if remaining <= 0.0:
|
|
result = 0
|
|
elif remaining < categories.BASIC:
|
|
result = remaining
|
|
else:
|
|
result = categories.BASIC
|
|
</field>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
<record id="hr_payroll_rules_nj_sdi_employee_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="443"/>
|
|
<field name="category_id" ref="hr_payroll_nj_sdi_employee"/>
|
|
<field name="name">New Jersey State Disability Insurance - Employee(2018)</field>
|
|
<field name="code">NJ_SDI_EMPLOYEE_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
result_rate = -contract.nj_sdi_employee_rate(2018)
|
|
result = categories.NJ_SDI_WAGES
|
|
|
|
# result_rate of 0 implies 100% due to bug
|
|
if result_rate == 0.0:
|
|
result = 0.0
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_sdi_employee"/>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
<record id="hr_payroll_rules_nj_sdi_company_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="443"/>
|
|
<field name="category_id" ref="hr_payroll_nj_sdi_company"/>
|
|
<field name="name">New Jersey State Disability Insurance - Employer(2018)</field>
|
|
<field name="code">NJ_SDI_COMPANY_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
result_rate = -contract.nj_sdi_company_rate(2018)
|
|
result = categories.NJ_SDI_WAGES
|
|
|
|
# result_rate of 0 implies 100% due to bug
|
|
if result_rate == 0.0:
|
|
result = 0.0
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_unemp_company"/>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
|
|
<!-- FAMILY LEAVE INSURANCE -->
|
|
<record id="hr_payroll_rules_nj_fli_wages_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="423"/>
|
|
<field name="category_id" ref="hr_payroll_nj_fli_wages"/>
|
|
<field name="name">New Jersey Family Leave Insurance Tax - Wages (2018)</field>
|
|
<field name="code">NJ_FLI_WAGES_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
###
|
|
ytd = payslip.sum('NJ_FLI_WAGES_2018', '2018-01-01', '2019-01-01')
|
|
ytd += contract.external_wages
|
|
remaining = 33700.0 - ytd
|
|
if remaining <= 0.0:
|
|
result = 0
|
|
elif remaining < categories.BASIC:
|
|
result = remaining
|
|
else:
|
|
result = categories.BASIC
|
|
</field>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
<record id="hr_payroll_rules_nj_fli_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="443"/>
|
|
<field name="category_id" ref="hr_payroll_nj_fli"/>
|
|
<field name="name">New Jersey Family Leave Insurance(2018)</field>
|
|
<field name="code">NJ_FLI_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
result_rate = -contract.nj_fli_rate(2018)
|
|
result = categories.NJ_FLI_WAGES
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_fli"/>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
|
|
<!-- WORKFORCE DEVELOPMENT/SUPPLEMENTAL WORKFORCE FUNDS -->
|
|
<record id="hr_payroll_rules_nj_wf_wages_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="423"/>
|
|
<field name="category_id" ref="hr_payroll_nj_wf_wages"/>
|
|
<field name="name">New Jersey Workforce Development/Supplemental Workforce Funds Tax - Wages (2018)</field>
|
|
<field name="code">NJ_WF_WAGES_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
###
|
|
ytd = payslip.sum('NJ_WF_WAGES_2018', '2018-01-01', '2019-01-01')
|
|
ytd += contract.external_wages
|
|
remaining = 33700.0 - ytd
|
|
if remaining <= 0.0:
|
|
result = 0
|
|
elif remaining < categories.BASIC:
|
|
result = remaining
|
|
else:
|
|
result = categories.BASIC
|
|
</field>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
<record id="hr_payroll_rules_nj_wf_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="443"/>
|
|
<field name="category_id" ref="hr_payroll_nj_wf"/>
|
|
<field name="name">New Jersey Workforce Development/Supplemental Workforce Funds(2018)</field>
|
|
<field name="code">NJ_WF_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
result_rate = -contract.nj_wf_rate(2018)
|
|
result = categories.NJ_WF_WAGES
|
|
|
|
if result_rate == 0.0:
|
|
result = 0.0
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_wf"/>
|
|
<field name="appears_on_payslip" eval="False"/>
|
|
</record>
|
|
|
|
<!-- STATE INCOME WITHHOLDING -->
|
|
<record id="hr_payroll_rules_nj_inc_withhold_2018" model="hr.salary.rule">
|
|
<field name="sequence" eval="145"/>
|
|
<field name="category_id" ref="hr_payroll_nj_income_withhold"/>
|
|
<field name="name">New Jersey Income Withholding</field>
|
|
<field name="code">NJ_INC_WITHHOLD_2018</field>
|
|
<field name="condition_select">python</field>
|
|
<field name="condition_python">result = (payslip.date_to[:4] == '2018')</field>
|
|
<field name="amount_select">code</field>
|
|
<field name="amount_python_compute">
|
|
wages = categories.GROSS
|
|
allowances = contract.nj_njw4_allowances
|
|
additional_withholding = contract.nj_additional_withholding
|
|
schedule_pay = contract.schedule_pay
|
|
filing_status = contract.nj_njw4_filing_status
|
|
rate_table = contract.nj_njw4_rate_table
|
|
|
|
# Determine which rate table to use
|
|
if not rate_table:
|
|
if filing_status == 'single' or filing_status == 'married_separate':
|
|
rate_table = 'A'
|
|
elif filing_status == 'married_joint' or filing_status == 'widower' or filing_status == 'head_household':
|
|
rate_table = 'B'
|
|
|
|
# Tables are found in http://www.state.nj.us/treasury/taxation/pdf/current/njwt.pdf
|
|
# Tax Rate Tables to calculate income withholding
|
|
|
|
#### RATE 'A' ####
|
|
if rate_table == 'A':
|
|
### WEEKLY ###
|
|
if schedule_pay == 'weekly':
|
|
wages -= 19.20 * allowances
|
|
tax_rate_table = [
|
|
(384, 0.015, 0.0),
|
|
(673, 0.02, 5.76),
|
|
(769, 0.039, 11.54),
|
|
(1442, 0.061, 15.28),
|
|
(9615, 0.07, 56.34),
|
|
(float('inf'), 0.099, 628.45),
|
|
]
|
|
|
|
### BI-WEEKLY ###
|
|
elif schedule_pay == 'bi-weekly':
|
|
wages -= 38.40 * allowances
|
|
tax_rate_table = [
|
|
(769, 0.015, 0.0),
|
|
(1346, 0.02, 11.54),
|
|
(1538, 0.039, 23.08),
|
|
(2884, 0.061, 30.56),
|
|
(19231, 0.07, 112.67),
|
|
(float('inf'), 0.099, 1256.96),
|
|
]
|
|
|
|
### SEMI-MONTHLY ###
|
|
elif schedule_pay == 'semi-monthly':
|
|
wages -= 41.60 * allowances
|
|
tax_rate_table = [
|
|
(833, 0.015, 0.0),
|
|
(1458, 0.02, 12.50),
|
|
(1666, 0.039, 25.00),
|
|
(3125, 0.061, 33.11),
|
|
(20833, 0.07, 112.11),
|
|
(float('inf'), 0.099, 1361.67),
|
|
]
|
|
|
|
### MONTHLY ###
|
|
elif schedule_pay == 'monthly':
|
|
wages -= 83.30 * allowances
|
|
tax_rate_table = [
|
|
(1666, 0.015, 0.0),
|
|
(2916, 0.02, 24.99),
|
|
(3333, 0.039, 49.99),
|
|
(6250, 0.061, 66.25),
|
|
(41667, 0.07, 244.19),
|
|
(float('inf'), 0.099, 2723.38),
|
|
]
|
|
|
|
### QUARTERLY ###
|
|
elif schedule_pay == 'quarterly':
|
|
wages -= 250.00 * allowances
|
|
tax_rate_table = [
|
|
(5000, 0.015, 0.0),
|
|
(8750, 0.02, 75.00),
|
|
(10000, 0.039, 150.00),
|
|
(18750, 0.061, 198.75),
|
|
(125000, 0.07, 732.50),
|
|
(float('inf'), 0.099, 8170.00),
|
|
]
|
|
|
|
### SEMI-ANNUAL ###
|
|
elif schedule_pay == 'semi-annual':
|
|
wages -= 500 * allowances
|
|
tax_rate_table = [
|
|
(10000, 0.015, 0.0),
|
|
(17500, 0.02, 150.00),
|
|
(20000, 0.039, 300.00),
|
|
(37500, 0.061, 397.50),
|
|
(250000, 0.07, 1465.00),
|
|
(float('inf'), 0.099, 16340.00),
|
|
]
|
|
|
|
### ANNUAL ###
|
|
elif schedule_pay == 'annually':
|
|
wages -= 1000.00 * allowances
|
|
tax_rate_table = [
|
|
(20000, 0.015, 0.0),
|
|
(35000, 0.02, 300.00),
|
|
(40000, 0.039, 600.00),
|
|
(75000, 0.061, 795.00),
|
|
(500000, 0.07, 2930.00),
|
|
(float('inf'), 0.099, 32680.00),
|
|
]
|
|
|
|
#### RATE 'B' ####
|
|
elif rate_table == 'B':
|
|
### WEEKLY ###
|
|
if schedule_pay == 'weekly':
|
|
wages -= 19.20 * allowances
|
|
tax_rate_table = [
|
|
(384, 0.015, 0.0),
|
|
(961, 0.02, 5.76),
|
|
(1346, 0.027, 17.30),
|
|
(1538, 0.039, 27.70),
|
|
(2884, 0.061, 35.18),
|
|
(9615, 0.07, 117.29),
|
|
(float('inf'), 0.099, 588.46),
|
|
]
|
|
|
|
### BI-WEEKLY ###
|
|
elif schedule_pay == 'bi-weekly':
|
|
wages -= 38.40 * allowances
|
|
tax_rate_table = [
|
|
(769, 0.015, 0.0),
|
|
(1923, 0.02, 11.54),
|
|
(2692, 0.027, 34.62),
|
|
(3076, 0.039, 55.38),
|
|
(5769, 0.061, 70.35),
|
|
(19231, 0.07, 234.63),
|
|
(float('inf'), 0.099, 1176.97),
|
|
]
|
|
|
|
### SEMI-MONTHLY ###
|
|
elif schedule_pay == 'semi-monthly':
|
|
wages -= 41.60 * allowances
|
|
tax_rate_table = [
|
|
(833, 0.015, 0.0),
|
|
(2083, 0.02, 12.50),
|
|
(2916, 0.027, 37.50),
|
|
(3333, 0.039, 59.99),
|
|
(6250, 0.061, 76.25),
|
|
(20833, 0.07, 254.19),
|
|
(float('inf'), 0.099, 1275),
|
|
]
|
|
|
|
### MONTHLY ###
|
|
elif schedule_pay == 'monthly':
|
|
wages -= 83.30 * allowances
|
|
tax_rate_table = [
|
|
(1666, 0.015, 0.0),
|
|
(4166, 0.02, 24.99),
|
|
(5833, 0.027, 74.99),
|
|
(6666, 0.039, 120.00),
|
|
(12500, 0.061, 152.49),
|
|
(41667, 0.07, 508.36),
|
|
(float('inf'), 0.099, 2550.05),
|
|
]
|
|
|
|
### QUARTERLY ###
|
|
elif schedule_pay == 'quarterly':
|
|
wages -= 250.00 * allowances
|
|
tax_rate_table = [
|
|
(5000, 0.015, 0.0),
|
|
(12500, 0.02, 75.00),
|
|
(17500, 0.027, 225.00),
|
|
(20000, 0.039, 360.00),
|
|
(37500, 0.061, 457.50),
|
|
(125000, 0.07, 1525.00),
|
|
(float('inf'), 0.099, 7650.00),
|
|
]
|
|
|
|
### SEMI-ANNUAL ###
|
|
elif schedule_pay == 'semi-annual':
|
|
wages -= 500.00 * allowances
|
|
tax_rate_table = [
|
|
(10000, 0.015, 0.0),
|
|
(25000, 0.02, 150.00),
|
|
(35000, 0.027, 450.00),
|
|
(40000, 0.039, 720.00),
|
|
(75000, 0.061, 915.00),
|
|
(250000, 0.07, 3050.00),
|
|
(float('inf'), 0.099, 15300.00),
|
|
]
|
|
|
|
### ANNUAL ###
|
|
elif schedule_pay == 'annually':
|
|
wages -= 1000.00 * allowances
|
|
tax_rate_table = [
|
|
(20000, 0.015, 0.0),
|
|
(50000, 0.02, 300.00),
|
|
(70000, 0.027, 900.00),
|
|
(80000, 0.039, 1440.00),
|
|
(150000, 0.061, 1830.00),
|
|
(500000, 0.07, 6100.00),
|
|
(float('inf'), 0.099, 30600.00),
|
|
]
|
|
|
|
#### RATE 'C' ####
|
|
elif rate_table == 'C':
|
|
### WEEKLY ###
|
|
if schedule_pay == 'weekly':
|
|
wages -= 19.20 * allowances
|
|
tax_rate_table = [
|
|
(384, 0.015, 0.0),
|
|
(769, 0.023, 5.76),
|
|
(961, 0.028, 14.62),
|
|
(1153, 0.035, 19.99),
|
|
(2884, 0.056, 26.71),
|
|
(9615, 0.066, 123.65),
|
|
(float('inf'), 0.099, 567.90),
|
|
]
|
|
|
|
### BI-WEEKLY ###
|
|
elif schedule_pay == 'bi-weekly':
|
|
wages -= 38.40 * allowances
|
|
tax_rate_table = [
|
|
(769, 0.015, 0.0),
|
|
(1538, 0.023, 11.54),
|
|
(1923, 0.028, 29.22),
|
|
(2307, 0.035, 40.00),
|
|
(5769, 0.056, 53.44),
|
|
(19231, 0.066, 247.31),
|
|
(float('inf'), 0.099, 1135.80),
|
|
]
|
|
|
|
### SEMI-MONTHLY ###
|
|
elif schedule_pay == 'semi-monthly':
|
|
wages -= 41.60 * allowances
|
|
tax_rate_table = [
|
|
(833, 0.015, 0.0),
|
|
(1666, 0.023, 12.50),
|
|
(2083, 0.028, 31.65),
|
|
(2500, 0.035, 43.33),
|
|
(6250, 0.056, 57.93),
|
|
(20833, 0.066, 26793),
|
|
(float('inf'), 0.099, 1230.41),
|
|
]
|
|
|
|
### MONTHLY ###
|
|
elif schedule_pay == 'monthly':
|
|
wages -= 83.30 * allowances
|
|
tax_rate_table = [
|
|
(1666, 0.015, 0.0),
|
|
(3333, 0.023, 24.99),
|
|
(4166, 0.028, 63.33),
|
|
(5000, 0.035, 86.66),
|
|
(12500, 0.056, 115.85),
|
|
(41667, 0.066, 535.85),
|
|
(float('inf'), 0.099, 2460.87),
|
|
]
|
|
|
|
### QUARTERLY ###
|
|
elif schedule_pay == 'quarterly':
|
|
wages -= 250.00 * allowances
|
|
tax_rate_table = [
|
|
(5000, 0.015, 0.0),
|
|
(10000, 0.023, 75.00),
|
|
(12500, 0.028, 190.00),
|
|
(15000, 0.035, 260.00),
|
|
(37500, 0.056, 347.50),
|
|
(125000, 0.066, 1607.50),
|
|
(float('inf'), 0.099, 7382.50),
|
|
]
|
|
|
|
### SEMI-ANNUAL ###
|
|
elif schedule_pay == 'semi-annual':
|
|
wages -= 500.00 * allowances
|
|
tax_rate_table = [
|
|
(10000, 0.015, 0.0),
|
|
(20000, 0.023, 150.00),
|
|
(25000, 0.028, 380.00),
|
|
(30000, 0.035, 520.00),
|
|
(75000, 0.056, 695.00),
|
|
(250000, 0.066, 3215.00),
|
|
(float('inf'), 0.099, 14765.00),
|
|
]
|
|
|
|
### ANNUAL ###
|
|
elif schedule_pay == 'annually':
|
|
wages -= 1000.00 * allowances
|
|
tax_rate_table = [
|
|
(20000, 0.015, 0.0),
|
|
(40000, 0.023, 300.00),
|
|
(50000, 0.028, 760.00),
|
|
(60000, 0.035, 1040.00),
|
|
(150000, 0.056, 1390.00),
|
|
(500000, 0.066, 6430.00),
|
|
(float('inf'), 0.099, 29530.00),
|
|
]
|
|
|
|
#### RATE 'D' ####
|
|
elif rate_table == 'D':
|
|
### WEEKLY ###
|
|
if schedule_pay == 'weekly':
|
|
wages -= 19.20 * allowances
|
|
tax_rate_table = [
|
|
(384, 0.015, 0.0),
|
|
(769, 0.027, 5.76),
|
|
(961, 0.034, 16.16),
|
|
(1153, 0.043, 22.68),
|
|
(2884, 0.056, 30.94),
|
|
(9615, 0.065, 127.88),
|
|
(float('inf'), 0.099, 565.40),
|
|
]
|
|
|
|
### BI-WEEKLY ###
|
|
elif schedule_pay == 'bi-weekly':
|
|
wages -= 38.40 * allowances
|
|
tax_rate_table = [
|
|
(769, 0.015, 0.0),
|
|
(1538, 0.027, 11.54),
|
|
(1923, 0.034, 32.30),
|
|
(2307, 0.043, 45.39),
|
|
(5769, 0.056, 61.90),
|
|
(19231, 0.065, 255.77),
|
|
(float('inf'), 0.099, 1130.80),
|
|
]
|
|
|
|
### SEMI-MONTHLY ###
|
|
elif schedule_pay == 'semi-monthly':
|
|
wages -= 41.60 * allowances
|
|
tax_rate_table = [
|
|
(833, 0.015, 0.0),
|
|
(1666, 0.027, 12.50),
|
|
(2083, 0.034, 34.99),
|
|
(2500, 0.043, 49.16),
|
|
(6250, 0.056, 67.10),
|
|
(20833, 0.065, 277.10),
|
|
(float('inf'), 0.099, 1225.00),
|
|
]
|
|
|
|
### MONTHLY ###
|
|
elif schedule_pay == 'monthly':
|
|
wages -= 83.30 * allowances
|
|
tax_rate_table = [
|
|
(1666, 0.015, 0.0),
|
|
(3333, 0.027, 24.99),
|
|
(4166, 0.034, 70.00),
|
|
(5000, 0.043, 98.32),
|
|
(12500, 0.056, 134.18),
|
|
(41667, 0.065, 554.18),
|
|
(float('inf'), 0.099, 2450.04),
|
|
]
|
|
|
|
### QUARTERLY ###
|
|
elif schedule_pay == 'quarterly':
|
|
wages -= 250.00 * allowances
|
|
tax_rate_table = [
|
|
(5000, 0.015, 0.0),
|
|
(10000, 0.027, 75.00),
|
|
(12500, 0.034, 210.00),
|
|
(15000, 0.043, 295.00),
|
|
(37500, 0.056, 402.50),
|
|
(125000, 0.065, 1662.50),
|
|
(float('inf'), 0.099, 7350.00),
|
|
]
|
|
|
|
### SEMI-ANNUAL ###
|
|
elif schedule_pay == 'semi-annual':
|
|
wages -= 500.00 * allowances
|
|
tax_rate_table = [
|
|
(10000, 0.015, 0.0),
|
|
(20000, 0.027, 150.00),
|
|
(25000, 0.034, 420.00),
|
|
(30000, 0.043, 590.00),
|
|
(75000, 0.056, 805.00),
|
|
(250000, 0.065, 3325.00),
|
|
(float('inf'), 0.099, 14700.00),
|
|
]
|
|
|
|
### ANNUAL ###
|
|
elif schedule_pay == 'annually':
|
|
wages -= 1000.00 * allowances
|
|
tax_rate_table = [
|
|
(20000, 0.015, 0.0),
|
|
(40000, 0.027, 300.00),
|
|
(50000, 0.034, 840.00),
|
|
(60000, 0.043, 1180.00),
|
|
(150000, 0.056, 1610.00),
|
|
(250000, 0.065, 6650.00),
|
|
(float('inf'), 0.099, 29400.00),
|
|
]
|
|
|
|
#### RATE 'E' ####
|
|
elif rate_table == 'E':
|
|
### WEEKLY ###
|
|
if schedule_pay == 'weekly':
|
|
wages -= 19.20 * allowances
|
|
tax_rate_table = [
|
|
(384, 0.015, 0.0),
|
|
(673, 0.02, 5.76),
|
|
(1923, 0.058, 11.54),
|
|
(9615, 0.065, 84.04),
|
|
(float('inf'), 0.099, 584.02),
|
|
]
|
|
|
|
### BI-WEEKLY ###
|
|
elif schedule_pay == 'bi-weekly':
|
|
wages -= 38.40 * allowances
|
|
tax_rate_table = [
|
|
(769, 0.015, 0.0),
|
|
(1346, 0.02, 11.54),
|
|
(3846, 0.058, 23.08),
|
|
(19231, 0.065, 168.08),
|
|
(float('inf'), 0.099, 1168.11),
|
|
]
|
|
|
|
### SEMI-MONTHLY ###
|
|
elif schedule_pay == 'semi-monthly':
|
|
wages -= 41.60 * allowances
|
|
tax_rate_table = [
|
|
(833, 0.015, 0.0),
|
|
(1458, 0.02, 12.50),
|
|
(4166, 0.058, 25.00),
|
|
(20833, 0.065, 182.06),
|
|
(float('inf'), 0.099, 1265.42),
|
|
]
|
|
|
|
### MONTHLY ###
|
|
elif schedule_pay == 'monthly':
|
|
wages -= 83.30 * allowances
|
|
tax_rate_table = [
|
|
(1666, 0.015, 0.0),
|
|
(2916, 0.02, 24.99),
|
|
(8333, 0.058, 49.99),
|
|
(41667, 0.065, 364.18),
|
|
(float('inf'), 0.099, 2530.89),
|
|
]
|
|
|
|
### QUARTERLY ###
|
|
elif schedule_pay == 'quarterly':
|
|
wages -= 250.00 * allowances
|
|
tax_rate_table = [
|
|
(5000, 0.015, 0.0),
|
|
(8750, 0.02, 75.00),
|
|
(25000, 0.058, 150.00),
|
|
(125000, 0.065, 1092.50),
|
|
(float('inf'), 0.099, 7592.50),
|
|
]
|
|
|
|
### SEMI-ANNUAL ###
|
|
elif schedule_pay == 'semi-annual':
|
|
wages -= 500.00 * allowances
|
|
tax_rate_table = [
|
|
(10000, 0.015, 0.0),
|
|
(17500, 0.02, 150.00),
|
|
(50000, 0.058, 300.00),
|
|
(250000, 0.065, 2185.00),
|
|
(float('inf'), 0.099, 15,185.00),
|
|
]
|
|
|
|
### ANNUAL ###
|
|
elif schedule_pay == 'annually':
|
|
wages -= 1000.00 * allowances
|
|
tax_rate_table = [
|
|
(20000, 0.015, 0.0),
|
|
(35000, 0.02, 300.00),
|
|
(100000, 0.058, 600.00),
|
|
(500000, 0.065, 4370.00),
|
|
(float('inf'), 0.099, 30370.00),
|
|
]
|
|
|
|
|
|
over = 0.0
|
|
tax = 0.0
|
|
for row in tax_rate_table:
|
|
if wages <= row[0]:
|
|
tax = ((wages - over) * row[1]) + row[2]
|
|
tax += additional_withholding
|
|
break
|
|
over = row[0]
|
|
|
|
result = -tax
|
|
|
|
</field>
|
|
<field name="register_id" ref="contrib_register_njdor_withhold"/>
|
|
</record>
|
|
|
|
</data>
|
|
</odoo>
|