InsuranceDeduction OverTime added for checkout

This commit is contained in:
SamSys
2025-06-16 17:58:55 +03:30
parent 7f98cf8f12
commit 41ec3fb9cf
3 changed files with 16 additions and 3 deletions

View File

@@ -139,6 +139,11 @@ public class CreateCheckout
public string ShiftWork { get; set; }
/// <summary>
/// محاسبه اضافه کار در بیمه
/// </summary>
public bool HasInsuranceChekoutOverTime {get; set; }
public List<GroupedRollCalls> GroupedRollCalls { get; set; }

View File

@@ -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)
{

View File

@@ -978,6 +978,8 @@ public class IndexModel : PageModel
TotalSickLeave=mandatoryCompute.TotalSickLeave,
GroupedRollCalls = mandatoryCompute.GroupedRollCalls,
HasInsuranceChekoutOverTime = workshop.InsuranceCheckoutOvertime
};
_checkoutApplication.Create(command);