Wage: US-AR Unemployment
WAGE_US_AR_UNEMP
python
result = (contract.futa_type != contract.FUTA_TYPE_BASIC)
code
rate = payslip.dict.get_rate('US_AR_UNEMP')
year = payslip.dict.date_to.year
ytd = payslip.sum('WAGE_US_AR_UNEMP', str(year) + '-01-01', str(year+1) + '-01-01')
ytd += contract.external_wages
remaining = rate.wage_limit_year - ytd
if remaining <= 0.0:
result = 0
elif remaining < categories.BASIC:
result = remaining
else:
result = categories.BASIC
ER: US-AR Unemployment
ER_US_AR_UNEMP
python
result = (contract.futa_type != contract.FUTA_TYPE_BASIC)
code
rate = payslip.dict.get_rate('US_AR_UNEMP')
result_rate = -rate.rate
result = categories.WAGE_US_AR_UNEMP
# result_rate of 0 implies 100% due to bug
if result_rate == 0.0:
result = 0.0
EE: US-AR Income Tax Withholding
EE_US_AR_INC_WITHHOLD
python
result = not (contract.ar_ar4ec_texarkana_exemption or contract.ar_ar4ec_tax_exempt)
code
wages = categories.GROSS
annual_gross_pay = 0.00
allowance_amt = contract.ar_ar4ec_allowances * 26.00
schedule_pay = contract.schedule_pay
standard_deduction = 2200
additional_withholding = contract.ar_ar4ec_additional_wh
if contract.w4_filing_status == 'married':
standard_deduction = standard_deduction * 2
pay_period = 0.0
pay_periods = {
'weekly': 52.0,
'bi-weekly': 26.0,
'semi-monthly': 24.0,
'monthly': 12.0
}
if schedule_pay in pay_periods:
pay_period = pay_periods[schedule_pay]
else:
raise Exception('Invalid schedule_pay="' + schedule_pay + '" for AR Income Withholding calculation')
annual_gross_pay = (wages * pay_period)
net_taxable_income = annual_gross_pay - standard_deduction - allowance_amt
if (net_taxable_income < 50000.00):
# This formula will round the number to the nearest 50 if under 50000
net_taxable_income = (net_taxable_income // 50) * 50.0 + 50.0
tax_rate_table = [(4299, 0.90),
(8499, 2.50),
(12699, 3.50),
(21199, 4.50),
(35099, 6.0),
(float('inf'), 6.9)]
result = 0.0
last = 0.0
for row in tax_rate_table:
cap, rate = row
if cap <= net_taxable_income:
taxed = cap - last
result = result + (taxed * (rate / 100.0))
last = cap
elif cap > net_taxable_income:
taxed = net_taxable_income - last
result = result + (taxed * (rate / 100.0))
break
result = (result / pay_period) + additional_withholding
result = -result