|
@@ -652,6 +652,8 @@ namespace OASystem.API.OAMethodLib
|
|
|
|
|
|
if (leaveDetails.Count > 0)
|
|
|
{
|
|
|
+ leaveDetails = leaveDetails.OrderBy(it => it.StartDt).OrderBy(it => it.EndDt).ToList();
|
|
|
+
|
|
|
foreach (LeaveDetails leave_item in leaveDetails)
|
|
|
{
|
|
|
decimal leave_meals = 0.00M;
|
|
@@ -662,6 +664,11 @@ namespace OASystem.API.OAMethodLib
|
|
|
//计算餐补 假勤类型扣款
|
|
|
CalculateTypeFee(leaveDetails,leaveType, leave_item.DtType, leave_item.StartDt, leave_item.EndDt, amountPayable, work_days,
|
|
|
new_duration,out leave_meals, out thisTypeDeduction);
|
|
|
+ if (leave_meals != 0)
|
|
|
+ {
|
|
|
+ leave_item.IsDeduction = true;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
#region 累计类型扣款
|
|
|
//1年假;2事假;3病假;4调休假;5婚假;6产假;7陪产假;8其他;9丧假
|
|
@@ -1249,8 +1256,22 @@ namespace OASystem.API.OAMethodLib
|
|
|
var njManyDaysItem = leaveDetails.Where(it => it.StartDt.ToString("yyyy-MM-dd") == startTime.ToString("yyyy-MM-dd")).ToList();
|
|
|
if (njManyDaysItem.Count > 1)
|
|
|
{
|
|
|
- mealDeduction = 10 * Math.Floor(duration);
|
|
|
- }
|
|
|
+ var njManyDaysItem1 = njManyDaysItem.Where(it => it.StartDt != startTime).ToList();
|
|
|
+ if (njManyDaysItem1.Count > 0)
|
|
|
+ {
|
|
|
+ if (njManyDaysItem1[0].Unit.Equals("天"))
|
|
|
+ {
|
|
|
+ mealDeduction = 10 * Math.Floor(duration);
|
|
|
+ }
|
|
|
+ else if (njManyDaysItem1[0].Unit.Equals("小时") && njManyDaysItem1[0].New_Duration >= 3)
|
|
|
+ {
|
|
|
+ mealDeduction = 10 * Math.Floor(duration);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ mealDeduction = 10 * Math.Ceiling(duration);
|
|
|
+ }
|
|
|
+ } }
|
|
|
else
|
|
|
{
|
|
|
mealDeduction = 10 * Math.Ceiling(duration);
|