Browse Source

Refactoring

pull/547/head
Thomas 4 years ago
parent
commit
60a9716a64
  1. 15
      apps/client/src/app/services/import-transactions.service.ts

15
apps/client/src/app/services/import-transactions.service.ts

@ -214,12 +214,15 @@ export class ImportTransactionsService {
for (const key of ImportTransactionsService.TYPE_KEYS) { for (const key of ImportTransactionsService.TYPE_KEYS) {
if (item[key]) { if (item[key]) {
if (item[key].toLowerCase() === 'buy') { switch (item[key].toLowerCase()) {
return Type.BUY; case 'buy':
} else if (item[key].toLowerCase() === 'sell') { return Type.BUY;
return Type.SELL; case 'dividend':
} else if (item[key].toLowerCase() === 'dividend') { return Type.DIVIDEND;
return Type.DIVIDEND; case 'sell':
return Type.SELL;
default:
break;
} }
} }
} }

Loading…
Cancel
Save