Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR comments and cleanup #5461

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/helpers/state_file/nj_2450_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def get_wages(w2)
end

def get_column_a(w2)
column_a = w2.box14_ui_wf_swf&.positive? ? w2.box14_ui_wf_swf : w2.box14_ui_hc_wd
column_a = w2.get_box14_ui_overwrite || 0
column_a&.round || 0
end

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,6 @@ def document
build_xml_doc("FormNJ2450") do |xml|
w2s.each do |w2|
xml.Body do
column_a = w2.box14_ui_wf_swf&.positive? ? w2.box14_ui_wf_swf : w2.box14_ui_hc_wd

xml.EmployerName get_employer_name(w2, truncate: true)
xml.FedEmployerId w2.employer_ein
xml.Wages get_wages(w2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,12 @@
it "fills body for each w2" do
body_elements = xml.css("Body")
expect(body_elements.count).to eq 2
w2_long_employer_name = body_elements[0]
expect(w2_long_employer_name.at('EmployerName').text.length).to eq(35)

body_elements.each do |body|
w2 = [w2_1, w2_2].find { |test_w2| test_w2.employer_ein == body.at('FedEmployerId').text}

expect(body.at('EmployerName').text).to eq(w2.employer_name[0...35])
if w2.employer_name == long_employer_name
expect(body.at('EmployerName').text.length).to eq(35)
end
expect(body.at('Wages').text).to eq(w2.wages.round.to_s)
expect(body.at('Deductions ColumnA').text).to eq(w2.box14_ui_hc_wd.round.to_s)
expect(body.at('Deductions ColumnC').text).to eq(w2.box14_fli.round.to_s)
Expand Down
Loading