diff --git a/CompanyManagment.App.Contracts/Checkout/CreateCheckout.cs b/CompanyManagment.App.Contracts/Checkout/CreateCheckout.cs
index 514fd4fd..423d087c 100644
--- a/CompanyManagment.App.Contracts/Checkout/CreateCheckout.cs
+++ b/CompanyManagment.App.Contracts/Checkout/CreateCheckout.cs
@@ -139,6 +139,11 @@ public class CreateCheckout
public string ShiftWork { get; set; }
+ ///
+ /// محاسبه اضافه کار در بیمه
+ ///
+ public bool HasInsuranceChekoutOverTime {get; set; }
+
public List GroupedRollCalls { get; set; }
diff --git a/CompanyManagment.Application/CheckoutApplication.cs b/CompanyManagment.Application/CheckoutApplication.cs
index e54189e3..cc61fed1 100644
--- a/CompanyManagment.Application/CheckoutApplication.cs
+++ b/CompanyManagment.Application/CheckoutApplication.cs
@@ -169,10 +169,16 @@ public class CheckoutApplication : ICheckoutApplication
//فوق العاده جمعه کاری
command.FridayPay = fridayPercent * command.friday;
}
- //حق بیمه سهم کارگر
- var insuranceDeduction = (monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance) * 7 / 100;
+ //حق بیمه سهم کارگر
+ #region InsuranceDeduction
- if (command.OvertimePay > 0 && command.AbsenceDeduction > 0)
+ var insuranceOverTime = command.HasInsuranceChekoutOverTime ? command.OvertimePay : 0;
+ var insuranceDeduction = (monthlyWage + bacicYears + consumableItem + housingAllowance + marriedAllowance + insuranceOverTime) * 7 / 100;
+
+ #endregion
+
+
+ if (command.OvertimePay > 0 && command.AbsenceDeduction > 0)
{
if (command.AbsenceDeduction >= command.OvertimePay)
{
diff --git a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs
index 0a9c0abe..3032fcfa 100644
--- a/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs
+++ b/ServiceHost/Areas/Admin/Pages/Company/Checkouts/Index.cshtml.cs
@@ -978,6 +978,8 @@ public class IndexModel : PageModel
TotalSickLeave=mandatoryCompute.TotalSickLeave,
GroupedRollCalls = mandatoryCompute.GroupedRollCalls,
+ HasInsuranceChekoutOverTime = workshop.InsuranceCheckoutOvertime
+
};
_checkoutApplication.Create(command);