diff --git a/src/app-simplefin/app-simplefin.js b/src/app-simplefin/app-simplefin.js index 436ebd552..44bc5d53b 100644 --- a/src/app-simplefin/app-simplefin.js +++ b/src/app-simplefin/app-simplefin.js @@ -210,12 +210,13 @@ function getAccountResponse(results, accountId, startDate) { dateToUse = trans.posted; } - newTrans.bookingDate = getDate(new Date(dateToUse * 1000)); - if (newTrans.bookingDate < startDate) { + const transactionDate = new Date(dateToUse * 1000); + + if (transactionDate < startDate) { continue; } - newTrans.date = newTrans.bookingDate; + newTrans.date = getDate(transactionDate); newTrans.payeeName = trans.payee; newTrans.remittanceInformationUnstructured = trans.description; newTrans.transactionAmount = { amount: trans.amount, currency: 'USD' }; diff --git a/upcoming-release-notes/504.md b/upcoming-release-notes/504.md new file mode 100644 index 000000000..5f3364eba --- /dev/null +++ b/upcoming-release-notes/504.md @@ -0,0 +1,6 @@ +--- +category: Bugfix +authors: [matt-fidd] +--- + +Fix bug in batch SimpleFIN startDate logic