Skip to content
Snippets Groups Projects
Unverified Commit bb1a4747 authored by shall0pass's avatar shall0pass Committed by GitHub
Browse files

Goals: Schedule include spent value in calculation (#1049)


This adds back the functionality, which was inadvertantly removed, that
includes the already spent column in the calculation when the template
is run.

Some transactions may be posted to the account prior to running the
templates and would result incorrect budgeted amounts.

---------

Co-authored-by: default avatarJed Fox <git@jedfox.com>
parent d6408599
No related branches found
No related tags found
No related merge requests found
......@@ -541,6 +541,7 @@ async function applyCategoryTemplate(
!priority
) {
to_budget += diff;
if (l === template_lines.length - 1) to_budget -= spent;
} else {
if (budgetAvailable > 0) to_budget = budgetAvailable;
errors.push(`Insufficient funds.`);
......
---
category: Bugfix
authors: [shall0pass]
---
Goals Schedule - Include spent in calculation
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment