Compare commits
No commits in common. "edd488a6b4b4a6bbeb4c112480b5e3a2ee679076" and "f0f32b5cc12ffb9986c6d8531525c83886e55f40" have entirely different histories.
edd488a6b4
...
f0f32b5cc1
|
@ -662,8 +662,7 @@ namespace HRM.DA
|
|||
|
||||
foreach (ProductionBonusSetup oProductionBonusSetup in _oProductionBonusSetups)
|
||||
{
|
||||
//if (oProductionBonusSetup.ID != 12583)
|
||||
//{ continue; }
|
||||
|
||||
prodAttn = prodAttns.Where(x => x.ProdBonusSetupID == oProductionBonusSetup.ID).ToList();//ToObjectsTemplate();
|
||||
ProdBonusProcessItem oProcessItem = null;
|
||||
foreach (ProdBonusLine oLine in oProductionBonusSetup.ProductionBonusLinesNew)
|
||||
|
@ -690,8 +689,7 @@ namespace HRM.DA
|
|||
|
||||
}
|
||||
}
|
||||
//if (item.Key == 2991)
|
||||
//{ }
|
||||
|
||||
|
||||
bool isSuperVisor = allProdBonusSupervisors.FindIndex(x => x.EmployeeID == item.Key
|
||||
&& x.ProdBonusLineID == oLine.ID) == -1 ? false : true;
|
||||
|
|
|
@ -334,8 +334,7 @@ namespace HRM.Report
|
|||
List<Shift> oShifts = new ShiftService().GetAllShift();
|
||||
|
||||
Shift oShift = null;
|
||||
DateTime? bonusIntime = DateTime.MinValue;
|
||||
DateTime? bonusOuttime = DateTime.MinValue;
|
||||
|
||||
List<ProdBonusAttn> prodAttn = new ProdBonusAttnService().GetBySetupID(designId);
|
||||
string empIds = string.Empty;
|
||||
empIds = prodAttn.Select(x => x.EmployeeID).Distinct().Aggregate(new StringBuilder(), (sb, empid) => sb.Append(empid + ","), sb => sb.ToString().Trim(','));
|
||||
|
@ -363,7 +362,6 @@ namespace HRM.Report
|
|||
double hour = 0;
|
||||
foreach (ProdBonusAttn tAtt in tempAttn)
|
||||
{
|
||||
|
||||
DailyAttnProcess dailyAtt = oDailyAttnProsess.FirstOrDefault(o => o.AttnDate.Date == tAtt.InTime.Date &&
|
||||
o.EmployeeID == item.ID &&
|
||||
(o.AttenType == EnumAttendanceType.Present ||
|
||||
|
@ -372,36 +370,20 @@ namespace HRM.Report
|
|||
o.AttenType == EnumAttendanceType.Early ||
|
||||
o.AttenType == EnumAttendanceType.Late ||
|
||||
o.AttenType == EnumAttendanceType.OutSideDuty));
|
||||
|
||||
double wh = 0;
|
||||
if (dailyAtt != null)
|
||||
{
|
||||
|
||||
if (dailyAtt.OutTime != DateTime.MinValue && dailyAtt.InTime != DateTime.MinValue)
|
||||
{
|
||||
bonusIntime = dailyAtt.InTime;
|
||||
bonusOuttime = dailyAtt.OutTime;
|
||||
oShift = oShifts.FirstOrDefault(x => x.ID == dailyAtt.ShiftID);
|
||||
//if (design.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||
// dailyAtt.InTime = design.FromDate > dailyAtt.InTime ? design.FromDate : dailyAtt.InTime;
|
||||
//else if (design.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||
// dailyAtt.OutTime = design.ToDate < dailyAtt.OutTime ? design.ToDate : dailyAtt.OutTime;
|
||||
//else if (oShift != null && dailyAtt.InTime.Value.TimeOfDay < oShift.InTime.TimeOfDay)
|
||||
// dailyAtt.InTime = dailyAtt.InTime.Value.Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||
|
||||
if (design.FromDate.Date == dailyAtt.AttnDate.Date)
|
||||
bonusIntime = design.FromDate > dailyAtt.InTime ? design.FromDate : dailyAtt.InTime;
|
||||
else if (dailyAtt.InTime.GetValueOrDefault().TimeOfDay < tAtt.InTime.TimeOfDay)
|
||||
bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(tAtt.InTime.Hour).AddMinutes(tAtt.InTime.Minute);
|
||||
if (design.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||
bonusOuttime = design.ToDate < dailyAtt.OutTime ? design.ToDate : dailyAtt.OutTime;
|
||||
else if (dailyAtt.OutTime.GetValueOrDefault().TimeOfDay > tAtt.OutTime.TimeOfDay)
|
||||
bonusOuttime = dailyAtt.OutTime.GetValueOrDefault().Date.AddHours(tAtt.OutTime.Hour).AddMinutes(tAtt.OutTime.Minute);
|
||||
//else if (oShift != null && dailyAtt.InTime.GetValueOrDefault().TimeOfDay < oShift.InTime.TimeOfDay)
|
||||
// bonusIntime = dailyAtt.InTime.GetValueOrDefault().Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||
dailyAtt.InTime = design.FromDate > dailyAtt.InTime ? design.FromDate : dailyAtt.InTime;
|
||||
else if (design.ToDate.Date == dailyAtt.AttnDate.Date)
|
||||
dailyAtt.OutTime = design.ToDate < dailyAtt.OutTime ? design.ToDate : dailyAtt.OutTime;
|
||||
else if (oShift != null && dailyAtt.InTime.Value.TimeOfDay < oShift.InTime.TimeOfDay)
|
||||
dailyAtt.InTime = dailyAtt.InTime.Value.Date.AddHours(oShift.InTime.Hour).AddMinutes(oShift.InTime.Minute);
|
||||
|
||||
//TimeSpan ts = dailyAtt.OutTime.Value - dailyAtt.InTime.Value;
|
||||
TimeSpan ts = (TimeSpan)(bonusOuttime - bonusIntime);
|
||||
TimeSpan ts = dailyAtt.OutTime.Value - dailyAtt.InTime.Value;
|
||||
if (ts.Minutes < 16 && ts.Hours < 5)
|
||||
wh = ts.Hours;
|
||||
else if (ts.Minutes < 16)
|
||||
|
|
|
@ -208,10 +208,9 @@
|
|||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Sum(CDBL(Fields!WorkingHour.Value))</Value>
|
||||
<Value>=Sum(Fields!WorkingHour.Value)</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<Format>N2</Format>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
|
|
Loading…
Reference in New Issue
Block a user