From d0c80f9276160b24c5a9acd8b4031b72aa0d2ead Mon Sep 17 00:00:00 2001 From: chapal Date: Tue, 25 Mar 2025 11:09:47 +0600 Subject: [PATCH] Production bonus break time for ramadan --- HRM.DA/Service/Bonus/ProdBonusProcessService.cs | 8 ++++---- HRM.Report/Class/rptBonus.cs | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/HRM.DA/Service/Bonus/ProdBonusProcessService.cs b/HRM.DA/Service/Bonus/ProdBonusProcessService.cs index b217c32..60ed590 100644 --- a/HRM.DA/Service/Bonus/ProdBonusProcessService.cs +++ b/HRM.DA/Service/Bonus/ProdBonusProcessService.cs @@ -728,11 +728,11 @@ namespace HRM.DA if (ts.Minutes < 16 && ts.Hours < 5) wh = ts.Hours; else if (ts.Minutes < 16) - wh = ts.Hours - oProductionBonusSetup.BreakHour; + wh = ts.Hours - ((tAtt.InTime.Date >= new DateTime(2025, 3, 1) && tAtt.InTime.Date <= new DateTime(2025, 3, 28)) ? 0.5 : oProductionBonusSetup.BreakHour); else if (ts.TotalHours < 5) wh = ts.TotalHours; else - wh = ts.TotalHours - oProductionBonusSetup.BreakHour; + wh = ts.TotalHours - ((tAtt.InTime.Date >= new DateTime(2025, 3, 1) && tAtt.InTime.Date <= new DateTime(2025, 3, 28)) ? 0.5 : oProductionBonusSetup.BreakHour); hour += wh < 0 ? 0 : wh; } @@ -791,11 +791,11 @@ namespace HRM.DA if (ts.Minutes < 16 && ts.Hours < 5) wh = ts.Hours; else if (ts.Minutes < 16) - wh = ts.Hours - oProductionBonusSetup.BreakHour; + wh = ts.Hours - ((tAtt.InTime.Date>=new DateTime(2025,3,1) && tAtt.InTime.Date <= new DateTime(2025, 3, 28))?0.5: oProductionBonusSetup.BreakHour); else if (ts.TotalHours < 5) wh = ts.TotalHours; else - wh = ts.TotalHours - oProductionBonusSetup.BreakHour; + wh = ts.TotalHours - ((tAtt.InTime.Date >= new DateTime(2025, 3, 1) && tAtt.InTime.Date <= new DateTime(2025, 3, 28)) ? 0.5 : oProductionBonusSetup.BreakHour); // hour += ts.Hours < 0 ? 0 : ts.Hours; hour += wh < 0 ? 0 : wh; diff --git a/HRM.Report/Class/rptBonus.cs b/HRM.Report/Class/rptBonus.cs index 7310d16..2152e8f 100644 --- a/HRM.Report/Class/rptBonus.cs +++ b/HRM.Report/Class/rptBonus.cs @@ -411,11 +411,11 @@ namespace HRM.Report if (ts.Minutes < 16 && ts.Hours < 5) wh = ts.Hours; else if (ts.Minutes < 16) - wh = ts.Hours - design.BreakHour; + wh = ts.Hours - ((tAtt.InTime.Date >= new DateTime(2025, 3, 1) && tAtt.InTime.Date <= new DateTime(2025, 3, 28)) ? 0.5 : design.BreakHour); else if (ts.TotalHours < 5) wh = ts.TotalHours; else - wh = ts.TotalHours - design.BreakHour; + wh = ts.TotalHours - ((tAtt.InTime.Date >= new DateTime(2025, 3, 1) && tAtt.InTime.Date <= new DateTime(2025, 3, 28)) ? 0.5 : design.BreakHour); // hour += ts.Hours < 0 ? 0 : ts.Hours; hour = wh < 0 ? 0 : wh;