hdfc-cc-parser-rs icon indicating copy to clipboard operation
hdfc-cc-parser-rs copied to clipboard

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

Open asnimansari opened this issue 2 years ago • 5 comments

asnimansari avatar Jul 13 '23 19:07 asnimansari

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

joeirimpan avatar Jul 14 '23 03:07 joeirimpan

1 2 3 4

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

asnimansari avatar Jul 17 '23 19:07 asnimansari

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 avatar Jul 18 '23 16:07 joeirimpan

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.

joeirimpan avatar Jul 18 '23 16:07 joeirimpan

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

k-tarun avatar Aug 05 '23 19:08 k-tarun