Skip to content
This repository has been archived by the owner on Jun 30, 2024. It is now read-only.

Commit

Permalink
Fix validity check for budget entries
Browse files Browse the repository at this point in the history
  • Loading branch information
rix1337 committed Jul 29, 2023
1 parent 2c26ab2 commit a173055
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function prettifyAmount(amount) {
function calculateCategoryTotal(i) {
let total = 0
for (let j = 0; j < store.state.data.budgets[i].entries.length; j++) {
if ((!displayMonthIsCurrentMonth || !store.state.data.budgets[i].entries[j].booked) || !displayMonthIsCurrentMonth()) {
if (showEntry(store.state.data.budgets[i].entries[j])) {
let amount = parseFloat(store.state.data.budgets[i].entries[j].amount)
if (!isNaN(amount)) {
total += amount
Expand Down Expand Up @@ -46,7 +46,7 @@ function showEntry(entry) {
if (store.state.locked && displayMonthIsCurrentMonth()) {
return !entry.booked && checkEntryInDisplayMonth(entry)
} else {
return true
return checkEntryInDisplayMonth(entry)
}
}
Expand Down

0 comments on commit a173055

Please sign in to comment.