Browse Source

Fix import for activities of type fee and interest

pull/2474/head
Thomas 2 years ago
parent
commit
f75df97dfe
  1. 4
      apps/client/src/app/services/import-activities.service.ts
  2. 11
      test/import/ok.csv

4
apps/client/src/app/services/import-activities.service.ts

@ -337,6 +337,10 @@ export class ImportActivitiesService {
return Type.BUY; return Type.BUY;
case 'dividend': case 'dividend':
return Type.DIVIDEND; return Type.DIVIDEND;
case 'fee':
return Type.FEE;
case 'interest':
return Type.INTEREST;
case 'item': case 'item':
return Type.ITEM; return Type.ITEM;
case 'liability': case 'liability':

11
test/import/ok.csv

@ -1,5 +1,6 @@
Date,Code,Currency,Price,Quantity,Action,Fee,Note Date,Code,DataSource,Currency,Price,Quantity,Action,Fee,Note
16-09-2021,MSFT,USD,298.580,5,buy,19.00,My first order 🤓 01-09-2021,Account Opening Fee,MANUAL,USD,0,0,fee,49,
17/11/2021,MSFT,USD,0.62,5,dividend,0.00 16-09-2021,MSFT,YAHOO,USD,298.580,5,buy,19.00,My first order 🤓
01.01.2022,Penthouse Apartment,USD,500000.0,1,item,0.00 17/11/2021,MSFT,YAHOO,USD,0.62,5,dividend,0.00
20500606,MSFT,USD,0.00,0,buy,0.00 01.01.2022,Penthouse Apartment,MANUAL,USD,500000.0,1,item,0.00
20500606,MSFT,YAHOO,USD,0.00,0,buy,0.00

Can't render this file because it has a wrong number of fields in line 3.
Loading…
Cancel
Save