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

Choose amount format for import #840

Closed
MacPaille opened this issue Sep 13, 2017 · 12 comments
Closed

Choose amount format for import #840

MacPaille opened this issue Sep 13, 2017 · 12 comments
Assignees
Labels
fixed Bugs that are fixed (in a coming release).

Comments

@MacPaille
Copy link

I'm currently testing the product to migrate from my old AceManager which is not updated for a LOOONG time.
I'm a French speaking Belgian and my locales are , for the decimal separator and a . for the 1000 separator.
I think it would be a nice addition to ask these 2 values like you do with the date format on the first step of the importer.
Do you think you could implement that?

@JC5
Copy link
Member

JC5 commented Sep 14, 2017

Did you try it already? As far as I can tell, it works already.

screen shot 2017-09-14 at 10 36 07

screen shot 2017-09-14 at 10 35 58

@JC5 JC5 self-assigned this Sep 14, 2017
@JC5 JC5 added the question label Sep 14, 2017
@MacPaille
Copy link
Author

I tested with your example and it works, so I'll investigate more to understand the issue in my file.
Thanks!

@JC5
Copy link
Member

JC5 commented Sep 14, 2017

Yes, I am curious what it could be, and perhaps if FF could accommodate for it.

@MacPaille
Copy link
Author

After more test, it's only working if the amount value is between " ". As I open my export CSV to Excel to transform some fields "the withdraw amount is not negative) it removes all the " " when I save it again. When I import that version it doesn't recognize the , ad decimal separator and for example 24.5 become 245.

Is it an expected behavior?

@JC5
Copy link
Member

JC5 commented Sep 15, 2017

Are the values in the file separated by , or by ;? You must select the correct one when importing.

For example, consider this CSV row:

a,b,c,d,12,45

When entries are separated using the comma, Firefly III will assume both 12 and 45 are separated values. This is usually prevented (as in your file) by using quotes:

a,b,c,d,"12,45"

However, Excel has a different strategy and uses the ; to separate values.

a;b;c;d;12,45

Could you open your CSV file in Notepad and check what kind of separator it uses? This must be reflected when importing your data:

screen shot 2017-09-15 at 06 57 01

@MacPaille
Copy link
Author

Excel saves it with ; and I correctly set it in firefly for the import ;)
The previous of what is in each column while importing is very useful for that!

@JC5
Copy link
Member

JC5 commented Sep 15, 2017

Ok good, but that means something is still going wrong, I think. Could you share one line of your CSV file with me, and the import configuration from the page just before you start the import?

With that, I can see why Firefly III is making the mistake. Thanks!

@MacPaille
Copy link
Author

I'm updating this ticket, sorry for the delay I didn't had time to test more...
By converting the file to UTF-8 the import works well, but I still found one issue. If the amount contains a comma for decimal separator, it seems required to have 2 digits after it.
For example importing 4,50 is OK but if the value is 4,5 it will import as 45 euros...

It's an issue for me as my CSV export does not set the 2 digit after the comma if it's a multiple of 10...

@MacPaille
Copy link
Author

Found the solution, after forcing Excel to set the format as number it adds the 2 digits after the comma. But maybe it would be good to still do something if the number does not contain 2 digits after the comma?

@JC5
Copy link
Member

JC5 commented Oct 2, 2017

That's a nice case! I thought it was possible to do this. But I'll check it out and get a fix for the next version

@JC5
Copy link
Member

JC5 commented Oct 2, 2017

I've found the issue. The next release of Firefly III should be able to correctly convert "4,5" to "4.50". Up until then, you'll have to change this by hand. Keep an eye on the Github repository so you know when the next release is due!

@JC5 JC5 added fixed Bugs that are fixed (in a coming release). and removed waiting-for-user labels Oct 2, 2017
@MacPaille
Copy link
Author

Thanks for the quick fix :)

@JC5 JC5 closed this as completed Oct 9, 2017
@lock lock bot locked as resolved and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
fixed Bugs that are fixed (in a coming release).
Projects
None yet
Development

No branches or pull requests

2 participants