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

Fix expense calculator bug #259

Merged
merged 2 commits into from
May 24, 2024
Merged

Fix expense calculator bug #259

merged 2 commits into from
May 24, 2024

Conversation

spokenbird
Copy link
Collaborator

No description provided.

Copy link
Contributor

@bseeger bseeger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the quick fix, @spokenbird

Also changes an equal to equalsIgnoreCase.
If a user enters a money on hand amount, but then goes back
and decides they have less than 100 on hand, we will clear
out the amount they entered so it doesn't affect calculations.
new BigDecimal(inputData.getOrDefault(inputFieldName, "0").toString())
.setScale(2, RoundingMode.HALF_UP));

if (!val.equalsIgnoreCase("None")) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@spokenbird I changed this to "equalsIgnoreCase()" so that we still do the right thing if someone accidentally changes this to "NONE" or "none".

@@ -82,6 +82,7 @@ flow:
nextScreens:
- name: expeditedSnapMoneyOnHand
expeditedSnapMoneyOnHand:
onPostAction: MaybeClearMoneyOnHandAmount
beforeSaveAction: CheckExpeditedSnapEligibility
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added a new action to clear out the money amount in the event that they said they had money, but then went back and changed their mind on that.

@bseeger bseeger merged commit 704aacc into main May 24, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants