mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 20:44:32 -05:00
fix: Sabadell Bank regression, missing date field during normalization (#474)
* fix: Sabadell Bank regression, missing date field during normalization * release notes
This commit is contained in:
@@ -31,6 +31,7 @@ export default {
|
||||
return {
|
||||
...transaction,
|
||||
payeeName: formatPayeeName(transaction),
|
||||
date: transaction.bookingDate || transaction.valueDate,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -9,6 +9,7 @@ describe('BancSabadell', () => {
|
||||
remittanceInformationUnstructuredArray: ['some-creditor-name'],
|
||||
internalTransactionId: 'd7dca139cf31d9',
|
||||
transactionId: '04704109322',
|
||||
bookingDate: '2022-05-01',
|
||||
};
|
||||
const normalizedTransaction = Sabadell.normalizeTransaction(
|
||||
transaction,
|
||||
@@ -26,6 +27,7 @@ describe('BancSabadell', () => {
|
||||
remittanceInformationUnstructuredArray: ['some-debtor-name'],
|
||||
internalTransactionId: 'd7dca139cf31d9',
|
||||
transactionId: '04704109322',
|
||||
bookingDate: '2022-05-01',
|
||||
};
|
||||
const normalizedTransaction = Sabadell.normalizeTransaction(
|
||||
transaction,
|
||||
@@ -35,5 +37,21 @@ describe('BancSabadell', () => {
|
||||
expect(normalizedTransaction.creditorName).toEqual(null);
|
||||
});
|
||||
});
|
||||
|
||||
it('extract date', () => {
|
||||
const transaction = {
|
||||
transactionAmount: { amount: '-100', currency: 'EUR' },
|
||||
remittanceInformationUnstructuredArray: ['some-creditor-name'],
|
||||
internalTransactionId: 'd7dca139cf31d9',
|
||||
transactionId: '04704109322',
|
||||
bookingDate: '2024-10-02',
|
||||
valueDate: '2024-10-05',
|
||||
};
|
||||
const normalizedTransaction = Sabadell.normalizeTransaction(
|
||||
transaction,
|
||||
true,
|
||||
);
|
||||
expect(normalizedTransaction.date).toEqual('2024-10-02');
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
6
upcoming-release-notes/474.md
Normal file
6
upcoming-release-notes/474.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Bugfix
|
||||
authors: [davidmartos96]
|
||||
---
|
||||
|
||||
Fixes Sabadell Bank regression, by including the date field during normalization
|
||||
Reference in New Issue
Block a user