actualbudget / actualbudget/actual

[Bug]: Weekly "Cover schedule" budget automation under-budgets the next month if the current month has spending

オープン
#8,494 コメント 2 件 リアクション 1 件 担当者 0 名 GitHub で見る
goal templates UX
主要言語
TypeScript
スター
28.7k
フォーク
3k
平均マージ
2日 11時間
マージ済み PR(30日)
65

説明

### What happened?

I was trying to budget one month ahead for a weekly-recurring cost (e.g. rent) using a "Cover schedule" budget automation tied to a weekly Schedule, while the current month was still in progress.

Expected: budgeting the next month should allocate that month's full weekly total (4 x $100 = $400) independently of the current month's spending - this is how the plain "Fixed amount" automation behaves (with no Schedule attached), and how "Cover schedule" itself behaves as long as no spending has occurred yet in the current month.

Actual: once an expense has been logged against the category in the current month, applying "Cover schedule" to the next month only adds enough to fill the shortfall against the current balance/cap (e.g. +$100), instead of adding the full $400 for that month's occurrences. This means the amount budgeted for a future month silently depends on unrelated spending in the current month, rather than only on the number of scheduled occurrences.

For comparison, using a plain "Fixed amount" automation (no Schedule) for $100/week starting Fri 7 Aug:
* Applying to August budgets $400 (4 Fridays).
* Applying to September budgets an additional $400 (4 Fridays), independent of August's balance.
* Even with a $100 expense logged against the category first (dropping the envelope to $300), applying the automation still adds a full additional $400 on top, bringing the total to $700 - it calculates "4 occurrences x $100" for the month, not a top-up to some fixed cap.

Server version: v26.7.0

### How can we reproduce the issue?

1. Create a weekly Schedule for $100, starting on a Friday early in month A (dummy payee/account are fine).
2. Create a budget automation of type "Cover schedule" targeting that Schedule, on a category, with Savings mode "Save up for the next occurrence".
3. Apply the budget template to month A.
a. Expected: budgets the full total for month A's occurrences (e.g. $400 for 4 Fridays).
b. Actual: matches expected.
4. Log a transaction against that category partway through month A (e.g. a $100 expense).
5. Overwrite the budget template on month B (the next month).
a. Expected: budgets the full total for month B's occurrences (e.g. $400).
b. Actual: only adds enough to cover the shortfall from month A's cap (e.g. $100), under-budgeting month B.

**Configured schedule:**
Image

**Expected result (using 'Fixed amount' budget automation):**
Image

**Actual result (using 'Cover schedule' budget automation):**
Image

### Where are you hosting Actual?

Docker

### What browsers are you seeing the problem on?

Chrome

### Operating System

Mac OSX

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。