This commit is contained in:
2023-08-04 21:32:40 +03:00
parent 0d45061d81
commit 25184e9edc
6 changed files with 83 additions and 26 deletions
@@ -223,6 +223,7 @@ public class AccountRepository : AppRepository<Account>, IAccountRepository
{
return _context.Motions
.Where(x => x.DateTime >= from && x.DateTime <= to)
.Where(x => x.Item.Category!.UserId == userId)
.Where(x => x.Item.CategoryId == categoryId)
.Where(x => !x.Item.Category!.IsInternal)
.Where(x => x.Item.Category!.UserId == userId)
@@ -235,9 +236,9 @@ public class AccountRepository : AppRepository<Account>, IAccountRepository
})
.Select(x => new MotionTotalSimple
{
Name = x.Key.Name,
CurrencyId = x.Key.CurrencyId,
CurrencyName = x.Key.CurrencyName,
Name = x.Key.Name,
Amount = x.Sum(a => a.AmountPlus),
})
.ToList();