From 5ef277d604eb3f9ff840f18efbdc3e6a206bc882 Mon Sep 17 00:00:00 2001 From: SamSys Date: Sat, 10 May 2025 16:59:59 +0330 Subject: [PATCH] Insurance changes --- .../EmployeeDetailsForInsuranceListViewModel.cs | 10 ++++++++++ .../InsuranceListApplication.cs | 12 ++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/CompanyManagment.App.Contracts/InsuranceList/EmployeeDetailsForInsuranceListViewModel.cs b/CompanyManagment.App.Contracts/InsuranceList/EmployeeDetailsForInsuranceListViewModel.cs index 79957ec3..05283717 100644 --- a/CompanyManagment.App.Contracts/InsuranceList/EmployeeDetailsForInsuranceListViewModel.cs +++ b/CompanyManagment.App.Contracts/InsuranceList/EmployeeDetailsForInsuranceListViewModel.cs @@ -260,6 +260,16 @@ public class EmployeeDetailsForInsuranceListViewModel /// جهت محاسبه اضافه کار و حق اولاد /// public bool EmployeeHasCheckout { get; set; } + + /// + /// اضافه کار فیش حقوقی + /// + public double OverTimePay { get; set; } + + /// + /// حق اولاد فیش حقوقی + /// + public double FamilyAllowance { get; set; } ///// ///// مجموع پایه سنواتی کارکنان ///// DSK_INC diff --git a/CompanyManagment.Application/InsuranceListApplication.cs b/CompanyManagment.Application/InsuranceListApplication.cs index 510a5bdf..61dee99f 100644 --- a/CompanyManagment.Application/InsuranceListApplication.cs +++ b/CompanyManagment.Application/InsuranceListApplication.cs @@ -503,13 +503,13 @@ public class InsuranceListApplication: IInsuranceListApplication if (workshop.InsuranceCheckoutFamilyAllowance && employeeHasCheckout) { - benefitsIncludedNonContinuous = benefitsIncludedNonContinuous + familyAllowance; + benefitsIncludedNonContinuous += familyAllowance; } if (workshop.InsuranceCheckoutOvertime && employeeHasCheckout) { - benefitsIncludedContinuous = benefitsIncludedContinuous + overTimePay; + benefitsIncludedContinuous += overTimePay; } var includedAndNotIncluded = benefitsIncludedContinuous + benefitsIncludedNonContinuous; @@ -579,10 +579,10 @@ public class InsuranceListApplication: IInsuranceListApplication //جمع مزایای مشمول و دستمزد ماهانه BenefitsIncludedContinuous = benefitsIncludedContinuous, - //مزایای غیر مشمول + //مزایای غیر مشمول * BenefitsIncludedNonContinuous = benefitsIncludedNonContinuous, - // جمع کل دستمزد و مزایای ماهانه مشمول و غیر مشمول + // جمع کل دستمزد و مزایای ماهانه مشمول و غیر مشمول * IncludedAndNotIncluded = includedAndNotIncluded, //حق بیمه سهم بیمه شده @@ -1480,10 +1480,14 @@ public class InsuranceListApplication: IInsuranceListApplication //آیا در کارگاه تیک محاسبه اضافه کار یا حق اولاد زده شده است؟ + //این مورد زمانی چک می شود که تیک محاسبه در کارگاه زده شده باشد + // در غیر اینصورت بصورت پیشفرض دارای فیش حقوق در نظر گرفته می شود bool hasWorkshopOverTimeOrFamilyAllowance = workshop.InsuranceCheckoutFamilyAllowance || workshop.InsuranceCheckoutOvertime; bool employeeHasCheckout = true; + double familyAllowance = 0; + double overTimePay = 0; if (hasWorkshopOverTimeOrFamilyAllowance && (leftDate >= startDateGr || employeeData.LeftWorkDateGr == null)) { var checkout = _checkoutRepository.HasCheckout(workshopId, employeeData.EmployeeId,