private bool IsValidDate(CalculateDTO calculateDTO) => calculateDTO.GetDaysAmount() >= 0;
Esempio n. 2
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);
        }