Skip to content

Commit

Permalink
Remove pending payments from trends (#132)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienbarbier committed Mar 4, 2024
1 parent 1820e57 commit d8208a9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/app/workers/Statistics.worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ function generateTrends(transactions, numberOfDayToAnalyse = 30) {
1000 * 60 * 60 * 24 * (numberOfDayToAnalyse + 2);

var list2 = transactions.filter(
(transaction) => transaction.date >= date3 && transaction.date <= date4
(transaction) =>
transaction.date >= date3 &&
transaction.date <= date4 &&
!transaction.isPending
);
list2.forEach((transaction) => {
if (transaction.amount < 0) {
Expand Down

0 comments on commit d8208a9

Please sign in to comment.