add 'permitted_benefits_health' to RT and RO records for 2017
This commit is contained in:
parent
961aedc0ae
commit
056b10d953
1 changed files with 14 additions and 12 deletions
|
@ -2,7 +2,7 @@ import model
|
|||
from fields import *
|
||||
import enums
|
||||
|
||||
__all__ = RECORD_TYPES = ['SubmitterRecord', 'EmployerRecord',
|
||||
__all__ = RECORD_TYPES = ['SubmitterRecord', 'EmployerRecord',
|
||||
'EmployeeWageRecord', 'OptionalEmployeeWageRecord',
|
||||
'TotalRecord', 'OptionalTotalRecord',
|
||||
'StateTotalRecord', 'FinalRecord', 'StateWageRecord']
|
||||
|
@ -49,7 +49,7 @@ class SubmitterRecord(EFW2Record):
|
|||
contact_phone_ext = TextField(max_length=5, required=False)
|
||||
blank4 = BlankField(max_length=3)
|
||||
contact_email = EmailField(max_length=40)
|
||||
blank5 = BlankField(max_length=3)
|
||||
blank5 = BlankField(max_length=3)
|
||||
contact_fax = TextField(max_length=10, required=False)
|
||||
preferred_notification = TextField(max_length=1)
|
||||
preparer_code = TextField(max_length=1)
|
||||
|
@ -77,10 +77,10 @@ class SubmitterRecord(EFW2Record):
|
|||
|
||||
def validate_preparer_code(self, f):
|
||||
valid_options = ('A','L','S','P','O')
|
||||
if self.preparer_code.value.upper() not in valid_options:
|
||||
if self.preparer_code.value.upper() not in valid_options:
|
||||
raise ValidationError("preparer_code %s not one of %s" % (self.preparer_code.value, valid_options), field=f)
|
||||
|
||||
|
||||
|
||||
|
||||
class EmployerRecord(EFW2Record):
|
||||
# year=2012
|
||||
|
@ -120,7 +120,7 @@ class EmployerRecord(EFW2Record):
|
|||
excluded_values = ('00','07','08','09','17','18','19','28','29','49','69','70','78','79','89')
|
||||
if f.value[0:2] in excluded_values:
|
||||
raise ValidationError("%s not one of %s" % (f.value, excluded_values), field=f)
|
||||
|
||||
|
||||
def validate_agent_for_ein(self, f):
|
||||
if self.agent_indicator.value == 1 and not f.value:
|
||||
raise ValidationError("agent_for_ein must be provided with agent_indicator=1", field=f)
|
||||
|
@ -188,7 +188,8 @@ class EmployeeWageRecord(EFW2Record):
|
|||
designated_roth_contrib_401k = MoneyField(max_length=11, required=False)
|
||||
designated_roth_contrib_403b = MoneyField(max_length=11, required=False)
|
||||
employer_sponsored_health = MoneyField(max_length=11, required=False)
|
||||
blank4 = BlankField(max_length=12)
|
||||
permitted_benefits_health = MoneyField(max_length=11, required=False)
|
||||
blank4 = BlankField(max_length=1)
|
||||
statutory_employee_indicator = BooleanField()
|
||||
blank5 = BlankField(max_length=1)
|
||||
retirement_plan_indicator = BooleanField()
|
||||
|
@ -198,7 +199,7 @@ class EmployeeWageRecord(EFW2Record):
|
|||
def validate_ssn(self, f):
|
||||
if str(f.value).startswith('666','9'):
|
||||
raise ValidationError("ssn cannot start with 666 or 9", field=f)
|
||||
|
||||
|
||||
|
||||
|
||||
class OptionalEmployeeWageRecord(EFW2Record):
|
||||
|
@ -254,11 +255,11 @@ class StateWageRecord(EFW2Record):
|
|||
foreign_postal_code = TextField(max_length=15, required=False)
|
||||
country_code = TextField(max_length=2, required=False)
|
||||
optional_code = TextField(max_length=2, required=False)
|
||||
reporting_period = MonthYearField()
|
||||
reporting_period = MonthYearField()
|
||||
quarterly_unemp_ins_wages = MoneyField(max_length=11)
|
||||
quarterly_unemp_ins_taxable_wages = MoneyField(max_length=11)
|
||||
number_of_weeks_worked = IntegerField(max_length=2)
|
||||
date_first_employed = DateField(required=False)
|
||||
date_first_employed = DateField(required=False)
|
||||
date_of_separation = DateField(required=False)
|
||||
blank2 = BlankField(max_length=5)
|
||||
state_employer_account_num = TextField(max_length=20)
|
||||
|
@ -273,7 +274,7 @@ class StateWageRecord(EFW2Record):
|
|||
state_control_number = IntegerField(max_length=7, required=False)
|
||||
supplemental_data1 = TextField(max_length=75, required=False)
|
||||
supplemental_data2 = TextField(max_length=75, required=False)
|
||||
blank4 = BlankField(max_length=25)
|
||||
blank4 = BlankField(max_length=25)
|
||||
|
||||
def validate_tax_type_code(self, field):
|
||||
choices = [x for x,y in enums.tax_type_codes]
|
||||
|
@ -313,7 +314,8 @@ class TotalRecord(EFW2Record):
|
|||
deferred_409a_compensation_plan = MoneyField(max_length=15, required=False)
|
||||
designated_roth_contribs_401k = MoneyField(max_length=15, required=False)
|
||||
designated_roth_contribs_403b = MoneyField(max_length=15, required=False)
|
||||
blank2 = BlankField(max_length=113)
|
||||
permitted_benefits_health = MoneyField(max_length=15, required=False)
|
||||
blank2 = BlankField(max_length=98)
|
||||
|
||||
|
||||
class OptionalTotalRecord(EFW2Record):
|
||||
|
@ -349,7 +351,7 @@ class StateTotalRecord(EFW2Record):
|
|||
#year=2012
|
||||
record_identifier = 'RV'
|
||||
required = False
|
||||
|
||||
|
||||
supplemental_data = TextField(max_length=510)
|
||||
|
||||
class FinalRecord(EFW2Record):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue