add new option to insurance
This commit is contained in:
@@ -18,7 +18,7 @@ public interface ICheckoutRepository : IRepository<long, Checkout>
|
||||
/// <param name="سال به صورت رشته عددی"></param>
|
||||
/// <param name="ماه بصورت رشته عددی"></param>
|
||||
/// <returns></returns>
|
||||
(bool hasChekout, double FamilyAlloance, double OverTimePay) HasCheckout(long workshopId, long employeId,
|
||||
(bool hasChekout, double FamilyAlloance, double OverTimePay, double RotatingShift, double Nightwork, double Fridaywork, double YraesPay) HasCheckout(long workshopId, long employeId,
|
||||
string year, string month);
|
||||
EditCheckout GetDetails(long id);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -71,7 +71,7 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
||||
/// <param name="سال به صورت رشته عددی"></param>
|
||||
/// <param name="ماه بصورت رشته عددی"></param>
|
||||
/// <returns></returns>
|
||||
public (bool hasChekout, double FamilyAlloance, double OverTimePay) HasCheckout(long workshopId, long employeId, string year, string month)
|
||||
public (bool hasChekout, double FamilyAlloance, double OverTimePay, double RotatingShift, double Nightwork, double Fridaywork, double YraesPay) HasCheckout(long workshopId, long employeId, string year, string month)
|
||||
{
|
||||
var farisMonthName = Tools.ToFarsiMonthByNumber(month);
|
||||
|
||||
@@ -79,9 +79,9 @@ public class CheckoutRepository : RepositoryBase<long, Checkout>, ICheckoutRepos
|
||||
x.WorkshopId == workshopId && x.EmployeeId == employeId && x.Year == year && x.Month == farisMonthName &&
|
||||
x.IsActiveString == "true");
|
||||
if (res == null)
|
||||
return (false, 0, 0);
|
||||
return (false, 0, 0,0,0,0,0);
|
||||
|
||||
return (true, res.FamilyAllowance, res.OvertimePay);
|
||||
return (true, res.FamilyAllowance, res.OvertimePay, res.ShiftPay, res.NightworkPay, res.FridayPay,res.YearsPay);
|
||||
}
|
||||
|
||||
public EditCheckout GetDetails(long id)
|
||||
|
||||
Reference in New Issue
Block a user