Skip to content

Commit

Permalink
[Automated] Merged master into target k8s
Browse files Browse the repository at this point in the history
  • Loading branch information
va-vsp-bot committed Apr 23, 2024
2 parents 90f2cd7 + 68ed41b commit 67809de
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion lib/pdf_fill/forms/va21p530v2.rb
Expand Up @@ -619,6 +619,14 @@ def expand_cemetery_location
@form_data['stateCemeteryOrTribalTrustZip'] = cemetery_location['zip'] if cemetery_location['zip'].present?
end

def expand_tribal_land_location
cemetery_location = @form_data['tribalLandLocation']
return if cemetery_location.blank?

@form_data['stateCemeteryOrTribalTrustName'] = cemetery_location['name'] if cemetery_location['name'].present?
@form_data['stateCemeteryOrTribalTrustZip'] = cemetery_location['zip'] if cemetery_location['zip'].present?
end

# VA file number can be up to 10 digits long; An optional leading 'c' or 'C' followed by
# 7-9 digits. The file number field on the 4142 form has space for 9 characters so trim the
# potential leading 'c' to ensure the file number will fit into the form without overflow.
Expand Down Expand Up @@ -654,7 +662,7 @@ def expand_confirmation_question
def expand_location_question
cemetery_location = @form_data['cemetaryLocationQuestion']
@form_data['cemetaryLocationQuestionCemetery'] = select_checkbox(cemetery_location == 'cemetery')
@form_data['cemetaryLocationQuestionTribal'] = select_checkbox(cemetery_location == 'tribal')
@form_data['cemetaryLocationQuestionTribal'] = select_checkbox(cemetery_location == 'tribalLand')
@form_data['cemetaryLocationQuestionNone'] = select_checkbox(cemetery_location == 'none')
end

Expand Down Expand Up @@ -718,6 +726,7 @@ def merge_fields(_options = {})
end

expand_cemetery_location
expand_tribal_land_location

# special case: the UI only has a 'yes' checkbox, so the PDF 'noTransportation' checkbox can never be true.
@form_data['hasTransportation'] = @form_data['transportation'] == true ? 'YES' : nil
Expand Down

0 comments on commit 67809de

Please sign in to comment.