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 the value shown on a balance update transaction #1448

Closed
wants to merge 2 commits into from

Conversation

ahatzz11
Copy link
Contributor

@ahatzz11 ahatzz11 commented Nov 11, 2024

I noticed today that when editing a balance update transaction the amount shown didn't respect the currency steps. After some playing around and looking at the normal transaction (which worked correctly), I believe this fix is appropriate. I tested this locally and it works great (I tested USD and JPY for different precision values from currencies.yml)

This is where I saw the value field for the money_field of a normal transaction:

value: entry.amount.abs %>

Before/After:

image image

Fixes #1447

@ahatzz11 ahatzz11 marked this pull request as ready for review November 11, 2024 01:42
@zachgoll
Copy link
Collaborator

@ahatzz11 we probably should avoid calling abs on this for the case where a user has entered a negative balance on the account (rare, but possible and valid).

Just pushed through a fix that addresses this at the form builder level using the _money_field partial:

31ecd3c

@zachgoll zachgoll closed this Nov 11, 2024
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: Amount in the balance edit screen doesn't show proper decimal points
2 participants