Skip to content
This repository was archived by the owner on Jul 27, 2025. It is now read-only.

Added Decimal Support in min transaction#1681

Merged
zachgoll merged 3 commits intomaybe-finance:mainfrom
Harry-kp:fix-1672
Jan 27, 2025
Merged

Added Decimal Support in min transaction#1681
zachgoll merged 3 commits intomaybe-finance:mainfrom
Harry-kp:fix-1672

Conversation

@Harry-kp
Copy link
Copy Markdown
Contributor

fixes: #1672

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
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
Copy Markdown
Contributor

@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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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