add new option to insurance

This commit is contained in:
SamSys
2025-07-21 19:43:22 +04:00
parent aab65e07dc
commit 6e7199cf6d
3 changed files with 25 additions and 6 deletions

View File

@@ -440,6 +440,12 @@ public class InsuranceListApplication : IInsuranceListApplication
bool employeeHasCheckout = true;
double familyAllowance = 0;
double overTimePay = 0;
double rotatingShift = 0;
double nightWork = 0;
double fridayWork = 0;
double yearsPay = 0;
if (hasWorkshopOverTimeOrFamilyAllowance && (leftDate >= startDateGr || employee.LeftWorkDateGr == null))
{
var checkout = _checkoutRepository.HasCheckout(workshopId, employee.EmployeeId,
@@ -450,6 +456,11 @@ public class InsuranceListApplication : IInsuranceListApplication
familyAllowance = checkout.FamilyAlloance;
overTimePay = checkout.OverTimePay;
rotatingShift = checkout.RotatingShift;
nightWork = checkout.Nightwork;
fridayWork = checkout.Fridaywork;
yearsPay = checkout.YraesPay;
}
else
{
@@ -541,9 +552,17 @@ public class InsuranceListApplication : IInsuranceListApplication
// employeeListData != null ? employeeListData.BenefitsIncludedNonContinuous : 0;
double benefitsIncludedNonContinuous = 0;
if (workshop.InsuranceCheckoutFamilyAllowance && employeeHasCheckout && !isManager)
{
{
double addOptionsfromCheckout = familyAllowance;
benefitsIncludedNonContinuous = GetRoundValue(benefitsIncludedNonContinuous + familyAllowance);
//استثنا کارگته پایا تجارت مهراکو
if (workshopId == 652)
{
addOptionsfromCheckout = familyAllowance + rotatingShift + nightWork + fridayWork + yearsPay;
}
benefitsIncludedNonContinuous = GetRoundValue(benefitsIncludedNonContinuous + addOptionsfromCheckout);
}