actualbudget / actualbudget/actual
[Bug]: Multiple "#template by x repeat every y" lines in same category notes calculate incorrect total budget amount
- 主要语言
- TypeScript
- 星标
- 28.7k
- 派生
- 3k
- 平均合并
- 2 天 11 小时
- 30 天内合并 PR
- 65
描述
### Verified issue does not already exist?
- [x] I have searched and found no existing issue
### What happened?
I'm experiencing a bug with template calculations when multiple "#template by x repeat every y" lines are in the same category. The budgeted amount behaves incorrectly, and strangely actually increases when I remove items. The individual template calculations appear correct when isolated, but the combined calculation in a single category produces incorrect results.
I am using Actual 25.10.0, hosted with docker on my own server. I did not find any other bug reports mentioning this exact issue, but maybe #5585 is related?
### How can we reproduce the issue?
I always use override with budget template to be sure.
1. Create a new empty category with the following templates in the notes field:
```
A
#template-3 800 by 2033-01 repeat every 7 years
B
#template-3 700 by 2033-01 repeat every 7 years
C
#template-3 200 by 2026-03 repeat every 5 years
D
#template-3 80 by 2030-01 repeat every 4 years
E
#template-3 1000 by 2030-01 repeat every 10 years
F
#template-3 400 by 2025-12 repeat every 5 years
G
#template-3 2000 by 2030-01 repeat every 10 years
```
2. Run templates in 2025-10
3. Budgeted amount becomes €781.83
When I run the templates individually i get these amounts:
- A: €9.09
- B: €7.95
- C: €33.33
- D: €1.54
- E: €19.23
- F: €133.33
- G: €38.46
- Expected total: €242.93
4. When removing the A template (keeping B-G), Actual budgets €785.00
5. When removing A and B templates (keeping C-G), actual budgets €787.78
### Where are you hosting Actual?
Docker
### What browsers are you seeing the problem on?
Firefox
### Operating System
None
贡献指南
评估
这个 Issue 还没有评估数据。