@actual-app/api 26.2.0-nightly.20260110 → 26.2.0-nightly.20260111

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -115923,6 +115923,9 @@ function getSinkingBaseContributionTotal(t2) {
115923
115923
  intervalMonths = 1;
115924
115924
  monthlyAmount = schedule.target / intervalMonths;
115925
115925
  break;
115926
+ default:
115927
+ monthlyAmount = schedule.target / schedule.target_interval;
115928
+ break;
115926
115929
  }
115927
115930
  total += monthlyAmount;
115928
115931
  }
@@ -115939,14 +115942,16 @@ async function runSchedule(template_lines, current_month, balance, remainder, la
115939
115942
  const scheduleTemplates = template_lines.filter((t22) => t22.type === "schedule");
115940
115943
  const t2 = await createScheduleList(scheduleTemplates, current_month, category);
115941
115944
  errors2 = errors2.concat(t2.errors);
115942
- const isPayMonthOf = (c) => c.full || c.target_frequency === "monthly" && c.target_interval === 1 && c.num_months === 0 || c.target_frequency === "weekly" && c.target_interval <= 4 || c.target_frequency === "daily" && c.target_interval <= 31 || isReflectBudget();
115945
+ const isPayMonthOf = (c) => c.full || (c.target_frequency === "monthly" || !c.target_frequency) && c.target_interval === 1 && c.num_months === 0 || c.target_frequency === "weekly" && c.target_interval <= 4 || c.target_frequency === "daily" && c.target_interval <= 31 || isReflectBudget();
115946
+ const isSubMonthly = (c) => c.target_frequency === "weekly" || c.target_frequency === "daily";
115943
115947
  const t_payMonthOf = t2.t.filter(isPayMonthOf);
115944
115948
  const t_sinking = t2.t.filter((c) => !isPayMonthOf(c)).sort((a, b) => a.next_date_string.localeCompare(b.next_date_string));
115949
+ const numSubMonthly = t2.t.filter(isSubMonthly).length;
115945
115950
  const totalPayMonthOf = getPayMonthOfTotal(t_payMonthOf);
115946
115951
  const totalSinking = getSinkingTotal(t_sinking);
115947
115952
  const totalSinkingBaseContribution = getSinkingBaseContributionTotal(t_sinking);
115948
115953
  const lastMonthGoal = await getSheetValue(sheetForMonth(subMonths(current_month, 1)), `goal-${category.id}`);
115949
- if (balance >= totalSinking + totalPayMonthOf || lastMonthGoal < totalSinking + totalPayMonthOf && lastMonthGoal !== 0 && balance >= lastMonthGoal) {
115954
+ if (balance >= totalSinking + totalPayMonthOf || lastMonthGoal < totalSinking + totalPayMonthOf && lastMonthGoal !== 0 && balance >= lastMonthGoal && numSubMonthly > 0) {
115950
115955
  to_budget += Math.round(totalPayMonthOf + totalSinkingBaseContribution);
115951
115956
  }
115952
115957
  else {
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "26.2.0-nightly.20260110",
3
+ "version": "26.2.0-nightly.20260111",
4
4
  "description": "An API for Actual",
5
5
  "license": "MIT",
6
6
  "files": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@actual-app/api",
3
- "version": "26.2.0-nightly.20260110",
3
+ "version": "26.2.0-nightly.20260111",
4
4
  "description": "An API for Actual",
5
5
  "license": "MIT",
6
6
  "files": [