Wage: US-OH Unemployment WAGE_US_OH_UNEMP python result = (contract.futa_type != contract.FUTA_TYPE_BASIC) code ### rate = payslip.dict.get_rate('US_OH_UNEMP') year = payslip.dict.date_to.year ytd = payslip.sum('WAGE_US_OH_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-OH Unemployment ER_US_OH_UNEMP python result = (contract.futa_type != contract.FUTA_TYPE_BASIC) code rate = payslip.dict.get_rate('US_OH_UNEMP') result_rate = -rate.rate result = categories.WAGE_US_OH_UNEMP # result_rate of 0 implies 100% due to bug if result_rate == 0.0: result = 0.0 EE: US-OH Income Withholding EE_US_OH_INC_WITHHOLD python result = True code year = payslip.dict.date_to.year wages = categories.GROSS allowances = contract.oh_income_allowances schedule_pay = contract.schedule_pay val = 0.00 PP = 0 if 'weekly' == schedule_pay: PP = 52 elif 'bi-weekly' == schedule_pay: PP = 26 elif 'semi-monthly' == schedule_pay: # impossible PP = 24 elif 'monthly' == schedule_pay: PP = 12 elif 'quarterly' == schedule_pay: PP = 4 elif 'semi-annually' == schedule_pay: PP = 2 elif 'annually' == schedule_pay: PP = 1 else: raise Exception('Invalid schedule_pay="' + schedule_pay + '" for OH Income Withholding calculation') # Algorithm from https://www.tax.ohio.gov/Portals/0/employer_withholding/2019%20tables/WTH_OptionalComputerFormula_2019.pdf if year == 2018: TW = (wages * PP) - (650 * allowances) if TW <= 5000.0: WD = ((TW * 0.005) / PP) * 1.112 elif TW <= 10000.0: WD = ((((TW - 5000.0) * 0.01) + 25.0) / PP) * 1.112 elif TW <= 15000.0: WD = ((((TW - 10000.0) * 0.02) + 75.0) / PP) * 1.112 elif TW <= 20000.0: WD = ((((TW - 15000.0) * 0.025) + 175.0) / PP) * 1.112 elif TW <= 40000.0: WD = ((((TW - 20000.0) * 0.03) + 300.0) / PP) * 1.112 elif TW <= 80000.0: WD = ((((TW - 40000.0) * 0.035) + 900.0) / PP) * 1.112 elif TW <= 100000.0: WD = ((((TW - 80000.0) * 0.04) + 2300.0) / PP) * 1.112 else: WD = ((((TW - 100000.0) * 0.05) + 3100.0) / PP) * 1.112 else: TW = (wages * PP) - (650 * allowances) if TW <= 5000.0: WD = ((TW * 0.005) / PP) * 1.112 elif TW <= 10000.0: WD = ((((TW - 5000.0) * 0.01) + 25.0) / PP) * 1.075 elif TW <= 15000.0: WD = ((((TW - 10000.0) * 0.02) + 75.0) / PP) * 1.075 elif TW <= 20000.0: WD = ((((TW - 15000.0) * 0.025) + 175.0) / PP) * 1.075 elif TW <= 40000.0: WD = ((((TW - 20000.0) * 0.03) + 300.0) / PP) * 1.075 elif TW <= 80000.0: WD = ((((TW - 40000.0) * 0.035) + 900.0) / PP) * 1.075 elif TW <= 100000.0: WD = ((((TW - 80000.0) * 0.04) + 2300.0) / PP) * 1.075 else: WD = ((((TW - 100000.0) * 0.05) + 3100.0) / PP) * 1.075 result = -WD