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

If there is an add on card. then the expenses on that card is not considered. #11

Open
asnimansari opened this issue Jul 13, 2023 · 5 comments

Comments

@asnimansari
Copy link

No description provided.

@joeirimpan
Copy link
Owner

Could you the mask the transactions and send that section screenshot here for reference?
If the table header looks very similar to Domestic Transactions / International Transactions, you can add that here and check once? https://github.com/joeirimpan/hdfc-cc-parser-rs/blob/master/src/main.rs#L61

@asnimansari
Copy link
Author

1
2
3
4

So this name is a section inside the Domestic Transaction/International Transaction section

@joeirimpan
Copy link
Owner

joeirimpan commented Jul 18, 2023

We could skip the row if transaction date was not parsed at the first column parse attempt.

Can you add the below code here https://github.com/joeirimpan/hdfc-cc-parser-rs/blob/master/src/main.rs#L136, build and check once?

 // assume transaction begins with date
 // skip if this is not a transaction row.
if column_ct == 1 && !found_row {
    column_ct -= 1;
    continue;
}

@joeirimpan
Copy link
Owner

This codebase is a rather naive approach to parsing the statements. Ideally, a better approach would involve parsing the headers first and then iterating through each row to parse the corresponding columns. Although I made some progress with it, I encountered difficulties in achieving full functionality.

@k-tarun
Copy link

k-tarun commented Aug 5, 2023

I noticed some issues with my statements too. Upon adding print statements to debug this in a verbose form, I realised the reward points are printed before the date when parsing my statement. I ended up using a hacky method to skip the column count checking against the header, instead choosing to validate transactions through the date and amount being valid and assigning the rewards points in the end before pushing to the vector.

Feel free to check out the my hotfix branch at: https://github.com/k-tarun/hdfc-cc-parser-rs/tree/hotfix_regalia

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

3 participants