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

Parsing for values > 999 EUR wrong #4

Open
siedi opened this issue May 1, 2019 · 4 comments
Open

Parsing for values > 999 EUR wrong #4

siedi opened this issue May 1, 2019 · 4 comments

Comments

@siedi
Copy link

siedi commented May 1, 2019

Having more than 1.000 EUR in the account, the parsing mixes the thousand separators '.' with the decimal separator, thus the parsed number will become e.g. 9.000.00 instead of 9,000.00 or 9000.00. The application throws an error:

estateguru.lua: expected number for 'securities.purchasePrice', securities name 'Account Summary'

Unfortunately, I can't fix it myself, I have the app from the app store and it doesn't allow extension without a signature

@lr1980
Copy link
Contributor

lr1980 commented May 1, 2019

try this file (I cannot test it => my account is not over 1000€ ;) ):
https://github.com/lr1980/moneymoney-estateguru/blob/dotconversion/estateguru.lua

you need the test/beta version to use it...

@siedi
Copy link
Author

siedi commented May 2, 2019

Unfortunately, I can't test the changes without having a signed extension. I'm running the version from the App Store and this doesn't allow unsigned extensions (not sure why the developer decided so).

@lr1980
Copy link
Contributor

lr1980 commented May 2, 2019

I think you can remove the app and install the download version...

@siedi
Copy link
Author

siedi commented May 13, 2019

ok, finally got it working, with your patch @lr1980, using the English format, I added another gsub and removed the comma, resulting in something like this:

account_value = content:xpath('/html/body/section/div/div/div/div[2]/section[1]/div/div/div[3]/div/div[2]/ul/li[1]/div[1]/span[2]'):text()
account_value = string.gsub(string.gsub(account_value, "€", ""), ",", "")

invested = content:xpath('//*[@id="collapse0"]/ul/li[1]/div/span[2]'):text()
invested = string.gsub(string.gsub(invested, "€", ""), ",", "")

May I ask you to create the PR? I'm too lazy :-)

@lr1980 lr1980 mentioned this issue May 14, 2019
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

No branches or pull requests

2 participants