private double CalcOverSMSsLimitPrice(Line line, DateTime date, int clientId) { int clientTypeId = _clientRepository.GetClientById(clientId).ClientTypeId; int overLimitSMSs = 0; int SMSsInPackage = _packageRepository.GetSMSsInPackage(line.Id); int actualySMSs = _lineRepository.GetActualMonthSMSs(line.Id, date); if (actualySMSs > SMSsInPackage) { overLimitSMSs = actualySMSs - SMSsInPackage; } return(_paymentRepository.CalcOverLimitCallsPayment(overLimitSMSs, clientTypeId)); }