|
@@ -1295,10 +1295,6 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
typeDeduction = 0;
|
|
|
mealDeduction = 0;
|
|
|
-
|
|
|
- string am_starttime = "08:59";
|
|
|
- string am_endtime = "13:01";
|
|
|
-
|
|
|
decimal personalkLeave_dailywage_day = amountPayable / work_days; //日薪 = 事假日薪 *计算方式:日平均工资 = 当月应发工资 /当月应出勤天数。
|
|
|
|
|
|
//半小时单位
|
|
@@ -1362,7 +1358,13 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
if (date_Range_type == "halfday")
|
|
|
{
|
|
|
- mealDeduction = 10.00M * Math.Floor(duration); //餐补扣款
|
|
|
+ #region 处理当天是否扣除餐补
|
|
|
+ string formatDt_begin = startTime.ToString("yyyy-MM-dd");
|
|
|
+ List<LeaveDetails> leaveDetails1 = leaveDetails.Where(it => it.IsDeduction && it.EndDt.ToString("yyyy-MM-dd") == formatDt_begin).ToList();
|
|
|
+ if (leaveDetails1.Count > 0) mealDeduction = 10.00M * Math.Floor(duration); //餐补扣款
|
|
|
+ else mealDeduction = 10.00M * Math.Ceiling(duration); //餐补扣款
|
|
|
+ #endregion
|
|
|
+
|
|
|
if (duration % 1 == 0) //整天
|
|
|
{
|
|
|
typeDeduction = ConvertToDecimal(personalkLeave_dailywage_day * duration);
|
|
@@ -1372,19 +1374,14 @@ namespace OASystem.API.OAMethodLib
|
|
|
decimal sj_wholeDay = Math.Floor(duration); //整天
|
|
|
decimal sj_halfDay = duration % 1; //半天
|
|
|
|
|
|
- if (sj_halfDay > 0)
|
|
|
+ if (duration % 1 > 0)
|
|
|
{
|
|
|
- typeDeduction = (personalkLeave_dailywage_day / 0.50M) * duration;
|
|
|
-
|
|
|
- LeaveDetails sjDetailsMeal = leaveDetails.Where(it => it.EndDt == startTime).FirstOrDefault();
|
|
|
- if (sjDetailsMeal == null)
|
|
|
- {
|
|
|
- mealDeduction += 10.00M;
|
|
|
- }
|
|
|
+ typeDeduction = (personalkLeave_dailywage_day / 2.00M) * (duration / 0.50M);
|
|
|
+
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
- typeDeduction = personalkLeave_dailywage_day * sj_wholeDay;
|
|
|
+ typeDeduction = (personalkLeave_dailywage_day / 2.00M);
|
|
|
}
|
|
|
typeDeduction = ConvertToDecimal(typeDeduction);
|
|
|
}
|
|
@@ -1448,15 +1445,21 @@ namespace OASystem.API.OAMethodLib
|
|
|
}
|
|
|
else //多含 半天 另外处理
|
|
|
{
|
|
|
+ #region 处理当天是否扣除餐补
|
|
|
+ string formatDt_begin = startTime.ToString("yyyy-MM-dd");
|
|
|
+ List<LeaveDetails> leaveDetails1 = leaveDetails.Where(it => it.IsDeduction && it.EndDt.ToString("yyyy-MM-dd") == formatDt_begin).ToList();
|
|
|
+ if (leaveDetails1.Count > 0) mealDeduction = 10.00M * Math.Floor(duration); //餐补扣款
|
|
|
+ else mealDeduction = 10.00M * Math.Ceiling(duration); //餐补扣款
|
|
|
+ #endregion
|
|
|
+
|
|
|
if (duration % 1 > 0)
|
|
|
{
|
|
|
- typeDeduction = (pl_dailywage_day / 0.50M) * duration;
|
|
|
+ typeDeduction = (pl_dailywage_day / 2.00M) * (duration / 0.50M); ;
|
|
|
|
|
|
- LeaveDetails bjDetailsMeal = leaveDetails.Where(it => it.EndDt == startTime).FirstOrDefault();
|
|
|
- if (bjDetailsMeal == null)
|
|
|
- {
|
|
|
- mealDeduction += 10.00M;
|
|
|
- }
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ typeDeduction = (pl_dailywage_day / 2.00M);
|
|
|
}
|
|
|
|
|
|
typeDeduction = ConvertToDecimal(typeDeduction);
|
|
@@ -1645,7 +1648,6 @@ namespace OASystem.API.OAMethodLib
|
|
|
{
|
|
|
mealDeduction += 10.00M;
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
else
|
|
|
{
|