Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Goals: fix leftover 1 cent in remainder goal #1400

Merged
merged 4 commits into from
Jul 28, 2023
Merged

Goals: fix leftover 1 cent in remainder goal #1400

merged 4 commits into from
Jul 28, 2023

Conversation

youngcw
Copy link
Member

@youngcw youngcw commented Jul 26, 2023

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.

@netlify
Copy link

netlify bot commented Jul 26, 2023

Deploy Preview for actualbudget ready!

Name Link
🔨 Latest commit 23bda54
🔍 Latest deploy log https://app.netlify.com/sites/actualbudget/deploys/64c1a999253b230008ac3453
😎 Deploy Preview https://deploy-preview-1400.demo.actualbudget.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link
Contributor

Bundle Stats - desktop-client

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
16 2.08 MB 0%

Changeset

No files were changed

View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

No assets were smaller

Unchanged

Asset File Size % Changed
static/js/main.js 855.5 KB 0%
static/js/457.chunk.js 388.22 KB 0%
static/media/Inter-italic.var.woff2 239.29 KB 0%
static/media/Inter-roman.var.woff2 221.86 KB 0%
static/js/wide-components.chunk.js 156.84 KB 0%
static/js/383.chunk.js 117.35 KB 0%
static/js/reports.chunk.js 32.38 KB 0%
static/js/narrow-components.chunk.js 32.17 KB 0%
static/js/281.chunk.js 28.55 KB 0%
static/js/876.chunk.js 26.2 KB 0%
static/js/969.chunk.js 12.94 KB 0%
static/js/resize-observer-polyfill.chunk.js 8.12 KB 0%
static/css/main.css 5.82 KB 0%
asset-manifest.json 2.07 KB 0%
index.html 1.66 KB 0%
static/media/browser-server.js 963 B 0%

@github-actions
Copy link
Contributor

github-actions bot commented Jul 26, 2023

Bundle Stats - loot-core

Hey there, this message comes from a GitHub action that helps you and reviewers to understand how these changes affect the size of this project's bundle.

As this PR is updated, I'll keep you updated on how the bundle size is impacted.

Total

Files count Total bundle size % Changed
2 1.97 MB -> 1.97 MB (-9 B) -0.00%
Changeset
File Δ Size
packages/loot-core/src/server/budget/goaltemplates.ts 📈 +154 B (+0.72%) 20.78 KB -> 20.93 KB
View detailed bundle breakdown

Added

No assets were added

Removed

No assets were removed

Bigger

No assets were bigger

Smaller

Asset File Size % Changed
kcab.worker.js 1009.36 KB -> 1009.35 KB (-9 B) -0.00%

Unchanged

Asset File Size % Changed
xfo.xfo.kcab.worker.js 1004.04 KB 0%

@youngcw
Copy link
Member Author

youngcw commented Jul 26, 2023

not sure why this didn't pull in my most recent commit. Maybe someone more familiar with github knows what to do.

Needed a little prodding

@j-f1 j-f1 merged commit 5dd59c0 into actualbudget:master Jul 28, 2023
15 checks passed
@trafico-bot trafico-bot bot added ✨ Merged Pull Request has been merged successfully and removed ✅ Approved labels Jul 28, 2023
@youngcw youngcw deleted the remainder_1cent branch July 28, 2023 21:07
FlorianLang06 pushed a commit to FlorianLang06/actual that referenced this pull request Mar 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Merged Pull Request has been merged successfully
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants