If there is an add on card. then the expenses on that card is not considered.
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
So this name is a section inside the Domestic Transaction/International Transaction section
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;
}
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.
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