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

Initial account statements not handled correctly #1

Open
kylemd opened this issue Feb 14, 2025 · 1 comment
Open

Initial account statements not handled correctly #1

kylemd opened this issue Feb 14, 2025 · 1 comment

Comments

@kylemd
Copy link

kylemd commented Feb 14, 2025

Hey there,

First of all, thanks for this tool, very handy solution to a problem that shouldn't exist!

There is a bug where it cannot handle the very first statement generated per account.
This is because of how the statement dates are represented:

  • Statement 1: STATEMENT PERIOD TO 02 May 2024
  • Statement 2: STATEMENT PERIOD FROM 02 May 2024 TO 31 May 2024

When you try to process Statement 1:

  • Fails at statementParserModule.mjs line 220 as statementPeriod.end is never set
  • This is because at line 134 it assigns the date read to statementPeriod.start without checking there is two values available.

My idea for a solution is to check if there's two dates there, if there isn't, set statementPeriod.start later on when we work out what the first date in transactionData.

I don't code in JS, I gave fixing it a crack and although it now processes all statements successfully, all my transaction descriptions are messed up and the first statement thinks it's' 1970 lol.

Let me know if I can be of any more assistance.

@colin-tso
Copy link
Owner

Thanks.
Will have a look when I have time.
The issue with dates might be related to how Excel serialises dates differently to JS? It's been a while since I've looked at this, but I remember using date strings instead to work around this issue.

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