Skip to content

Commit

Permalink
Case fix (#4312)
Browse files Browse the repository at this point in the history
* Case fix

* Auto fix locality name case
  • Loading branch information
tofarr committed Mar 6, 2024
1 parent 7962883 commit 1cc11e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/state_file/questions/ny_w2_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def self.invalid_w2?(intake, w2)
return true if w2.LocalIncomeTaxAmt != 0 && w2.LocalWagesAndTipsAmt == 0
return true if w2.StateIncomeTaxAmt != 0 && w2.StateWagesAmt == 0
return true if w2.StateWagesAmt != 0 && w2.EmployerStateIdNum.blank?
return true if w2.LocalityNm.present? && !StateFileNyIntake.locality_nm_valid?(w2.LocalityNm)
return true if w2.LocalityNm.present? && !StateFileNyIntake.locality_nm_valid?(w2.LocalityNm.upcase)

false
end
Expand Down
4 changes: 4 additions & 0 deletions app/lib/submission_builder/shared/return_w2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ def document
if intake_w2.present?
xml_node.at(:W2StateLocalTaxGrp).inner_html = intake_w2.state_tax_group_xml_node
end
locality_nm = xml_node.at(:LocalityNm)
if locality_nm.present?
locality_nm.inner_html = locality_nm.inner_html.upcase
end
xml_node
end
end
Expand Down

0 comments on commit 1cc11e0

Please sign in to comment.