|
|
@ -30,7 +30,7 @@ import { Injectable } from '@nestjs/common';
|
|
|
|
import { DataSource, Prisma, SymbolProfile } from '@prisma/client';
|
|
|
|
import { DataSource, Prisma, SymbolProfile } from '@prisma/client';
|
|
|
|
import { Big } from 'big.js';
|
|
|
|
import { Big } from 'big.js';
|
|
|
|
import { endOfToday, format, isAfter, isSameSecond, parseISO } from 'date-fns';
|
|
|
|
import { endOfToday, format, isAfter, isSameSecond, parseISO } from 'date-fns';
|
|
|
|
import { uniqBy } from 'lodash';
|
|
|
|
import { isNumber, uniqBy } from 'lodash';
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
import { v4 as uuidv4 } from 'uuid';
|
|
|
|
|
|
|
|
|
|
|
|
@Injectable()
|
|
|
|
@Injectable()
|
|
|
@ -328,7 +328,7 @@ export class ImportService {
|
|
|
|
date
|
|
|
|
date
|
|
|
|
);
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
if (!unitPrice) {
|
|
|
|
if (!isNumber(unitPrice)) {
|
|
|
|
throw new Error(
|
|
|
|
throw new Error(
|
|
|
|
`activities.${index} historical exchange rate at ${format(
|
|
|
|
`activities.${index} historical exchange rate at ${format(
|
|
|
|
date,
|
|
|
|
date,
|
|
|
|