A local-first personal finance app
fix bug in batch SimpleFIN startDate logic (#504)
Matt Fiddaman30f21497a6fd
diff --git a/src/app-simplefin/app-simplefin.js b/src/app-simplefin/app-simplefin.jsindex 436ebd5521..44bc5d53bd 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.mdnew file mode 100644index 0000000000..5f3364eba1--- /dev/null+++ b/upcoming-release-notes/504.md@@ -0,0 +1,6 @@+---+category: Bugfix+authors: [matt-fidd]+---++Fix bug in batch SimpleFIN startDate logic