add valid leave to checkout sumSpan
This commit is contained in:
@@ -270,14 +270,16 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
{
|
||||
|
||||
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||
}
|
||||
totalLeaveSpan = starndardHoursesPerTotalDaysSapn;
|
||||
}
|
||||
else
|
||||
{
|
||||
sumSpans = sumSpans.Add(totalLeave);
|
||||
}
|
||||
totalLeaveSpan = totalLeave;
|
||||
}
|
||||
|
||||
|
||||
totalLeaveSpan = totalLeave;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -315,8 +317,12 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
}
|
||||
else
|
||||
{
|
||||
sumLeave = leavingDayCout * new TimeSpan(7, 20, 0);
|
||||
}
|
||||
var dayLeave = leavingDayCout * new TimeSpan(7, 20, 0);
|
||||
|
||||
sumLeave = dayLeave.Add(hoursesleaveTimeSpans);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (sumLeave > starndardHoursesPerTotalDaysSapn)
|
||||
@@ -334,17 +340,17 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
|
||||
}
|
||||
//اگر مرخصی روزانه نداشت و فقط مرخصی ساعتی داشت
|
||||
if (leaveSearchResult.Count == 0 && hoursesleave.Count > 0)
|
||||
{
|
||||
if (hoursesleaveTimeSpans > starndardHoursesPerTotalDaysSapn)
|
||||
{
|
||||
sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||
}
|
||||
else
|
||||
{
|
||||
sumSpans = sumSpans.Add(hoursesleaveTimeSpans);
|
||||
}
|
||||
}
|
||||
//if (leaveSearchResult.Count == 0 && hoursesleave.Count > 0)
|
||||
//{
|
||||
// if (hoursesleaveTimeSpans > starndardHoursesPerTotalDaysSapn)
|
||||
// {
|
||||
// sumSpans = sumSpans.Add(starndardHoursesPerTotalDaysSapn);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// sumSpans = sumSpans.Add(hoursesleaveTimeSpans);
|
||||
// }
|
||||
//}
|
||||
Console.WriteLine(sumSpans);
|
||||
#endregion
|
||||
//***********************************//
|
||||
@@ -365,7 +371,7 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
//TimeSpan mandatoryHoursTimeSpan = new TimeSpan(7, 20, 0).Multiply(mandatorDays);
|
||||
//TimeSpan Mandatory = sumSpansWhitOutleaves.Subtract(mandatoryHoursTimeSpan);
|
||||
|
||||
double mandatoryWorkWithOutleaves = (sumSpansWhitOutleaves.TotalMinutes) / 60;
|
||||
double mandatoryWorkWithOutleaves = (sumSpans.TotalMinutes) / 60;
|
||||
double overTimeWork = 0;
|
||||
if (mandatoryWorkWithOutleaves > mandatoryHours)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user