14031003
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using _0_Framework.Application;
|
||||
@@ -369,6 +370,8 @@ public class InsuranceListApplication: IInsuranceListApplication
|
||||
/// <returns></returns>
|
||||
public MainEmployeeDetailsViewModel SearchEmployeeForCreateInsuranceList( EmployeeForCreateInsuranceListSearchModel searchModel)
|
||||
{
|
||||
var watch = new Stopwatch();
|
||||
watch.Start();
|
||||
var result = new MainEmployeeDetailsViewModel();
|
||||
var workshopId = searchModel.WorkshopIds.FirstOrDefault();
|
||||
//var employerId = _workShopRepository.GetDetails(workshopId).EmployerIdList.FirstOrDefault();
|
||||
@@ -689,6 +692,7 @@ public class InsuranceListApplication: IInsuranceListApplication
|
||||
result.IsExist = true;
|
||||
result.IsBlock = isBolock;
|
||||
}
|
||||
Console.WriteLine("SearchEmployeeForCreateInsuranceList : " + watch.Elapsed);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@@ -154,6 +154,227 @@ public class IndexModel : PageModel
|
||||
return Partial("./EmployeeDatatable", result);
|
||||
}
|
||||
|
||||
|
||||
// -4
|
||||
/// <summary>
|
||||
/// زمان لود مودال ایجاد یا ویرایش محاسبه - DSSKAR
|
||||
/// </summary>
|
||||
/// <param name="employeeDetailsForInsuranceList"></param>
|
||||
/// <param name="typeOfInsuranceSendWorkshop"></param>
|
||||
/// <returns></returns>
|
||||
public IActionResult OnPostComputeInsuranceList(
|
||||
List<EmployeeDetailsForInsuranceListViewModel> employeeDetailsForInsuranceList,
|
||||
string typeOfInsuranceSendWorkshop)
|
||||
{
|
||||
double sumOfEmployees = employeeDetailsForInsuranceList.Count();
|
||||
double included = 0; //مشمول
|
||||
double sumOfWorkingDays = 0;
|
||||
double benefitsIncludedNonContinuous = 0; //مشمول غیر مستمر
|
||||
double sumOfSalaries = 0;
|
||||
double sumOfDailyWage = 0;
|
||||
double insuredShare = 0;
|
||||
double employerShare = 0; //سهم بیمه کارفرما
|
||||
double sumOfIncluded = 0;
|
||||
double unEmploymentInsurance = 0; //سهم بیمه بیکاری
|
||||
double monthlyBenefits = 0; //مزایای ماهیانه
|
||||
double sumForunEmploymentInsurance = 0;
|
||||
double benefitsIncludedContinuous = 0;
|
||||
double sumOfIncludedKarfarma = 0;
|
||||
var hasKarfarma = false;
|
||||
double countWithoutLeft = 0;
|
||||
|
||||
|
||||
for (var i = 0; i < employeeDetailsForInsuranceList.Count; i++)
|
||||
{
|
||||
var leftWorkDay = "";
|
||||
if (!string.IsNullOrWhiteSpace(employeeDetailsForInsuranceList[i].LeftWorkDate))
|
||||
{
|
||||
leftWorkDay = employeeDetailsForInsuranceList[i].LeftWorkDate.Substring(8, 2);
|
||||
if (leftWorkDay == "01")
|
||||
countWithoutLeft = countWithoutLeft + 1;
|
||||
else
|
||||
leftWorkDay = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
leftWorkDay = "";
|
||||
}
|
||||
|
||||
|
||||
// if (employeeDetailsForInsuranceList[i].IncludeStatus && (employeeDetailsForInsuranceList[i].JobId == 10 || employeeDetailsForInsuranceList[i].JobId == 17 || employeeDetailsForInsuranceList[i].JobId == 18 || employeeDetailsForInsuranceList[i].JobId == 16))// 10 --> karfarma
|
||||
if (!employeeDetailsForInsuranceList[i].IncludeStatus &&
|
||||
(employeeDetailsForInsuranceList[i].JobCode == "027079" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "024398" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "011015" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "020010")) // 10 --> karfarma
|
||||
{
|
||||
benefitsIncludedContinuous = 0;
|
||||
sumForunEmploymentInsurance = sumForunEmploymentInsurance;
|
||||
}
|
||||
else
|
||||
{
|
||||
sumForunEmploymentInsurance = sumForunEmploymentInsurance +
|
||||
employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
}
|
||||
|
||||
//if (employeeDetailsForInsuranceList[i].JobId == 10)//کارفرما
|
||||
if (employeeDetailsForInsuranceList[i].JobCode == "024398") //کارفرما
|
||||
{
|
||||
hasKarfarma = true;
|
||||
sumOfIncludedKarfarma = employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
}
|
||||
|
||||
sumOfWorkingDays = sumOfWorkingDays + employeeDetailsForInsuranceList[i].WorkingDays;
|
||||
sumOfDailyWage = sumOfDailyWage + employeeDetailsForInsuranceList[i].DailyWage;
|
||||
sumOfSalaries = sumOfSalaries + employeeDetailsForInsuranceList[i].MonthlySalary;
|
||||
monthlyBenefits = monthlyBenefits + +employeeDetailsForInsuranceList[i].MonthlyBenefits;
|
||||
sumOfIncluded = sumOfIncluded + employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
|
||||
if (leftWorkDay != "01") //اگر ترک کار آن یکم ماه نبود
|
||||
benefitsIncludedNonContinuous = benefitsIncludedNonContinuous +
|
||||
employeeDetailsForInsuranceList[i].IncludedAndNotIncluded;
|
||||
|
||||
|
||||
insuredShare = insuredShare + employeeDetailsForInsuranceList[i].InsuranceShare;
|
||||
}
|
||||
|
||||
employerShare = GetRoundValueWhitGovermentlist(sumOfIncluded * 20 / 100, typeOfInsuranceSendWorkshop);
|
||||
unEmploymentInsurance =
|
||||
GetRoundValueWhitGovermentlist(sumForunEmploymentInsurance * 3 / 100, typeOfInsuranceSendWorkshop);
|
||||
var totalEmployee = sumOfEmployees;
|
||||
//sumOfEmployees = sumOfEmployees - countWithoutLeft;
|
||||
|
||||
#region heydari
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft <= 5 && !hasKarfarma)
|
||||
//console.log(1);
|
||||
employerShare = 0;
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft <= 6 && hasKarfarma)
|
||||
{
|
||||
//console.log(sumOfIncludedKarfarma);
|
||||
var result = sumOfIncludedKarfarma * 20 / 100;
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft >= 6 && !hasKarfarma)
|
||||
{
|
||||
//ابتدا جمع کل مزایا به دست می آید
|
||||
//جمع کل مزایا تقسیم بر تعداد کارگران منهای کسانی که ترک کار کرده اند.
|
||||
//حاصل عبارت بالا در 5 ضرب میشو یعنی میانگینی برای محاسبه قیمت 5 نفر حساب می کنیم تا از طریق دولت پرداخت شود
|
||||
|
||||
var result = (sumOfIncluded - sumOfIncluded / (sumOfEmployees - countWithoutLeft) * 5) * 20 / 100;
|
||||
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft > 6 && hasKarfarma)
|
||||
{
|
||||
// console.log(4);
|
||||
//مجموع حقوق و مزایای ماهانه مشمول - حقوق و مزایای ماهانه مشمول کارفرما
|
||||
var sum = sumOfIncluded - sumOfIncludedKarfarma; //ستون مربوط به کارفرما محاسبه نمی شود
|
||||
var result = (sum - sum / (sumOfEmployees - countWithoutLeft - 1) * 5 + sumOfIncludedKarfarma) * 20 / 100;
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//sumOfIncluded مجموع حقوق و مزایای ماهیانه مشمول
|
||||
// عادی
|
||||
//if (typeOfInsuranceSendWorkshop != "Govermentlist" && !hasKarfarma)
|
||||
//{
|
||||
|
||||
// var empployerShare = (sumOfIncluded * 20) / 100; //سهم حق کارفرما
|
||||
// insuredShare = (sumOfIncluded * 7) / 100; //سهم حق بیمه شده
|
||||
// unEmploymentInsurance = (sumOfIncluded * 3) / 100; //بیمه بیکاری
|
||||
// employerShare = GetRoundValueWhitGovermentlist(empployerShare, typeOfInsuranceSendWorkshop);
|
||||
//}
|
||||
//else if (typeOfInsuranceSendWorkshop != "Govermentlist" && hasKarfarma)
|
||||
//{
|
||||
// var tweniSeven = (sumOfIncludedKarfarma * 27) / 100;
|
||||
// var sum = sumOfIncluded - sumOfIncludedKarfarma;
|
||||
// var tweni= (sum * 20) / 100;
|
||||
// var empployerShare = tweniSeven + tweni;
|
||||
|
||||
// insuredShare = (sum * 7) / 100;
|
||||
// unEmploymentInsurance = (sum * 3) / 100;
|
||||
|
||||
// employerShare = GetRoundValueWhitGovermentlist(empployerShare, typeOfInsuranceSendWorkshop);
|
||||
//}
|
||||
|
||||
// کمک دولت
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees <= 5 && !hasKarfarma)
|
||||
//{ //console.log(1);
|
||||
// employerShare = 0;
|
||||
//}
|
||||
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees <= 6 && hasKarfarma)
|
||||
//{
|
||||
// var tweniSeven = (sumOfIncludedKarfarma * 27) / 100;
|
||||
// var sum = sumOfIncluded - sumOfIncludedKarfarma;
|
||||
// insuredShare = (sum * 7) / 100;
|
||||
// unEmploymentInsurance = (sum * 3) / 100;
|
||||
|
||||
// employerShare = GetRoundValueWhitGovermentlist(tweniSeven, typeOfInsuranceSendWorkshop);
|
||||
//}
|
||||
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees >= 6 && !hasKarfarma)
|
||||
//{
|
||||
|
||||
|
||||
// var person = sumOfEmployees - 5;
|
||||
// var divide = sumOfIncluded / sumOfEmployees;
|
||||
// var result = divide * person;
|
||||
// var finalresult = (result * 20) / 100;
|
||||
// employerShare = GetRoundValueWhitGovermentlist(finalresult, typeOfInsuranceSendWorkshop);
|
||||
// // employerShare =getRoundValue(((sumOfIncluded/sumOfEmployees)*(sumOfEmployees-5))*20/100);
|
||||
//}
|
||||
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees > 6 && hasKarfarma)
|
||||
//{ // console.log(4);
|
||||
// var sum = sumOfIncluded - sumOfIncludedKarfarma;//ستون مربوط به کارفرما محاسبه نمی شود
|
||||
// sumOfEmployees = sumOfEmployees - 1;
|
||||
|
||||
// var person = sumOfEmployees - 5;
|
||||
// var divide = sum / sumOfEmployees;
|
||||
// var result = divide * person;
|
||||
// var finalresult = (result * 20) / 100;
|
||||
// var toeniSeven = (sumOfIncludedKarfarma * 27) / 100;
|
||||
// var sumOfUp = finalresult + toeniSeven;
|
||||
// insuredShare = (sum * 7) / 100;
|
||||
// var treePercent = (sum * 3) / 100;
|
||||
// employerShare = GetRoundValueWhitGovermentlist(sumOfUp, typeOfInsuranceSendWorkshop);
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
//تعداد نفرات
|
||||
SumOfEmployees = totalEmployee,
|
||||
//جمع حقوق ماهیانه
|
||||
SumOfSalaries = sumOfSalaries.ToMoney(),
|
||||
//جمع دستمزد روزانه
|
||||
SumOfDailyWage = sumOfDailyWage.ToMoney(),
|
||||
//جمع روزهای کارکرد
|
||||
SumOfWorkingDays = sumOfWorkingDays,
|
||||
//جمع مزایای ماهانه مشمول
|
||||
SumOfBenefitsIncluded = monthlyBenefits.ToMoney(),
|
||||
//مشمول
|
||||
Included = sumOfIncluded.ToMoney(),
|
||||
////مشمول و غیر مشمول
|
||||
IncludedAndNotIncluded = benefitsIncludedNonContinuous.ToMoney(),
|
||||
////IncludedAndNotIncluded = (sumOfIncluded + benefitsIncludedNonContinuous).ToMoney(),
|
||||
//سهم حق بیمه شده
|
||||
InsuredShare = insuredShare.ToMoney(),
|
||||
//سهم حق کارفرما
|
||||
EmployerShare = employerShare.ToMoney(),
|
||||
//بیمه بیکاری
|
||||
UnEmploymentInsurance = unEmploymentInsurance.ToMoney()
|
||||
});
|
||||
}
|
||||
public IActionResult OnPostCreate(CreateInsuranceList command)
|
||||
{
|
||||
//var result =new OperationResult();
|
||||
@@ -695,220 +916,7 @@ public class IndexModel : PageModel
|
||||
});
|
||||
}
|
||||
|
||||
// زمان لود مودال ایجاد یا ویرایش محاسبه dsskar
|
||||
public IActionResult OnPostComputeInsuranceList(
|
||||
List<EmployeeDetailsForInsuranceListViewModel> employeeDetailsForInsuranceList,
|
||||
string typeOfInsuranceSendWorkshop)
|
||||
{
|
||||
double sumOfEmployees = employeeDetailsForInsuranceList.Count();
|
||||
double included = 0; //مشمول
|
||||
double sumOfWorkingDays = 0;
|
||||
double benefitsIncludedNonContinuous = 0; //مشمول غیر مستمر
|
||||
double sumOfSalaries = 0;
|
||||
double sumOfDailyWage = 0;
|
||||
double insuredShare = 0;
|
||||
double employerShare = 0; //سهم بیمه کارفرما
|
||||
double sumOfIncluded = 0;
|
||||
double unEmploymentInsurance = 0; //سهم بیمه بیکاری
|
||||
double monthlyBenefits = 0; //مزایای ماهیانه
|
||||
double sumForunEmploymentInsurance = 0;
|
||||
double benefitsIncludedContinuous = 0;
|
||||
double sumOfIncludedKarfarma = 0;
|
||||
var hasKarfarma = false;
|
||||
double countWithoutLeft = 0;
|
||||
|
||||
|
||||
for (var i = 0; i < employeeDetailsForInsuranceList.Count; i++)
|
||||
{
|
||||
var leftWorkDay = "";
|
||||
if (!string.IsNullOrWhiteSpace(employeeDetailsForInsuranceList[i].LeftWorkDate))
|
||||
{
|
||||
leftWorkDay = employeeDetailsForInsuranceList[i].LeftWorkDate.Substring(8, 2);
|
||||
if (leftWorkDay == "01")
|
||||
countWithoutLeft = countWithoutLeft + 1;
|
||||
else
|
||||
leftWorkDay = "";
|
||||
}
|
||||
else
|
||||
{
|
||||
leftWorkDay = "";
|
||||
}
|
||||
|
||||
|
||||
// if (employeeDetailsForInsuranceList[i].IncludeStatus && (employeeDetailsForInsuranceList[i].JobId == 10 || employeeDetailsForInsuranceList[i].JobId == 17 || employeeDetailsForInsuranceList[i].JobId == 18 || employeeDetailsForInsuranceList[i].JobId == 16))// 10 --> karfarma
|
||||
if (!employeeDetailsForInsuranceList[i].IncludeStatus &&
|
||||
(employeeDetailsForInsuranceList[i].JobCode == "027079" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "024398" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "011015" ||
|
||||
employeeDetailsForInsuranceList[i].JobCode == "020010")) // 10 --> karfarma
|
||||
{
|
||||
benefitsIncludedContinuous = 0;
|
||||
sumForunEmploymentInsurance = sumForunEmploymentInsurance;
|
||||
}
|
||||
else
|
||||
{
|
||||
sumForunEmploymentInsurance = sumForunEmploymentInsurance +
|
||||
employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
}
|
||||
|
||||
//if (employeeDetailsForInsuranceList[i].JobId == 10)//کارفرما
|
||||
if (employeeDetailsForInsuranceList[i].JobCode == "024398") //کارفرما
|
||||
{
|
||||
hasKarfarma = true;
|
||||
sumOfIncludedKarfarma = employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
}
|
||||
|
||||
sumOfWorkingDays = sumOfWorkingDays + employeeDetailsForInsuranceList[i].WorkingDays;
|
||||
sumOfDailyWage = sumOfDailyWage + employeeDetailsForInsuranceList[i].DailyWage;
|
||||
sumOfSalaries = sumOfSalaries + employeeDetailsForInsuranceList[i].MonthlySalary;
|
||||
monthlyBenefits = monthlyBenefits + +employeeDetailsForInsuranceList[i].MonthlyBenefits;
|
||||
sumOfIncluded = sumOfIncluded + employeeDetailsForInsuranceList[i].BenefitsIncludedContinuous;
|
||||
|
||||
if (leftWorkDay != "01") //اگر ترک کار آن یکم ماه نبود
|
||||
benefitsIncludedNonContinuous = benefitsIncludedNonContinuous +
|
||||
employeeDetailsForInsuranceList[i].IncludedAndNotIncluded;
|
||||
|
||||
|
||||
insuredShare = insuredShare + employeeDetailsForInsuranceList[i].InsuranceShare;
|
||||
}
|
||||
|
||||
employerShare = GetRoundValueWhitGovermentlist(sumOfIncluded * 20 / 100, typeOfInsuranceSendWorkshop);
|
||||
unEmploymentInsurance =
|
||||
GetRoundValueWhitGovermentlist(sumForunEmploymentInsurance * 3 / 100, typeOfInsuranceSendWorkshop);
|
||||
var totalEmployee = sumOfEmployees;
|
||||
//sumOfEmployees = sumOfEmployees - countWithoutLeft;
|
||||
|
||||
#region heydari
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft <= 5 && !hasKarfarma)
|
||||
//console.log(1);
|
||||
employerShare = 0;
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft <= 6 && hasKarfarma)
|
||||
{
|
||||
//console.log(sumOfIncludedKarfarma);
|
||||
var result = sumOfIncludedKarfarma * 20 / 100;
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft >= 6 && !hasKarfarma)
|
||||
{
|
||||
//ابتدا جمع کل مزایا به دست می آید
|
||||
//جمع کل مزایا تقسیم بر تعداد کارگران منهای کسانی که ترک کار کرده اند.
|
||||
//حاصل عبارت بالا در 5 ضرب میشو یعنی میانگینی برای محاسبه قیمت 5 نفر حساب می کنیم تا از طریق دولت پرداخت شود
|
||||
|
||||
var result = (sumOfIncluded - sumOfIncluded / (sumOfEmployees - countWithoutLeft) * 5) * 20 / 100;
|
||||
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees - countWithoutLeft > 6 && hasKarfarma)
|
||||
{
|
||||
// console.log(4);
|
||||
//مجموع حقوق و مزایای ماهانه مشمول - حقوق و مزایای ماهانه مشمول کارفرما
|
||||
var sum = sumOfIncluded - sumOfIncludedKarfarma; //ستون مربوط به کارفرما محاسبه نمی شود
|
||||
var result = (sum - sum / (sumOfEmployees - countWithoutLeft - 1) * 5 + sumOfIncludedKarfarma) * 20 / 100;
|
||||
employerShare = GetRoundValueWhitGovermentlist(result, typeOfInsuranceSendWorkshop);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
//sumOfIncluded مجموع حقوق و مزایای ماهیانه مشمول
|
||||
// عادی
|
||||
//if (typeOfInsuranceSendWorkshop != "Govermentlist" && !hasKarfarma)
|
||||
//{
|
||||
|
||||
// var empployerShare = (sumOfIncluded * 20) / 100; //سهم حق کارفرما
|
||||
// insuredShare = (sumOfIncluded * 7) / 100; //سهم حق بیمه شده
|
||||
// unEmploymentInsurance = (sumOfIncluded * 3) / 100; //بیمه بیکاری
|
||||
// employerShare = GetRoundValueWhitGovermentlist(empployerShare, typeOfInsuranceSendWorkshop);
|
||||
//}
|
||||
//else if (typeOfInsuranceSendWorkshop != "Govermentlist" && hasKarfarma)
|
||||
//{
|
||||
// var tweniSeven = (sumOfIncludedKarfarma * 27) / 100;
|
||||
// var sum = sumOfIncluded - sumOfIncludedKarfarma;
|
||||
// var tweni= (sum * 20) / 100;
|
||||
// var empployerShare = tweniSeven + tweni;
|
||||
|
||||
// insuredShare = (sum * 7) / 100;
|
||||
// unEmploymentInsurance = (sum * 3) / 100;
|
||||
|
||||
// employerShare = GetRoundValueWhitGovermentlist(empployerShare, typeOfInsuranceSendWorkshop);
|
||||
//}
|
||||
|
||||
// کمک دولت
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees <= 5 && !hasKarfarma)
|
||||
//{ //console.log(1);
|
||||
// employerShare = 0;
|
||||
//}
|
||||
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees <= 6 && hasKarfarma)
|
||||
//{
|
||||
// var tweniSeven = (sumOfIncludedKarfarma * 27) / 100;
|
||||
// var sum = sumOfIncluded - sumOfIncludedKarfarma;
|
||||
// insuredShare = (sum * 7) / 100;
|
||||
// unEmploymentInsurance = (sum * 3) / 100;
|
||||
|
||||
// employerShare = GetRoundValueWhitGovermentlist(tweniSeven, typeOfInsuranceSendWorkshop);
|
||||
//}
|
||||
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees >= 6 && !hasKarfarma)
|
||||
//{
|
||||
|
||||
|
||||
// var person = sumOfEmployees - 5;
|
||||
// var divide = sumOfIncluded / sumOfEmployees;
|
||||
// var result = divide * person;
|
||||
// var finalresult = (result * 20) / 100;
|
||||
// employerShare = GetRoundValueWhitGovermentlist(finalresult, typeOfInsuranceSendWorkshop);
|
||||
// // employerShare =getRoundValue(((sumOfIncluded/sumOfEmployees)*(sumOfEmployees-5))*20/100);
|
||||
//}
|
||||
|
||||
//if (typeOfInsuranceSendWorkshop == "Govermentlist" && sumOfEmployees > 6 && hasKarfarma)
|
||||
//{ // console.log(4);
|
||||
// var sum = sumOfIncluded - sumOfIncludedKarfarma;//ستون مربوط به کارفرما محاسبه نمی شود
|
||||
// sumOfEmployees = sumOfEmployees - 1;
|
||||
|
||||
// var person = sumOfEmployees - 5;
|
||||
// var divide = sum / sumOfEmployees;
|
||||
// var result = divide * person;
|
||||
// var finalresult = (result * 20) / 100;
|
||||
// var toeniSeven = (sumOfIncludedKarfarma * 27) / 100;
|
||||
// var sumOfUp = finalresult + toeniSeven;
|
||||
// insuredShare = (sum * 7) / 100;
|
||||
// var treePercent = (sum * 3) / 100;
|
||||
// employerShare = GetRoundValueWhitGovermentlist(sumOfUp, typeOfInsuranceSendWorkshop);
|
||||
|
||||
|
||||
//}
|
||||
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
//تعداد نفرات
|
||||
SumOfEmployees = totalEmployee,
|
||||
//جمع حقوق ماهیانه
|
||||
SumOfSalaries = sumOfSalaries.ToMoney(),
|
||||
//جمع دستمزد روزانه
|
||||
SumOfDailyWage = sumOfDailyWage.ToMoney(),
|
||||
//جمع روزهای کارکرد
|
||||
SumOfWorkingDays = sumOfWorkingDays,
|
||||
//جمع مزایای ماهانه مشمول
|
||||
SumOfBenefitsIncluded = monthlyBenefits.ToMoney(),
|
||||
//مشمول
|
||||
Included = sumOfIncluded.ToMoney(),
|
||||
////مشمول و غیر مشمول
|
||||
IncludedAndNotIncluded = benefitsIncludedNonContinuous.ToMoney(),
|
||||
////IncludedAndNotIncluded = (sumOfIncluded + benefitsIncludedNonContinuous).ToMoney(),
|
||||
//سهم حق بیمه شده
|
||||
InsuredShare = insuredShare.ToMoney(),
|
||||
//سهم حق کارفرما
|
||||
EmployerShare = employerShare.ToMoney(),
|
||||
//بیمه بیکاری
|
||||
UnEmploymentInsurance = unEmploymentInsurance.ToMoney()
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
public double GetRoundValueWhitGovermentlist(double value, string type)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user