Skip to content

Added Decimal Support in min transaction #1681

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

Merged
merged 3 commits into from
Jan 27, 2025

Conversation

Harry-kp
Copy link
Contributor

fixes: #1672

Copy link
Collaborator

@zachgoll zachgoll left a comment

Choose a reason for hiding this comment

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

Thanks for the fix! I think we may want to use our built in money_field here so that we can take advantage of the built-in precision handling that it offers. Here's an example of the usage:

<%= form.money_field :balance, label: t(".balance"), required: true, default_currency: Current.family.currency %>

This is made available via our custom form builder:

def money_field(amount_method, options = {})

@Harry-kp
Copy link
Contributor Author

Harry-kp commented Jan 25, 2025

Thanks for the fix! I think we may want to use our built in money_field here so that we can take advantage of the built-in precision handling that it offers. Here's an example of the usage:

<%= form.money_field :balance, label: t(".balance"), required: true, default_currency: Current.family.currency %>

This is made available via our custom form builder:

def money_field(amount_method, options = {})

@zachgoll Updated the PR to include the suggested changes. Also updated the test to include the decimal scenario

Copy link
Collaborator

@zachgoll zachgoll left a comment

Choose a reason for hiding this comment

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

Awesome, looks great now! Thanks for the fix.

@zachgoll zachgoll merged commit eabfb7a into maybe-finance:main Jan 27, 2025
5 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.

Bug: Credit card account minimum payment does not accept decimal values
2 participants