|
@ -224,7 +224,7 @@ export class ImportService { |
|
|
|
|
|
|
|
|
for (const activity of activitiesDto) { |
|
|
for (const activity of activitiesDto) { |
|
|
if (!activity.dataSource) { |
|
|
if (!activity.dataSource) { |
|
|
if (activity.type === 'ITEM' || activity.type === 'LIABILITY') { |
|
|
if (['FEE', 'INTEREST', 'ITEM', 'LIABILITY'].includes(activity.type)) { |
|
|
activity.dataSource = DataSource.MANUAL; |
|
|
activity.dataSource = DataSource.MANUAL; |
|
|
} else { |
|
|
} else { |
|
|
activity.dataSource = |
|
|
activity.dataSource = |
|
@ -356,6 +356,7 @@ export class ImportService { |
|
|
quantity, |
|
|
quantity, |
|
|
type, |
|
|
type, |
|
|
unitPrice, |
|
|
unitPrice, |
|
|
|
|
|
Account: validatedAccount, |
|
|
accountId: validatedAccount?.id, |
|
|
accountId: validatedAccount?.id, |
|
|
accountUserId: undefined, |
|
|
accountUserId: undefined, |
|
|
createdAt: new Date(), |
|
|
createdAt: new Date(), |
|
@ -380,10 +381,10 @@ export class ImportService { |
|
|
symbolMapping, |
|
|
symbolMapping, |
|
|
updatedAt, |
|
|
updatedAt, |
|
|
url, |
|
|
url, |
|
|
|
|
|
comment: assetProfile.comment, |
|
|
currency: assetProfile.currency, |
|
|
currency: assetProfile.currency, |
|
|
comment: assetProfile.comment |
|
|
userId: dataSource === 'MANUAL' ? user.id : undefined |
|
|
}, |
|
|
}, |
|
|
Account: validatedAccount, |
|
|
|
|
|
symbolProfileId: undefined, |
|
|
symbolProfileId: undefined, |
|
|
updatedAt: new Date(), |
|
|
updatedAt: new Date(), |
|
|
userId: user.id |
|
|
userId: user.id |
|
@ -406,7 +407,8 @@ export class ImportService { |
|
|
create: { |
|
|
create: { |
|
|
dataSource, |
|
|
dataSource, |
|
|
symbol, |
|
|
symbol, |
|
|
currency: assetProfile.currency |
|
|
currency: assetProfile.currency, |
|
|
|
|
|
userId: dataSource === 'MANUAL' ? user.id : undefined |
|
|
}, |
|
|
}, |
|
|
where: { |
|
|
where: { |
|
|
dataSource_symbol: { |
|
|
dataSource_symbol: { |
|
|