Exemplo n.º 1
0
        public decimal AccrualСalculation(int depositId, CalculateDTO calculateDTO)
        {
            logger.LogInformation($"Call AccrualСalculation");

            var deposit = depositsRepository.GetDepositById(depositId);

            validateService.ValidateCalculateDate(calculateDTO);

            decimal sum = calculateDTO.StartSum + calculateDTO.StartSum * deposit.InterestRate * calculateDTO.GetDaysAmount() / 365;

            return(sum);
        }