actualbudget / actual

A local-first personal finance app
https://actualbudget.org
MIT License
13.3k stars 1.06k forks source link

[Bug]: Amount changed (x100) after category change #2722

Open prigal opened 3 months ago

prigal commented 3 months ago

Verified issue does not already exist?

What happened?

In transaction list, when editing category on some transactions, amount is automatically multiplied per 100.

Capture vidéo du 2024-05-07 09-06-38.webm

I have no rule that modify the amount.

My formatting settings (french) image

Where are you hosting Actual?

Docker

What browsers are you seeing the problem on?

Chrome

Operating System

Linux

youngcw commented 3 months ago

do you have an example budget or import file we could use to debug?

prigal commented 3 months ago

hello, unfortunately I can't reproduce on a clean and empty budget file (with same bank link through gocardless and same settints, up to experimental ones) and I can't share my real budget file.

I can only reproduce the same bug when clicking on "cleared" icon, it does the same, multiply per 100.

I will do some tests again tonight.

l2ysho commented 3 months ago

I have the same issue but only in my main file, it seems app switching . and , back and forth when I made any edit on record (same in budgeting window.)

prigal commented 3 months ago

@l2ysho I think you're right, this is the bug.

l2ysho commented 2 months ago

Any news about this? btw it behave the same in multiple browsers (Safari, Opera)

leikoilja commented 2 months ago

uh, just notices the same issue after upgrading to 24.6.0, my amount is randomly changing. I have noticed it during manually adding new transactions and tapping 'tab' when going through fields to fill and now an issue when i just click 'cleared' checkbox: https://github.com/actualbudget/actual/assets/10655107/cf308403-c7de-4543-8983-97e643001f16

For info, my formatting:

image
prigal commented 2 months ago

Hi, just did the upgrade too and bug is still there.

julianwachholz commented 1 month ago

You mentioned you use Chrome. The "space-dot" number format is currently defined to use the dje locale, which Chrome does not support. It falls back to en_US for me.

Chrome (126.0.6478.127):

> Intl.NumberFormat('dje').format(1200.33)
< '1,200.33'

Firefox (127.0.2):

> Intl.NumberFormat('dje').format(1200.33)
< "1 200.33" 

I would consider changing the number formats to locales supported by all major browsers (which can probably be difficult). I couldn't find any locale supported in Chrome that uses a non-breaking space thousand separator and a period decimal separator.

I also found a small bug that could possible fix this issue: https://github.com/actualbudget/actual/pull/2981/files#diff-f00ab63a0b721dd9afc0e9f181bc480d0c002c255e741c37c596e7a2b14212a8R41

@youngcw to reproduce the x100 bug, one can use the demo:

  1. Create a new demo budget
  2. Change number format to "1 000.33"
  3. Go to BofA account, find the "Housy House" Mortgage transaction
  4. Toggle the Clear flag

Expected result: Amount stays 1200 Actual result: Amount changes to 1.20