fix
All checks were successful
Docker Build & Deploy / Build Docker Image (push) Successful in 21s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
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 21s
Docker Build & Deploy / Deploy to Production (push) Successful in 6s
Docker Build & Deploy / Cleanup Dangling Images (push) Successful in 1s
Docker Build & Deploy / WeChat Notification (push) Successful in 2s
This commit is contained in:
@@ -370,10 +370,19 @@ public class BudgetSavingsService(
|
|||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
var savingsCategories = await configService.GetConfigByKeyAsync<string>("SavingsCategories") ?? string.Empty;
|
var savingsCategories = await configService.GetConfigByKeyAsync<string>("SavingsCategories") ?? string.Empty;
|
||||||
var current = monthlyExpenseItems.Sum(item => item.current)
|
var currentActual = 0m;
|
||||||
+ yearlyExpenseItems.Sum(item => item.current)
|
if (!string.IsNullOrEmpty(savingsCategories))
|
||||||
- monthlyIncomeItems.Sum(item => item.current)
|
{
|
||||||
- yearlyIncomeItems.Sum(item => item.current);
|
var cats = new HashSet<string>(savingsCategories.Split(',', StringSplitOptions.RemoveEmptyEntries));
|
||||||
|
foreach(var kvp in transactionClassify)
|
||||||
|
{
|
||||||
|
if (cats.Contains(kvp.Key.Item1))
|
||||||
|
{
|
||||||
|
currentActual += kvp.Value;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var record = new BudgetRecord
|
var record = new BudgetRecord
|
||||||
{
|
{
|
||||||
Id = -2,
|
Id = -2,
|
||||||
@@ -391,7 +400,7 @@ public class BudgetSavingsService(
|
|||||||
|
|
||||||
return BudgetResult.FromEntity(
|
return BudgetResult.FromEntity(
|
||||||
record,
|
record,
|
||||||
current,
|
currentActual,
|
||||||
new DateTime(year, month, 1),
|
new DateTime(year, month, 1),
|
||||||
description.ToString()
|
description.ToString()
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user