Skip to content

Commit

Permalink
fix bug in batch SimpleFIN startDate logic (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-fidd authored Nov 21, 2024
1 parent b1bf7ee commit 30f2149
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/app-simplefin/app-simplefin.js
Original file line number Diff line number Diff line change
Expand Up @@ -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' };
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/504.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [matt-fidd]
---

Fix bug in batch SimpleFIN startDate logic

0 comments on commit 30f2149

Please sign in to comment.