/// <summary> /// Assigns the special leave report. /// </summary> /// <param name="reportPresenter">The report presenter.</param> private void AssignSpecialLeaveReport(ReportPresenter reportPresenter) { AssignSelectedDevelopersIds(reportPresenter); var dateFromYear = reportPresenter.ReportFilter.DateFrom.Year; var currentDate = DateTimeHelper.RetrieveCurrentDate(); reportPresenter.ReportFilter.DateTo = dateFromYear == currentDate.Year ? currentDate.Month == reportPresenter.ReportFilter.DateFrom.Month ? currentDate : reportPresenter.ReportFilter.DateFrom.RetrieveCurrentMonthEndDate() : reportPresenter.ReportFilter.DateFrom.RetrieveCurrentMonthEndDate(); int? leaveType = null; if (!reportPresenter.ReportFilter.SelectedLeaveType.Equals(DefaultId)) { leaveType = reportPresenter.ReportFilter.SelectedLeaveType; } reportPresenter.AssignSpecialLeaveReport(this.reportService.RetrieveLeaveSpecialReport(reportPresenter.ReportFilter.DateFrom, reportPresenter.ReportFilter.DateTo, reportPresenter.SelectedDevelopers, leaveType, SessionData.Instance.UserInfo.Developer.DeveloperID)); }