/// <summary> /// Assigns the salary sheet report. /// </summary> /// <param name="reportPresenter">The report presenter.</param> private void AssignSalarySheetReport(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(); reportPresenter.AssignSalarySheetReport(this.reportService.RetrieveSalarySheet(reportPresenter.ReportFilter.DateFrom, reportPresenter.ReportFilter.DateTo, reportPresenter.SelectedDevelopers, SessionData.Instance.UserInfo.Developer.DeveloperID)); }