Skip to content

Commit 569b7d9

Browse files
authored
fix: Setup correct transactionDate when importing donations (#699)
* fix: Setup correct transactionDate when importing donations * fix: Tests breakage
1 parent 5c08d16 commit 569b7d9

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

apps/api/src/tasks/bank-import/import-transactions.task.spec.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,13 @@ describe('ImportTransactionsTask', () => {
433433
createdAt: new Date('2023-03-14T00:00:00.000Z'),
434434
currency: 'BGN',
435435
donations: {
436-
create: { personId: null, amount: 5000, targetVaultId: 'vault-id', type: 'donation' },
436+
create: {
437+
personId: null,
438+
amount: 5000,
439+
createdAt: new Date('2023-03-14T00:00:00.000Z'),
440+
targetVaultId: 'vault-id',
441+
type: 'donation'
442+
},
437443
},
438444
extCustomerId: 'BG77UNCR92900016740920',
439445
extPaymentIntentId:

apps/api/src/tasks/bank-import/import-transactions.task.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -519,6 +519,7 @@ export class IrisTasks {
519519
donations: {
520520
create: {
521521
amount: bankTransaction.amount,
522+
createdAt: new Date(bankTransaction.transactionDate),
522523
personId: null,
523524
targetVaultId: vault.id,
524525
type: DonationType.donation,

0 commit comments

Comments
 (0)