diff --git a/.github/Changelog.md b/.github/Changelog.md index d4b3308..9b408b3 100644 --- a/.github/Changelog.md +++ b/.github/Changelog.md @@ -7,9 +7,15 @@ ### Changelog BudgeTeer: #### v.0.1.2 +- Fehlerbehebung bei Aktivierung von Basic Auth +- Die Gültigkeit von künftigen Budgets wird bei deren Berechnung beachtet - ToDo - - Book budgets per month (NOT GLOBALLY) - - Add Weekly/Yearly budget types + - Mark budgets booked per month (NOT GLOBALLY) + - Add Yearly budget type (select month only for validity) + - Add Weekly budget type + - calculate weeks of month automatically + - instead of done check do done +/- counter button + - Allow displaying future remaining budget in head #### v.0.1.1 - Fehlerkorrektur beim Hinzufügen neuer Konten, Transaktionen und Budgets diff --git a/budgeteer/web_interface/vuejs_frontend/src/components/Budgets.vue b/budgeteer/web_interface/vuejs_frontend/src/components/Budgets.vue index 034c5ea..2454cee 100644 --- a/budgeteer/web_interface/vuejs_frontend/src/components/Budgets.vue +++ b/budgeteer/web_interface/vuejs_frontend/src/components/Budgets.vue @@ -16,7 +16,7 @@ function prettifyAmount(amount) { function calculateCategoryTotal(i) { let total = 0 for (let j = 0; j < store.state.data.budgets[i].entries.length; j++) { - if (showEntry(store.state.data.budgets[i].entries[j])) { + if (calculateEntry(store.state.data.budgets[i].entries[j])) { let amount = parseFloat(store.state.data.budgets[i].entries[j].amount) if (!isNaN(amount)) { total += amount @@ -41,6 +41,14 @@ function updateDisplayMonth(index) { display_month.value = new Date(indexed_date).toISOString().slice(0, 7) } +function calculateEntry(entry) { + if (displayMonthIsCurrentMonth()) { + return !entry.booked && checkEntryInDisplayMonth(entry) + } else { + return checkEntryInDisplayMonth(entry) + } +} + function showEntry(entry) { if (store.state.locked && displayMonthIsCurrentMonth()) { return !entry.booked && checkEntryInDisplayMonth(entry)