diff --git a/AccountManagement.Application/TaskScheduleApplication.cs b/AccountManagement.Application/TaskScheduleApplication.cs index 7e0d88f4..b43384f4 100644 --- a/AccountManagement.Application/TaskScheduleApplication.cs +++ b/AccountManagement.Application/TaskScheduleApplication.cs @@ -9,8 +9,6 @@ using System.Threading.Tasks; using System.Transactions; using AccountManagement.Domain.TaskAgg; using Company.Domain.HolidayItemAgg; -using PersianTools.Core; -using CompanyManagment.App.Contracts.Loan; namespace AccountManagement.Application; @@ -77,9 +75,9 @@ public class TaskScheduleApplication : ITaskScheduleApplication { taskSchedule.DeActive(); - var removableTask = tasks.Where(x => x.Assigns.All(a => a.IsDone == false && a.IsCancel == false)).ToList(); + var removableTask = tasks.Where(x=>x.Assigns.All(a=>a.IsDone==false && a.IsCancel == false)).ToList(); _taskRepository.RemoveRange(removableTask); - + } else { @@ -172,7 +170,7 @@ public class TaskScheduleApplication : ITaskScheduleApplication if (endOfMonth) { - for (int i = 1; i < count; i++) + for (int i = 1; i <= count; i++) { command.EndTaskDate = previousDateEdited.ToFarsi(); operation = _taskApplication.CreateTask(command); @@ -181,7 +179,7 @@ public class TaskScheduleApplication : ITaskScheduleApplication { var extra = month - 12; year++; - month = extra+unitNumber; + month = extra + unitNumber; } else { @@ -196,7 +194,7 @@ public class TaskScheduleApplication : ITaskScheduleApplication } - + previousDateEdited = previousDateRaw; diff --git a/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml b/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml index cb89c12e..3cc62ab9 100644 --- a/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml +++ b/ServiceHost/Areas/AdminNew/Pages/Company/Task/CreateScheduleModal.cshtml @@ -118,23 +118,23 @@
- + + + +