[PR #1400] [MERGED] Goals: fix leftover 1 cent in remainder goal #3712

Closed
opened 2026-02-28 20:45:38 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/actualbudget/actual/pull/1400
Author: @youngcw
Created: 7/26/2023
Status: Merged
Merged: 7/28/2023
Merged by: @j-f1

Base: masterHead: remainder_1cent


📝 Commits (4)

📊 Changes

2 files changed (+10 additions, -1 deletions)

View changed files

📝 packages/loot-core/src/server/budget/goaltemplates.ts (+4 -1)
upcoming-release-notes/1400.md (+6 -0)

📄 Description

Depending on the remainder scaling and weights there is sometimes 1 cent leftover after the remainder pass in the goals. I allowed the scale factor to include sub cents, which sometimes fixes the issue, and an explicit check. This way high weight templates will pull in the extra most of the time as expected, but if the weights are about even then the last one run will get the floating 1 cent. I think there could still be an edge case when the total weights is very high with respect to funds available, but its likely not a big deal.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/actualbudget/actual/pull/1400 **Author:** [@youngcw](https://github.com/youngcw) **Created:** 7/26/2023 **Status:** ✅ Merged **Merged:** 7/28/2023 **Merged by:** [@j-f1](https://github.com/j-f1) **Base:** `master` ← **Head:** `remainder_1cent` --- ### 📝 Commits (4) - [`a79b6a5`](https://github.com/actualbudget/actual/commit/a79b6a5fdd6ad64ff2e95778b838a9661384d1db) fix leftover 1 cent that could arise in the remainder calcs - [`18d5196`](https://github.com/actualbudget/actual/commit/18d51961aa1ab4d6da8cb1e150219acf90241633) release note - [`f9ebe52`](https://github.com/actualbudget/actual/commit/f9ebe52223ebd66df921772123d98b3a45a668e4) lint - [`23bda54`](https://github.com/actualbudget/actual/commit/23bda54134f94e5289d1faea4060c808a169b921) are you alive github? ### 📊 Changes **2 files changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/loot-core/src/server/budget/goaltemplates.ts` (+4 -1) ➕ `upcoming-release-notes/1400.md` (+6 -0) </details> ### 📄 Description Depending on the remainder scaling and weights there is sometimes 1 cent leftover after the remainder pass in the goals. I allowed the scale factor to include sub cents, which sometimes fixes the issue, and an explicit check. This way high weight templates will pull in the extra most of the time as expected, but if the weights are about even then the last one run will get the floating 1 cent. I think there could still be an edge case when the total weights is very high with respect to funds available, but its likely not a big deal. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-02-28 20:45:38 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/actual#3712