|
@ -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; |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|