fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 30s
Docker Build & Deploy / Deploy to Production (push) Successful in 12s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 30s
Docker Build & Deploy / Deploy to Production (push) Successful in 12s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
This commit is contained in:
@@ -118,11 +118,6 @@
|
||||
</van-tab>
|
||||
|
||||
<van-tab title="存款" :name="BudgetCategory.Savings">
|
||||
<BudgetSummary
|
||||
:stats="overallStats"
|
||||
:title="activeTabTitle"
|
||||
:get-value-class="getValueClass"
|
||||
/>
|
||||
<div class="budget-list">
|
||||
<template v-if="savingsBudgets?.length > 0">
|
||||
<van-swipe-cell v-for="budget in savingsBudgets" :key="budget.id">
|
||||
|
||||
@@ -169,23 +169,10 @@ public class BudgetController(
|
||||
decimal incomeLimitAtPeriod = 0;
|
||||
decimal expenseLimitAtPeriod = 0;
|
||||
|
||||
var savingsCategories = await configService.GetConfigByKeyAsync<string>("SavingsCategories") ?? string.Empty;
|
||||
var selectedCategoryList = savingsCategories.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||
|
||||
foreach (var b in allBudgets)
|
||||
{
|
||||
if (b.IsStopped || b.Category == BudgetCategory.Savings) continue;
|
||||
|
||||
// 如果设置了存款分类,并且预算有指定分类,则只统计相关的预算
|
||||
if (selectedCategoryList.Length > 0)
|
||||
{
|
||||
var budgetCategories = b.SelectedCategories.Split(',', StringSplitOptions.RemoveEmptyEntries);
|
||||
if (budgetCategories.Length > 0 && !budgetCategories.Intersect(selectedCategoryList).Any())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// 折算系数:根据当前请求的 periodType (Year 或 Month),将预算 b 的 Limit 折算过来
|
||||
decimal factor = 1.0m;
|
||||
|
||||
@@ -218,6 +205,7 @@ public class BudgetController(
|
||||
else if (b.Category == BudgetCategory.Expense) expenseLimitAtPeriod += b.Limit * factor;
|
||||
}
|
||||
|
||||
var savingsCategories = await configService.GetConfigByKeyAsync<string>("SavingsCategories") ?? string.Empty;
|
||||
var virtualBudget = new BudgetRecord
|
||||
{
|
||||
Id = periodType == BudgetPeriodType.Year ? -1 : -2,
|
||||
|
||||
Reference in New Issue
Block a user