diff --git a/revolut_data/trading-pnl-statement_2024-01-robo.csv b/revolut_data/trading-pnl-statement_2024-01-robo.csv new file mode 100644 index 0000000..c8afa78 --- /dev/null +++ b/revolut_data/trading-pnl-statement_2024-01-robo.csv @@ -0,0 +1,9 @@ +Income from Sells +Date acquired,Date sold,Symbol,Security name,ISIN,Country,Quantity,Cost basis,Gross proceeds,Gross PnL,Currency + +Other income & fees +Date,Symbol,Security name,ISIN,Country,Gross amount,Withholding tax,Net Amount,Currency +2024-06-04,QDVY,iShares Floating Rate Bond ETF (Dist),IE00BZ048462,IE,2.80,0.68 PLN,2.12 PLN,PLN +2024-06-20,EXI2,iShares Dow Jones Global Titans 50 ETF (Dist),DE0006289382,DE,0.34,0.08 PLN,0.26 PLN,PLN +2024-06-28,IS3K,iShares Short Duration High Yield Corporate Bond ETF (Dist),IE00BCRY6003,IE,3.79,0.94 PLN,2.85 PLN,PLN +2024-07-01,IBCD,iShares Corporate Bond ETF (Dist),IE0032895942,IE,01.07,0.25 PLN,0.82 PLN,PLN diff --git a/src/csvparser.rs b/src/csvparser.rs index 29f7fb7..b8ba1f1 100644 --- a/src/csvparser.rs +++ b/src/csvparser.rs @@ -1517,74 +1517,32 @@ mod tests { fn test_parse_revolut_investment_gain_and_losses_dividends() -> Result<(), String> { let expected_result = Ok(( vec![ - ( - "03/04/24".to_owned(), - crate::Currency::PLN(617.00), - crate::Currency::PLN(92.57), - ), - ( - "03/21/24".to_owned(), - crate::Currency::PLN(259.17), - crate::Currency::PLN(0.0), - ), - ( - "03/25/24".to_owned(), - crate::Currency::PLN(212.39), - crate::Currency::PLN(31.87), - ), - ( - "05/16/24".to_owned(), - crate::Currency::PLN(700.17), - crate::Currency::PLN(105.04), - ), - ( - "05/31/24".to_owned(), - crate::Currency::PLN(875.82), - crate::Currency::PLN(131.38), - ), - ( - "06/03/24".to_owned(), - crate::Currency::PLN(488.26), - crate::Currency::PLN(73.25), - ), ( "06/04/24".to_owned(), - crate::Currency::PLN(613.2), - crate::Currency::PLN(92.00), - ), - ( - "06/11/24".to_owned(), - crate::Currency::PLN(186.16), - crate::Currency::PLN(27.92), - ), - ( - "06/13/24".to_owned(), - crate::Currency::PLN(264.74), - crate::Currency::PLN(0.00), + crate::Currency::PLN(2.80), + crate::Currency::PLN(0.68), ), ( - "06/18/24".to_owned(), - crate::Currency::PLN(858.33), - crate::Currency::PLN(128.74), + "06/20/24".to_owned(), + crate::Currency::PLN(0.34), + crate::Currency::PLN(0.08), ), ( - "07/12/24".to_owned(), - crate::Currency::PLN(421.5), - crate::Currency::PLN(63.23), + "06/28/24".to_owned(), + crate::Currency::PLN(3.79), + crate::Currency::PLN(0.94), ), ( - "07/16/24".to_owned(), - crate::Currency::PLN(834.55), - crate::Currency::PLN(125.18), + "07/01/24".to_owned(), + crate::Currency::PLN(1.07), + crate::Currency::PLN(0.25), ), ], vec![], )); assert_eq!( - parse_revolut_transactions( - "revolut_data/trading-pnl-statement_2024-01-01_2024-08-04_pl-pl_8e8783.csv" - ), + parse_revolut_transactions("revolut_data/trading-pnl-statement_2024-01-robo.csv"), expected_result ); diff --git a/src/main.rs b/src/main.rs index 9626e49..6842941 100644 --- a/src/main.rs +++ b/src/main.rs @@ -11,6 +11,7 @@ mod gui; use etradeTaxReturnHelper::run_taxation; use logging::ResultExt; +// TODO: Add revolut sold transactions settlement date when it is available in CSV documents // TODO: Revolut sold tranasactions in EUR currency // TODO: Add fees to revolut sold transactions when CSV contains such a data // TODO: remove support for account statement of investment account of revolut