/// <summary> /// Calculates the sum of the selected account at the end of the month. /// This includes all payments coming until the end of month. /// </summary> /// <returns>Balance of the selected account including all payments to come till end of month.</returns> protected override async Task <double> GetEndOfMonthValue() { AccountViewModel account = await crudServices.ReadSingleAsync <AccountViewModel>(accountId) ; return(await balanceCalculationService.GetEndOfMonthBalanceForAccount(account)); }
/// <summary> /// Calculates the sum of the selected account at the end of the month. /// This includes all payments coming until the end of month. /// </summary> /// <returns>Balance of the selected account including all payments to come till end of month.</returns> protected override async Task <decimal> GetEndOfMonthValueAsync() { AccountViewModel account = mapper.Map <AccountViewModel>(await mediator.Send(new GetAccountByIdQuery(accountId))); return(await balanceCalculationService.GetEndOfMonthBalanceForAccount(account)); }