Closed pinzutu closed 1 month ago
Apologies for the small post-review change: I had the late realization that PP transactions have embedded taxes and fees fields. I therefore added taxes and fees columns to the csv file, which voids the need to generate stand-alone tax and fee events and trims event_formatter.py in the process.
Sorry, I was first too euphoric and then tested it a little bit more. Before your last commit, taxes and fees were positive and thus gave a wrong total sum. Also I realized, that card_failed_transaction are not handled at all. These only need to be added, if and only if the transaction is of type card_failed_transaction and of status= "executed".
Notwithstanding PP's indifference to the sign of fees and taxes, sticking to the negative sign convention for both makes more sense indeed. I also wrongly believed card_failed_transaction events to always be failed transactions; these now conditionally map to REMOVALs again.
Refactors the parsing of all_events.json and the formatting into all_transactions.csv to capture all pp events generated by tr events, especially taxes, fees, and savebacks.
In detail:
1. Removes card_failed_transaction type due to it not being relevant for PPtaxed income, transactions with fees). Fees and taxes are added as csv columns to avoid stand-alone transactions.The all_events.json available to me parses into an accurate all_transactions.csv; however, I highly encourage everyone to test the pr on their own event logs. I did not observe breaking changes when testing with the docker image of python 3.8