-
Notifications
You must be signed in to change notification settings - Fork 13
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
FYST-1041 ID form 40 add some lines #4985
FYST-1041 ID form 40 add some lines #4985
Conversation
app/lib/efile/id/id40_calculator.rb
Outdated
WKSHT_LINE_2_AMTS = { | ||
single: 4673, | ||
married_filing_separately: 4673, | ||
married_filing_jointly: 9346, | ||
head_of_household: 9346, | ||
qualifying_widow: 9346, | ||
}.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this looks kind of stupid but it's much nicer to access? idk
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems ok to me, we do this elsewhere and I like that's close to where it is used
def cell_phone_number=(value) | ||
write_df_xml_value(__method__, value) | ||
end | ||
|
||
def tax_payer_email=(value) | ||
write_df_xml_value(__method__, value) | ||
end | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added these so i could test that the list of attrs in the test also have setters (see direct_file_data_spec)
Heroku app: https://gyr-review-app-4985-77686ab9448c.herokuapp.com/ |
@@ -107,29 +170,12 @@ | |||
end | |||
|
|||
context "PermanentBuildingFund" do | |||
context "when a client is not blind has filing requirements and does not receive public assistance" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we didn't need to test this again, it's already tested in the calculator spec
describe "#is_primary_blind?" do | ||
it "returns true when value is X" do | ||
expect(direct_file_data.is_primary_blind?).to eq true | ||
end | ||
|
||
it "returns false when node absent" do | ||
xml.at('PrimaryBlindInd').remove | ||
expect(direct_file_data.is_primary_blind?).to eq false | ||
end | ||
end | ||
|
||
describe "#is_spouse_blind?" do | ||
it "returns true when value is X" do | ||
expect(direct_file_data.is_spouse_blind?).to eq true | ||
end | ||
|
||
it "returns false when node absent" do | ||
xml.at('SpouseBlindInd').remove | ||
expect(direct_file_data.is_spouse_blind?).to eq false | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
these methods had been added but not tested
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good + love to see the related cleanup and test improvements, just some minor comments
app/lib/efile/id/id40_calculator.rb
Outdated
WKSHT_LINE_2_AMTS = { | ||
single: 4673, | ||
married_filing_separately: 4673, | ||
married_filing_jointly: 9346, | ||
head_of_household: 9346, | ||
qualifying_widow: 9346, | ||
}.freeze |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems ok to me, we do this elsewhere and I like that's close to where it is used
app/lib/efile/id/id40_calculator.rb
Outdated
[line_or_zero(:ID40_LINE_11) - @direct_file_data.total_itemized_or_standard_deduction_amount, 0].max | ||
end | ||
|
||
WKSHT_LINE_2_AMTS = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[dustiest dust] would you mind using WK as an abbreviation for worksheet? I doubt we're at all consistent about it, but it's what I saw somewhere else and am using it in the story I'm working on. also my brain is auto populating a different vowel sound in WKSHT.....
'TxCompL20' => round_amount_to_nearest_integer(@xml_document.at('StateIncomeTax')&.text), | ||
'L21' => round_amount_to_nearest_integer(@xml_document.at('StateIncomeTax')&.text), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[dust] instead of round_amount_to_nearest_integer
could you remove the .text
for these and round them? I'm also surprised to see these being rounded in the pdf rather than in the xml or the calculator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, so .text
isn't converting it to a string, it's getting the contexts of the xml element, which is what's returned from @xml_document.at('<node name>
)`. i'm not sure there is a way to get it out as a number, or at least i haven't seen one?
re: rounding, the xml accepts cents for this field (AmountType
) but the pdf wants a whole number
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that's the first I've heard of xml wanting/accepting cents but sometimes I guess I have to accept that things are just weird
Link to pivotal/JIRA issue
Is PM acceptance required? (delete one)
Reminder: merge main into this branch and get green tests before merging to main
What was done?
How to test?