Merge branch 'Feature/admin-dashboard/migrate-next' into Main
This commit is contained in:
@@ -3,4 +3,6 @@
|
||||
public class AppSettingConfiguration
|
||||
{
|
||||
public string Domain { get; set; }
|
||||
public string ClientDomain =>"client"+Domain;
|
||||
public string AdminDomain =>"admin"+Domain;
|
||||
}
|
||||
@@ -477,26 +477,42 @@ public static class Tools
|
||||
string bb = string.Empty;
|
||||
bool isNegative = false;
|
||||
|
||||
for (int x = 0; x < myMoney.Length; x++)
|
||||
try
|
||||
{
|
||||
if (char.IsDigit(myMoney[x]))
|
||||
if (!string.IsNullOrWhiteSpace(myMoney))
|
||||
{
|
||||
bb += myMoney[x];
|
||||
}
|
||||
else if (myMoney[x] == '-' && bb.Length == 0)
|
||||
{
|
||||
// اگر علامت منفی قبل از اولین عدد آمد، در نظر بگیر
|
||||
isNegative = true;
|
||||
}
|
||||
}
|
||||
for (int x = 0; x < myMoney.Length; x++)
|
||||
{
|
||||
if (char.IsDigit(myMoney[x]))
|
||||
{
|
||||
bb += myMoney[x];
|
||||
}
|
||||
else if (myMoney[x] == '-' && bb.Length == 0)
|
||||
{
|
||||
// اگر علامت منفی قبل از اولین عدد آمد، در نظر بگیر
|
||||
isNegative = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
double res = double.Parse(bb);
|
||||
return isNegative ? -res : res;
|
||||
if (bb.Length > 0)
|
||||
{
|
||||
double res = double.Parse(bb);
|
||||
return isNegative ? -res : res;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
catch (Exception)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace Company.Domain.ClassifiedSalaryAgg
|
||||
{
|
||||
public class ClassifiedSalary : EntityBase
|
||||
{
|
||||
//test
|
||||
//test//test
|
||||
public ClassifiedSalary(double group1, double group2, double group3, double group4, double group5, double group6, double group7, double group8, double group9, double group10, double group11, double group12, double group13, double group14, double group15, double group16, double group17, double group18, double group19, double group20, DateTime startDate, DateTime endDate, int year)
|
||||
{
|
||||
Group1 = group1;
|
||||
|
||||
@@ -17,7 +17,7 @@ public class Contract : EntityBase
|
||||
public Contract(long personnelCode, long employeeId, long employerId,
|
||||
long workshopIds, long yearlySalaryId, DateTime contarctStart, DateTime contractEnd, string dayliWage,
|
||||
string archiveCode, DateTime getWorkDate, DateTime setContractDate, string jobType,
|
||||
string contractType, string workshopAddress1, string workshopAddress2, string consumableItems, long jobTypeId, string housingAllowance, string agreementSalary, string workingHoursWeekly, string familyAllowance, string contractPeriod)
|
||||
string contractType, string workshopAddress1, string workshopAddress2, string consumableItems, long jobTypeId, string housingAllowance, string agreementSalary, string workingHoursWeekly, string familyAllowance, string contractPeriod, double dailySalaryAffected, double baseYearAffected, double dailySalaryUnAffected, double baseYearUnAffected, bool hasManualDailyWage, string dailyWageType)
|
||||
{
|
||||
PersonnelCode = personnelCode;
|
||||
EmployeeId = employeeId;
|
||||
@@ -45,6 +45,19 @@ public class Contract : EntityBase
|
||||
WorkingHoursWeekly = workingHoursWeekly;
|
||||
FamilyAllowance = familyAllowance;
|
||||
ContractPeriod = contractPeriod;
|
||||
|
||||
//پراپرتی های جدید برای دستمزد دلخواه
|
||||
#region NewManualDailyWage
|
||||
DailySalaryAffected = dailySalaryAffected;
|
||||
BaseYearAffected = baseYearAffected;
|
||||
DailySalaryUnAffected = dailySalaryUnAffected;
|
||||
BaseYearUnAffected = baseYearUnAffected;
|
||||
HasManualDailyWage = hasManualDailyWage;
|
||||
DailyWageType = dailyWageType;
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
Signature = "0";
|
||||
|
||||
|
||||
@@ -65,7 +78,42 @@ public class Contract : EntityBase
|
||||
public DateTime SetContractDate { get; private set; }
|
||||
public string JobType { get; private set; }
|
||||
public string ContractType { get; private set; }
|
||||
/// <summary>
|
||||
/// مزد تجمیعی یعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public string DayliWage { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزد روزانه دستی وارد شده است؟
|
||||
/// </summary>
|
||||
public bool HasManualDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
|
||||
public string IsActiveString { get; private set; }
|
||||
public string ArchiveCode { get; private set; }
|
||||
public string WorkshopAddress1 { get; private set; }
|
||||
@@ -89,6 +137,7 @@ public class Contract : EntityBase
|
||||
|
||||
public Contract()
|
||||
{
|
||||
|
||||
WorkingHoursList = new List<WorkingHours>();
|
||||
}
|
||||
public void Edit(long pesrsonnelCode, long employeeId, long employerId, long workshopId, long yearlySalaryId,
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.Domain;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
@@ -9,6 +10,24 @@ namespace Company.Domain.ContractAgg;
|
||||
|
||||
public interface IContractRepository : IRepository<long, Contract>
|
||||
{
|
||||
/// <summary>
|
||||
/// دریافت مزد ارتقاء یافته
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="yearlySalaryId"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت لیست مزد ارتقاء یافته
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="contractStart"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpgradeManualDailyWageModel> GetManualDailWageList(long workshopId, long employeeId,
|
||||
DateTime contractStart);
|
||||
EditContract GetDetails(long id);
|
||||
EditContract GetContractByStartEnd(DateTime start, DateTime end, long workshopId, long employeeId);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace Company.Domain.RollCallAgg;
|
||||
|
||||
public interface IRollCallMandatoryRepository : IRepository<long, RollCall>
|
||||
{
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, bool totalLeaveCompute);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute);
|
||||
|
||||
/// <summary>
|
||||
/// محاسبه ساعات کارکرد پرسنل در صورت داشتن حضور غیاب
|
||||
|
||||
@@ -6,6 +6,7 @@ using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using System.Threading.Tasks;
|
||||
using CompanyManagment.App.Contracts.Checkout;
|
||||
using CompanyManagment.App.Contracts.Holiday;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
namespace Company.Domain.YearlySalaryAgg;
|
||||
|
||||
@@ -17,11 +18,39 @@ public interface IYearlySalaryRepository : IRepository<long, YearlySalary>
|
||||
void TestDayliFeeCompute();
|
||||
List<string> GetYears();
|
||||
List<YearlySalaryViewModel> GetYearlySalary();
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مزد روزانه فیش حقوقی
|
||||
/// </summary>
|
||||
/// <param name="contract"></param>
|
||||
/// <param name="checkoutStart"></param>
|
||||
/// <param name="checkoutEnd"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetCheckoutDailyWage(EditContract contract, DateTime checkoutStart, DateTime checkoutEnd);
|
||||
|
||||
/// <summary>
|
||||
/// دریافت مزد روزانه بر اساس تاریخ شروع و پایان
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <returns></returns>
|
||||
Task<(double dailyWage, long yearlySalaryId)> GetDailyWageByStartEnd(DateTime start, DateTime end);
|
||||
|
||||
MontlywageBunosYearsViewModel GetMontlyBunosYears(TimeSpan weeklyTime, DateTime contractStart,DateTime contractEnd, double daylyWage, string weeklyWorkingTime, int officialholiday, int friday, string totalHoursH, string totalHorsM, string basic, int fridayStartToEnd, double dayliFeeComplete, bool hasRollCall, bool holidaysWorking,string shiftWork);
|
||||
double GetLeavePay(DateTime contractStart, DateTime contractEnd, double daylyWage, double consumableItem, double housingAllowance, double familyAllowance , string weeklyWorkingTime, int officialholiday, int friday, string totalHoursH, string totalHorsM);
|
||||
double GetOverTimeWorking(double dayliWage, string overTimeWorkH, string overTimeWorkM);
|
||||
double GetOverNightWorking(double dayliWage, string overNightWorkH, string overNightWorkM, string weeklyWorkingTime, int officialholiday, int friday, DateTime contractStart, DateTime contractEnd, string totalHoursH, string totalHorsM);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// متد ارتقاء مزد دلخواه
|
||||
/// </summary>
|
||||
/// <param name="newContractStart"></param>
|
||||
/// <param name="lastContractStart"></param>
|
||||
/// <param name="lastContractManualDailyWage"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpgradeManualDailyWageModel> UpgradeManualDailyWage(DateTime newContractStart, DateTime lastContractStart,
|
||||
double lastContractManualDailyWage);
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات و لیست پایه سنوات های پرسنل
|
||||
/// </summary>
|
||||
|
||||
@@ -162,4 +162,35 @@ public class CreateCheckout
|
||||
|
||||
public bool HasLeft { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه دریافت شده از سمت فرانت
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffectedStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد سالانه نرمال دریافت از سمت فرانت
|
||||
/// </summary>
|
||||
public string NormalDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
}
|
||||
@@ -61,9 +61,23 @@ public class ComputingViewModel
|
||||
/// </summary>
|
||||
public TimeSpan EmployeeMandatoryHours { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// مجموع مرخصی های پرسنل در این فیش حقوقی
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
//public TimeSpan TotalLeaveOnThisCheckout { get; set; }
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
//public List<string> holidays;
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Contract;
|
||||
/// <summary>
|
||||
/// نمایش نحوه محاسبه پایه سنوات و دستمزد روزانه
|
||||
/// </summary>
|
||||
public class ContractDailyWageAndBaseYearReport
|
||||
{
|
||||
/// <summary>
|
||||
/// لیست داده های محاسبه پایه سنوات
|
||||
/// </summary>
|
||||
public BaseYearDataViewModel BaseYearDataViewModel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات متاثر از ساعت کار
|
||||
/// </summary>
|
||||
public string BaseYearAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه متاثر از ساعت کار
|
||||
/// </summary>
|
||||
public string DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه بدون تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه تجمیعی
|
||||
/// </summary>
|
||||
public string DailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// تاریخ قراداد
|
||||
/// </summary>
|
||||
public string ContractDate { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست ارتقاء
|
||||
/// </summary>
|
||||
public List<UpgradeManualDailyWageList> UpgradeManualDailyWageLists { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام پرسنل
|
||||
/// </summary>
|
||||
public string EmployeeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نام کارگاه
|
||||
/// </summary>
|
||||
public string WorkshopName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا با متد جدید محاسبه شده
|
||||
/// </summary>
|
||||
public bool OldComputeMethod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا محاسبات با مقادیر ذخیره شده مغایرت دارد
|
||||
/// </summary>
|
||||
public bool Contradiction { get; set; }
|
||||
}
|
||||
@@ -140,7 +140,36 @@ public class CreateContract
|
||||
public string ConvertMonth { get; set; }
|
||||
public string FormStep { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزد روزانه دستی وارد شده است؟
|
||||
/// </summary>
|
||||
public bool HasManualDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
public List<ContractViweModel> Contracts { get; set; }
|
||||
public List<WorkshopViewModel> Workshops { get; set; }
|
||||
public List<EmployerViewModel> Employers { get; set; }
|
||||
|
||||
@@ -7,6 +7,14 @@ namespace CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
public interface IContractApplication
|
||||
{
|
||||
/// <summary>
|
||||
/// دریافت مزد ارتقاء یافته
|
||||
/// </summary>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="yearlySalaryId"></param>
|
||||
/// <returns></returns>
|
||||
Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart);
|
||||
OperationResult Create(CreateContract command);
|
||||
OperationResult CreateNew(createContractModel command);
|
||||
OperationResult Edit(EditContract command);
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Contract;
|
||||
|
||||
/// <summary>
|
||||
/// ویو مدل رتقاء دستمزد روزانه و لیست ارتقاء
|
||||
/// </summary>
|
||||
public class UpgradeManualDailyWageModel
|
||||
{
|
||||
/// <summary>
|
||||
/// دستمزد روزانه
|
||||
/// </summary>
|
||||
public double DailyWage{ get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// لیست ارتقاء
|
||||
/// </summary>
|
||||
public List<UpgradeManualDailyWageList> UpgradeManualDailyWageLists { get; set; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// لیست ارتقاء
|
||||
/// </summary>
|
||||
public class UpgradeManualDailyWageList
|
||||
{
|
||||
/// <summary>
|
||||
/// تاریخ شروع و پایان بازه ارتقاء
|
||||
/// </summary>
|
||||
public string StartEndDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه
|
||||
/// </summary>
|
||||
public string DailyWage { get; set; }
|
||||
}
|
||||
@@ -8,7 +8,8 @@ namespace CompanyManagment.App.Contracts.RollCall;
|
||||
public interface IRollCallMandatoryApplication
|
||||
{
|
||||
bool HasRollCallRecord(long employeeId, long workshopId, DateTime contractStart);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, bool totalLeaveCompute);
|
||||
ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// گزارش نوبت کاری حضور غیاب
|
||||
|
||||
@@ -311,4 +311,9 @@ public class CreateWorkingHoursTemp
|
||||
public string WeeklyWorkingTime { get; set; }
|
||||
public long ContractId { get; set; }
|
||||
public long WorknigHoursId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
namespace CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.Workshop.DTOs;
|
||||
|
||||
public class AutoExtensionEmployeeListDto
|
||||
{
|
||||
@@ -32,6 +34,17 @@ public class AutoExtensionEmployeeListDto
|
||||
public bool EmployeeHasCreateContract { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه دریافت شده از سمت فرانت
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffectedStr => "0";
|
||||
|
||||
/// <summary>
|
||||
/// مزد سالانه نرمال دریافت از سمت فرانت
|
||||
/// </summary>
|
||||
public string NormalDailyWage => "0";
|
||||
|
||||
|
||||
public string ContarctStart { get; set; }
|
||||
public string ContractEnd { get; set; }
|
||||
|
||||
|
||||
@@ -38,6 +38,46 @@ public class createContractModel
|
||||
|
||||
public long YearlySalaryId { get; set; }
|
||||
public long EmployerId { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه خام بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات بعد از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearAffected { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double DailySalaryUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// دستمزد روزانه دریافت شده از سمت فرانت
|
||||
/// </summary>
|
||||
public string DailySalaryUnAffectedStr { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// مزد سالانه نرمال دریافت از سمت فرانت
|
||||
/// </summary>
|
||||
public string NormalDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// پایه سنوات قبل از تاثیر ساعت کار
|
||||
/// </summary>
|
||||
public double BaseYearUnAffected { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// آیا دستمزد روزانه دستی وارد شده است؟
|
||||
/// </summary>
|
||||
public bool HasManualDailyWage { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// نوع دستمزد انتخاب شده
|
||||
/// </summary>
|
||||
public string DailyWageType { get; set; }
|
||||
|
||||
}
|
||||
@@ -24,6 +24,11 @@ public class BaseYearDataViewModel
|
||||
/// </summary>
|
||||
public double BaseYearResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// اولین روز شروع بکار
|
||||
/// </summary>
|
||||
public string FirstWorkDayInLeftWork { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// لیست تمام پایه سنوات های محاسبه شده
|
||||
/// </summary>
|
||||
@@ -64,4 +69,29 @@ public class BaseYearDataList
|
||||
/// سالی که در آن پایه سنوات تعلق گرفته
|
||||
/// </summary>
|
||||
public string Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///روزی که پایه سنوات تعلق گرفته
|
||||
///یا شروع بکار. ترک کار
|
||||
/// شمسی
|
||||
/// </summary>
|
||||
public string BaseYearPayDay { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// روزی که پایه سنوات تعلق گرفته
|
||||
///یا شروع بکار. ترک کار
|
||||
/// میلادی
|
||||
/// </summary>
|
||||
public DateTime BaseYearPayDayGr { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// آیا تاریخ شروع بکار دارد
|
||||
/// </summary>
|
||||
public bool HasStartWork { get; set; }
|
||||
/// <summary>
|
||||
/// آیا تاریخ پایان کار دارد
|
||||
/// </summary>
|
||||
public bool HasLeftWork { get; set; }
|
||||
}
|
||||
@@ -2,7 +2,9 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
using CompanyManagment.App.Contracts.Holiday;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
|
||||
namespace CompanyManagment.App.Contracts.YearlySalary;
|
||||
|
||||
@@ -14,6 +16,35 @@ public interface IYearlySalaryApplication
|
||||
OperationResult Err();
|
||||
EditYearlySalary GetDetails(long id);
|
||||
List<YearlySalaryViewModel> GetYearlySalary();
|
||||
|
||||
/// <summary>
|
||||
/// متد ارتقاء مزد دلخواه
|
||||
/// </summary>
|
||||
/// <param name="newContractStart"></param>
|
||||
/// <param name="lastContractStart"></param>
|
||||
/// <param name="lastContractManualDailyWage"></param>
|
||||
/// <returns></returns>
|
||||
Task<UpgradeManualDailyWageModel> UpgradeManualDailyWage(DateTime newContractStart, DateTime lastContractStart,
|
||||
double lastContractManualDailyWage);
|
||||
|
||||
/// <summary>
|
||||
/// متد محاسبه پایه سنوات و لیست پایه سنوات های پرسنل
|
||||
/// </summary>
|
||||
/// <param name="contractStart"></param>
|
||||
/// <param name="contractEnd"></param>
|
||||
/// <param name="employeeId"></param>
|
||||
/// <param name="workshopId"></param>
|
||||
/// <param name="leftWorkList"></param>
|
||||
/// <returns></returns>
|
||||
Task<BaseYearDataViewModel> BaseYearComputeByContractId(long contractId);
|
||||
/// <summary>
|
||||
/// دریافت مزد روزانه بر اساس تاریخ شروع و پایان
|
||||
/// </summary>
|
||||
/// <param name="start"></param>
|
||||
/// <param name="end"></param>
|
||||
/// <returns></returns>
|
||||
Task<(double dailyWage, long yearlySalaryId)> GetDailyWageByStartEnd(DateTime start, DateTime end);
|
||||
|
||||
List<YearlySalaryViewModel> Search(YearlySalarySearchModel searchModel);
|
||||
EditYearlySalary GetDetailsBySearchModel(YearlySalarySearchModel searchModel);
|
||||
|
||||
|
||||
@@ -152,17 +152,30 @@ public class CheckoutApplication : ICheckoutApplication
|
||||
var housingAllowance = command.HousingAllowance.MoneyToDouble();
|
||||
//حق تاهل
|
||||
var marriedAllowance = command.MarriedAllowance.MoneyToDouble();
|
||||
var MontlyYearsBunos =
|
||||
_yearlySalaryRepository.GetMontlyBunosYears(command.WeeklyTime, command.ContractStartGr, command.ContractEndGr, dayliWage, command.WorkingWeeklyTime, command.officialholiday, command.friday, command.TotalHolidaysAndNotH, command.TotalHolidaysAndNotM, command.Basic, command.FridayStarttoEnd, command.DailFeeComplete, command.HasRollCall, command.HolidayWorking, command.ShiftWork);
|
||||
//دستمزد ماهانه
|
||||
var monthlyWage = MontlyYearsBunos.MontlyWage;
|
||||
//سنوات
|
||||
var years = command.YearsPay;
|
||||
//var MontlyYearsBunos =
|
||||
//_yearlySalaryRepository.GetMontlyBunosYears(command.WeeklyTime, command.ContractStartGr, command.ContractEndGr, dayliWage, command.WorkingWeeklyTime, command.officialholiday, command.friday, command.TotalHolidaysAndNotH, command.TotalHolidaysAndNotM, command.Basic, command.FridayStarttoEnd, command.DailFeeComplete, command.HasRollCall, command.HolidayWorking, command.ShiftWork);
|
||||
//دستمزد ماهانه
|
||||
|
||||
#region Salary
|
||||
|
||||
var totalDays = (command.ContractEndGr - command.ContractStartGr).TotalDays + 1;
|
||||
|
||||
var mandatoryDays = totalDays - command.FridayStarttoEnd - command.officialholiday;
|
||||
|
||||
if (!command.HasRollCall && command.ShiftWork != "4")
|
||||
mandatoryDays = totalDays - command.FridayStarttoEnd;
|
||||
var monthlyWage = command.DailySalaryAffected * mandatoryDays;
|
||||
|
||||
//پایه سنوات
|
||||
var bacicYears = command.BaseYearAffected * mandatoryDays;
|
||||
#endregion
|
||||
|
||||
//سنوات
|
||||
var years = command.YearsPay;
|
||||
//عیدی و پاداش
|
||||
var bunos = command.BonusesPay;
|
||||
//پایه سنوات
|
||||
var bacicYears = MontlyYearsBunos.BasicYears;
|
||||
var sumOfWorkingDays = MontlyYearsBunos.SumOfWorkingDay;
|
||||
|
||||
var sumOfWorkingDays = $"{totalDays}";
|
||||
if (command.friday > 0)
|
||||
{
|
||||
var fridayPercent = dayliWage * 40 / 100;
|
||||
|
||||
@@ -78,6 +78,11 @@ public class ContractApplication : IContractApplication
|
||||
}
|
||||
|
||||
|
||||
public async Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart)
|
||||
{
|
||||
return await _contractRepository.GetManualDailWage(workshopId, employeeId, yearlySalaryId, contractStart);
|
||||
}
|
||||
|
||||
public OperationResult Create(CreateContract command)
|
||||
{
|
||||
var yearlysalaryList = _yearlySalaryRepository.GetYearlySalary();
|
||||
@@ -142,7 +147,9 @@ public class ContractApplication : IContractApplication
|
||||
yearlySalarId,
|
||||
start, end, command.DayliWage, command.ArchiveCode, getWorkdate, setContractDate,
|
||||
command.JobType, command.ContractType, command.WorkshopAddress1, command.WorkshopAddress2,
|
||||
command.ConsumableItems, command.JobTypeId, command.HousingAllowance, command.AgreementSalary, command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod);
|
||||
command.ConsumableItems, command.JobTypeId, command.HousingAllowance, command.AgreementSalary,
|
||||
command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod,command.DailySalaryAffected,
|
||||
command.BaseYearAffected, command.DailySalaryUnAffected,command.BaseYearUnAffected, command.HasManualDailyWage, command.DailyWageType);
|
||||
|
||||
_contractRepository.Create(makeContract);
|
||||
_contractRepository.SaveChanges();
|
||||
@@ -356,7 +363,9 @@ public class ContractApplication : IContractApplication
|
||||
command.YearlySalaryId,
|
||||
start, end, command.DayliWage, command.ArchiveCode, getWorkdate, setContractDate,
|
||||
command.JobName, command.ContractType, command.WorkshopAddress1, command.WorkshopAddress2,
|
||||
command.ConsumableItems, command.JobId, command.HousingAllowance, "0", command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod);
|
||||
command.ConsumableItems, command.JobId, command.HousingAllowance, "0", command.WorkingHoursWeekly, command.FamilyAllowance, command.ContractPeriod,
|
||||
command.DailySalaryAffected,
|
||||
command.BaseYearAffected, command.DailySalaryUnAffected, command.BaseYearUnAffected, command.HasManualDailyWage, command.DailyWageType);
|
||||
_contractRepository.Create(makeContract);
|
||||
_contractRepository.SaveChanges();
|
||||
|
||||
|
||||
@@ -21,9 +21,11 @@ public class RollCallMandatoryApplication : IRollCallMandatoryApplication
|
||||
return _rollCallMandatoryRepository.Exists(x => x.EmployeeId == employeeId && x.WorkshopId == workshopId && x.StartDate.Value.Date >= contractStart.Date);
|
||||
}
|
||||
|
||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute,bool totalLeaveCompute)
|
||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart, DateTime contractEnd, CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, double dailyWageUnAffected, bool totalLeaveCompute)
|
||||
|
||||
{
|
||||
return _rollCallMandatoryRepository.MandatoryCompute(employeeId,workshopId, contractStart, contractEnd, command, holidayWorking, isStaticCheckout, rotatingShiftCompute, totalLeaveCompute);
|
||||
return _rollCallMandatoryRepository.MandatoryCompute(employeeId,workshopId, contractStart, contractEnd, command, holidayWorking, isStaticCheckout, rotatingShiftCompute, dailyWageUnAffected, totalLeaveCompute);
|
||||
|
||||
}
|
||||
|
||||
public async Task<ComputingViewModel> RotatingShiftReport(long workshopId, long employeeId, DateTime contractStart, DateTime contractEnd,
|
||||
|
||||
@@ -1,12 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using Company.Domain.YearlySalaryAgg;
|
||||
using CompanyManagment.App.Contracts.Contract;
|
||||
using CompanyManagment.App.Contracts.Holiday;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.YearlySalary;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using static Microsoft.EntityFrameworkCore.DbLoggerCategory.Database;
|
||||
|
||||
namespace CompanyManagment.Application;
|
||||
|
||||
@@ -128,6 +133,41 @@ public class YearlySalaryApplication : IYearlySalaryApplication
|
||||
return _yearlySalaryRepository.GetYearlySalary();
|
||||
}
|
||||
|
||||
public Task<UpgradeManualDailyWageModel> UpgradeManualDailyWage(DateTime newContractStart, DateTime lastContractStart, double lastContractManualDailyWage)
|
||||
{
|
||||
return _yearlySalaryRepository.UpgradeManualDailyWage(newContractStart, lastContractStart,
|
||||
lastContractManualDailyWage);
|
||||
}
|
||||
|
||||
public async Task<BaseYearDataViewModel> BaseYearComputeByContractId(long contractId)
|
||||
{
|
||||
var contract = await _context.Contracts.FirstOrDefaultAsync(x => x.id == contractId);
|
||||
|
||||
var leftWorkList = await _context.LeftWorkList.Where(x=>x.EmployeeId ==contract.EmployeeId && x.WorkshopId == contract.WorkshopIds).Select(x => new LeftWorkViewModel()
|
||||
{
|
||||
Id = x.id,
|
||||
LeftWorkDate = x.LeftWorkDate.ToFarsi(),
|
||||
StartWorkDate = x.StartWorkDate.ToFarsi(),
|
||||
LeftWorkDateGr = x.LeftWorkDate,
|
||||
StartWorkDateGr = x.StartWorkDate,
|
||||
WorkshopId = x.WorkshopId,
|
||||
EmployeeId = x.EmployeeId,
|
||||
HasLeft = x.HasLeft,
|
||||
}).ToListAsync();
|
||||
|
||||
var baseYearResult = await _yearlySalaryRepository.BaseYearCompute(contract.ContarctStart, contract.ContractEnd,
|
||||
contract.EmployeeId, contract.WorkshopIds, leftWorkList);
|
||||
|
||||
return baseYearResult;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public async Task<(double dailyWage, long yearlySalaryId)> GetDailyWageByStartEnd(DateTime start, DateTime end)
|
||||
{
|
||||
return await _yearlySalaryRepository.GetDailyWageByStartEnd(start, end);
|
||||
}
|
||||
|
||||
public List<YearlySalaryViewModel> Search(YearlySalarySearchModel searchModel)
|
||||
{
|
||||
return _yearlySalaryRepository.Search(searchModel);
|
||||
|
||||
@@ -26,6 +26,8 @@ public class ContractMapping : IEntityTypeConfiguration<Contract>
|
||||
builder.Property(x => x.ContractPeriod).HasMaxLength(2).IsRequired(false);
|
||||
builder.Property(x => x.AgreementSalary).HasMaxLength(50).IsRequired(false);
|
||||
builder.Property(x => x.Signature).HasMaxLength(1).IsRequired(false);
|
||||
builder.Property(x=>x.DailyWageType).HasMaxLength(30).IsRequired(false);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
10227
CompanyManagment.EFCore/Migrations/20250822223255_ManualDailyWageToContract.Designer.cs
generated
Normal file
10227
CompanyManagment.EFCore/Migrations/20250822223255_ManualDailyWageToContract.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,73 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class ManualDailyWageToContract : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "BaseYearAffected",
|
||||
table: "Contracts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "BaseYearUnAffected",
|
||||
table: "Contracts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "DailySalaryAffected",
|
||||
table: "Contracts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<double>(
|
||||
name: "DailySalaryUnAffected",
|
||||
table: "Contracts",
|
||||
type: "float",
|
||||
nullable: false,
|
||||
defaultValue: 0.0);
|
||||
|
||||
migrationBuilder.AddColumn<bool>(
|
||||
name: "HasManualDailyWage",
|
||||
table: "Contracts",
|
||||
type: "bit",
|
||||
nullable: false,
|
||||
defaultValue: false);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BaseYearAffected",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "BaseYearUnAffected",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DailySalaryAffected",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DailySalaryUnAffected",
|
||||
table: "Contracts");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "HasManualDailyWage",
|
||||
table: "Contracts");
|
||||
}
|
||||
}
|
||||
}
|
||||
10231
CompanyManagment.EFCore/Migrations/20250827230053_DailyWageTypeoContract.Designer.cs
generated
Normal file
10231
CompanyManagment.EFCore/Migrations/20250827230053_DailyWageTypeoContract.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,29 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace CompanyManagment.EFCore.Migrations
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public partial class DailyWageTypeoContract : Migration
|
||||
{
|
||||
/// <inheritdoc />
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<string>(
|
||||
name: "DailyWageType",
|
||||
table: "Contracts",
|
||||
type: "nvarchar(30)",
|
||||
maxLength: 30,
|
||||
nullable: true);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DailyWageType",
|
||||
table: "Contracts");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -831,6 +831,12 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
.HasMaxLength(255)
|
||||
.HasColumnType("nvarchar(255)");
|
||||
|
||||
b.Property<double>("BaseYearAffected")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("BaseYearUnAffected")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("ConsumableItems")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
@@ -859,6 +865,16 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<DateTime>("CreationDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<double>("DailySalaryAffected")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<double>("DailySalaryUnAffected")
|
||||
.HasColumnType("float");
|
||||
|
||||
b.Property<string>("DailyWageType")
|
||||
.HasMaxLength(30)
|
||||
.HasColumnType("nvarchar(30)");
|
||||
|
||||
b.Property<string>("DayliWage")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
@@ -878,6 +894,9 @@ namespace CompanyManagment.EFCore.Migrations
|
||||
b.Property<DateTime>("GetWorkDate")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<bool>("HasManualDailyWage")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HousingAllowance")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Globalization;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using _0_Framework.Application;
|
||||
using _0_Framework.InfraStructure;
|
||||
using Company.Domain.ContractAgg;
|
||||
@@ -13,6 +15,7 @@ using CompanyManagment.App.Contracts.Employee;
|
||||
using CompanyManagment.App.Contracts.Employer;
|
||||
using CompanyManagment.App.Contracts.LeftWork;
|
||||
using CompanyManagment.App.Contracts.Workshop;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using PersianTools.Core;
|
||||
using DateTime = System.DateTime;
|
||||
|
||||
@@ -40,6 +43,56 @@ public class ContractRepository : RepositoryBase<long, Contract>, IContractRepos
|
||||
_leftWorkRepository = leftWorkRepository;
|
||||
}
|
||||
|
||||
|
||||
public async Task<double> GetManualDailWage(long workshopId, long employeeId, long yearlySalaryId, DateTime contractStart)
|
||||
{
|
||||
|
||||
var lastContract = await _context.Contracts
|
||||
.Where(x => x.WorkshopIds == workshopId && x.EmployeeId == employeeId && x.IsActiveString == "true" && x.ContarctStart < contractStart)
|
||||
.OrderByDescending(x => x.ContarctStart)
|
||||
.FirstOrDefaultAsync();
|
||||
//اگر قردادی قبل از قرارداد جدید نداشت
|
||||
if (lastContract == null)
|
||||
return 0;
|
||||
//اگر آخرین قرداد مزد دلخواه نداشت
|
||||
if (!lastContract.HasManualDailyWage)
|
||||
return 0;
|
||||
|
||||
var lastContractYearlySalary = await _context.YearlySalaries
|
||||
.FirstOrDefaultAsync(x => x.StartDate <= lastContract.ContarctStart && x.EndDate >= lastContract.ContarctStart);
|
||||
|
||||
//اگر دستمزد آخرین قراداد و قرداد جدید از یک مقادیر سالانه بودن بدون ارتقاء دستمزد دلخواه آخرین قرداد ارسال میشه
|
||||
if (lastContractYearlySalary.id == yearlySalaryId)
|
||||
return lastContract.DailySalaryUnAffected;
|
||||
|
||||
|
||||
var dailyWageResult = _yearlySalaryRepository.UpgradeManualDailyWage(contractStart,
|
||||
lastContractYearlySalary.StartDate, lastContract.DailySalaryUnAffected).GetAwaiter().GetResult();
|
||||
|
||||
return dailyWageResult.DailyWage;
|
||||
}
|
||||
|
||||
public async Task<UpgradeManualDailyWageModel> GetManualDailWageList(long workshopId, long employeeId,
|
||||
DateTime contractStart)
|
||||
{
|
||||
var oldContracts = await _context.Contracts
|
||||
.Where(x => x.WorkshopIds == workshopId && x.EmployeeId == employeeId && x.IsActiveString == "true" && x.DailyWageType == "ManualDailyWage" && x.ContarctStart < contractStart)
|
||||
.OrderByDescending(x => x.ContarctStart)
|
||||
.FirstOrDefaultAsync();
|
||||
if (oldContracts == null)
|
||||
return new UpgradeManualDailyWageModel();
|
||||
|
||||
//var endOfMonthFromStart = ($"{contractStart.ToFarsi().FindeEndOfMonth()}").ToGeorgianDateTime();
|
||||
|
||||
|
||||
var result =await _yearlySalaryRepository.UpgradeManualDailyWage(contractStart, oldContracts.ContarctStart,
|
||||
oldContracts.DailySalaryUnAffected);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public EditContract GetDetails(long id)
|
||||
{
|
||||
return _context.Contracts.Select(x => new EditContract
|
||||
@@ -70,8 +123,12 @@ public class ContractRepository : RepositoryBase<long, Contract>, IContractRepos
|
||||
ContractPeriod = x.ContractPeriod,
|
||||
AgreementSalary = x.AgreementSalary,
|
||||
ArchiveCode = x.ArchiveCode,
|
||||
|
||||
|
||||
BaseYearAffected = x.BaseYearAffected,
|
||||
BaseYearUnAffected = x.BaseYearUnAffected,
|
||||
DailySalaryAffected = x.DailySalaryAffected,
|
||||
DailySalaryUnAffected = x.DailySalaryUnAffected,
|
||||
HasManualDailyWage = x.HasManualDailyWage,
|
||||
DailyWageType = x.DailyWageType,
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -122,6 +122,7 @@ public class LeftWorkRepository : RepositoryBase<long, LeftWork>, ILeftWorkRepos
|
||||
AddYearsPay = x.AddYearsPay,
|
||||
AddLeavePay = x.AddLeavePay,
|
||||
JobId = x.JobId,
|
||||
HasLeft = x.HasLeft,
|
||||
JobName = _context.Jobs.FirstOrDefault(j => j.id == x.JobId).JobName
|
||||
|
||||
|
||||
|
||||
@@ -65,11 +65,12 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
|
||||
}
|
||||
|
||||
#region OfficialChckout
|
||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart,
|
||||
DateTime contractEnd,
|
||||
CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute, bool totalLeaveCompute)
|
||||
{
|
||||
#region OfficialChckout
|
||||
public ComputingViewModel MandatoryCompute(long employeeId, long workshopId, DateTime contractStart,
|
||||
DateTime contractEnd,
|
||||
CreateWorkingHoursTemp command, bool holidayWorking, bool isStaticCheckout, bool rotatingShiftCompute,double dailyWageUnAffected, bool totalLeaveCompute)
|
||||
{
|
||||
|
||||
#region Entities
|
||||
|
||||
string SumWorkeTime = string.Empty;
|
||||
@@ -490,18 +491,31 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
var startDate = command.GetWorkDateHide.ToGeorgianDateTime();
|
||||
var dayliFee = "خطای تاریخ";
|
||||
double dayliFeeDouble = 0;
|
||||
double baseYearUnAffected = 0;
|
||||
double baseYearAffected = 0;
|
||||
double dailySalaryAffected = 0;
|
||||
if (styear >= 1370)
|
||||
{
|
||||
|
||||
if (leftworkList == null)
|
||||
leftworkList = new List<LeftWorkViewModel>();
|
||||
|
||||
var dayliFeeResult = _yearlySalaryRepository.DayliFeeComputing(startDate, contractStart, contractEnd,
|
||||
command.EmployeeId, command.WorkshopId, leftworkList);
|
||||
dayliFee = dayliFeeResult.DayliFee;
|
||||
dayliFeeDouble = dayliFeeResult.DayliFeeDouble;
|
||||
dayliFeeComplete = dayliFeeResult.DayliFee.MoneyToDouble();
|
||||
basic = dayliFeeResult.Basic;
|
||||
//var dayliFeeResult = _yearlySalaryRepository.DayliFeeComputing(startDate, contractStart, contractEnd,
|
||||
// command.EmployeeId, command.WorkshopId, leftworkList);
|
||||
//dayliFee = dayliFeeResult.DayliFee;
|
||||
//dayliFeeDouble = dayliFeeResult.DayliFeeDouble;
|
||||
//dayliFeeComplete = dayliFeeResult.DayliFee.MoneyToDouble();
|
||||
//basic = dayliFeeResult.Basic;
|
||||
|
||||
|
||||
//dayliFee = dailyWageUnAffected;
|
||||
var baseYear = _yearlySalaryRepository.BaseYearCompute(contractStart, contractEnd, command.EmployeeId,
|
||||
command.WorkshopId, leftworkList).Result;
|
||||
dayliFee = (dailyWageUnAffected + baseYear.BaseYearResult).ToMoney();
|
||||
|
||||
baseYearUnAffected = baseYear.BaseYearResult;
|
||||
baseYearAffected = baseYearUnAffected;
|
||||
dailySalaryAffected = dailyWageUnAffected;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -526,10 +540,25 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
if (!string.IsNullOrWhiteSpace(command.ShiftWork))
|
||||
{
|
||||
var workedHoursePerDay = totalHourses / mandatorDays;
|
||||
var result = (dayliFeeDouble / 7.33) * workedHoursePerDay;
|
||||
//var result = (dayliFeeDouble / 7.33) * workedHoursePerDay;
|
||||
|
||||
|
||||
//dayliFee = result.ToMoney();
|
||||
|
||||
|
||||
#region NeWdailyWage
|
||||
|
||||
var da = dailyWageUnAffected / 7.33;
|
||||
dailySalaryAffected = da > 0 ? ((workedHoursePerDay * da).ToMoney()).MoneyToDouble() : 0;
|
||||
var ba = baseYearUnAffected / 7.33;
|
||||
baseYearAffected = ba > 0 ? ((workedHoursePerDay * ba).ToMoney()).MoneyToDouble() : 0;
|
||||
|
||||
var fullDailySalary = dailySalaryAffected + baseYearAffected;
|
||||
dayliFee = fullDailySalary.ToMoney();
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
dayliFee = result.ToMoney();
|
||||
|
||||
var HousingAllowonceNumberType = HousingAllowance.MoneyToDouble();
|
||||
var HousingStep1 = HousingAllowonceNumberType / 30;
|
||||
@@ -907,6 +936,13 @@ public class RollCallMandatoryRepository : RepositoryBase<long, RollCall>, IRoll
|
||||
//ساعت موظفی پرسنل در این ماه
|
||||
EmployeeMandatoryHours = mandatoryHoursTimeSpan,
|
||||
#endregion
|
||||
|
||||
#region NewDailWage
|
||||
|
||||
BaseYearAffected = baseYearAffected,
|
||||
DailySalaryAffected = dailySalaryAffected,
|
||||
|
||||
#endregion
|
||||
};
|
||||
|
||||
#endregion
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -400,8 +400,11 @@
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20120" class="check-btn"> <span style="bottom: 2px;position: relative"> مرخصی استعلاجی </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20121" class="check-btn"> <span style="bottom: 2px;position: relative"> مرخصی استحقاقی </span> </label>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20121" class="check-btn"> <span style="bottom: 2px;position: relative"> مرخصی استحقاقی </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20123" class="check-btn"> <span style="bottom: 2px;position: relative"> گزارش ارتقاء مزد و سنوات </span> </label>
|
||||
</div>
|
||||
</div>
|
||||
@*تصفیه*@
|
||||
|
||||
@@ -401,9 +401,12 @@
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20120" class="check-btn"> <span style="bottom: 2px;position: relative"> مرخصی استعلاجی </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20121" class="check-btn"> <span style="bottom: 2px;position: relative"> مرخصی استحقاقی </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20121" class="check-btn"> <span style="bottom: 2px;position: relative"> مرخصی استحقاقی </span> </label>
|
||||
</div>
|
||||
<div class="child-check level3">
|
||||
<label class="btn btn-inverse waves-effect waves-light m-b-5 children"><input type="checkbox" disabled="disabled" value="20123" class="check-btn"> <span style="bottom: 2px;position: relative"> گزارش ارتقاء مزد و سنوات </span> </label>
|
||||
</div>
|
||||
</div>
|
||||
@*تصفیه*@
|
||||
<div class="child-check level2">
|
||||
|
||||
@@ -763,6 +763,7 @@ public class IndexModel : PageModel
|
||||
foreach (var item in ContractsId)
|
||||
{
|
||||
var contract = _contractApplication.GetDetails(item);
|
||||
|
||||
//var workingHours = _workingHoursApplication.GetByContractId(contract.Id);
|
||||
var workingHours = _workingHoursTempApplication.GetByContractIdConvertToShiftwork4(contract.Id);
|
||||
var separation = _contractApplication.contractSeparation(ConvertYear, ConvertMonth,
|
||||
@@ -822,7 +823,15 @@ public class IndexModel : PageModel
|
||||
workingHours.EmployeeId = contract.EmployeeId;
|
||||
|
||||
var mandatoryCompute = new ComputingViewModel();
|
||||
|
||||
|
||||
#region DailyWageCompute
|
||||
|
||||
var dailyWageUnAffected = _yearlySalaryRepository.GetCheckoutDailyWage(contract,
|
||||
separation.ContractStartGr, separation.ContractEndGr).GetAwaiter().GetResult();
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
var hasRollCall = _rollCallEmployeeStatusApp.HasRollCallRecord(contract.EmployeeId,
|
||||
contract.WorkshopIds,
|
||||
separation.ContractStartGr, separation.ContractEndGr);
|
||||
@@ -832,13 +841,15 @@ public class IndexModel : PageModel
|
||||
{
|
||||
mandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
||||
contract.WorkshopIds,
|
||||
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, false,workshop.RotatingShiftCompute, totalLeaveCompute);
|
||||
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, false,workshop.RotatingShiftCompute, dailyWageUnAffected, totalLeaveCompute);
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
mandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
||||
contract.WorkshopIds,
|
||||
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, true,workshop.RotatingShiftCompute, totalLeaveCompute);
|
||||
separation.ContractStartGr, separation.ContractEndGr, workingHours, workshop.WorkshopHolidayWorking, true,workshop.RotatingShiftCompute, dailyWageUnAffected, totalLeaveCompute);
|
||||
|
||||
//var hasLeave = _leaveApplication.LeavOnChekout(separation.ContractStartGr,
|
||||
// separation.ContractEndGr, contract.EmployeeId, contract.WorkshopIds);
|
||||
//if (hasLeave != null)
|
||||
@@ -934,7 +945,8 @@ public class IndexModel : PageModel
|
||||
{
|
||||
foundMandatoryCompute = _rollCallMandatoryApplication.MandatoryCompute(contract.EmployeeId,
|
||||
contract.WorkshopIds,
|
||||
found.ContractStart, found.ContractEnd, foundWorkingHours, workshop.WorkshopHolidayWorking, false, workshop.RotatingShiftCompute, totalLeaveCompute);
|
||||
found.ContractStart, found.ContractEnd, foundWorkingHours, workshop.WorkshopHolidayWorking, false, workshop.RotatingShiftCompute, dailyWageUnAffected, totalLeaveCompute);
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
@@ -1077,7 +1089,18 @@ public class IndexModel : PageModel
|
||||
EmployeeMandatoryHours = mandatoryCompute.EmployeeMandatoryHours,
|
||||
|
||||
HasInsuranceChekoutOverTime = workshop.InsuranceCheckoutOvertime,
|
||||
HasLeft = separation.HasLeft
|
||||
HasLeft = separation.HasLeft,
|
||||
|
||||
|
||||
BaseYearAffected = mandatoryCompute.BaseYearAffected,
|
||||
|
||||
|
||||
|
||||
DailySalaryAffected = mandatoryCompute.DailySalaryAffected,
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
};
|
||||
_checkoutApplication.Create(command);
|
||||
|
||||
@@ -0,0 +1,375 @@
|
||||
@using _0_Framework.Application
|
||||
@model CompanyManagment.App.Contracts.Contract.ContractDailyWageAndBaseYearReport
|
||||
|
||||
@{
|
||||
<style>
|
||||
.modal .modal-dialog .modal-content {
|
||||
width: 110% !important;
|
||||
padding: 0 !important;
|
||||
}
|
||||
|
||||
.trTable {
|
||||
background-color: cadetblue;
|
||||
color: aliceblue;
|
||||
border-radius: 5px;
|
||||
padding: 3px;
|
||||
margin: 3px;
|
||||
}
|
||||
|
||||
|
||||
.st {
|
||||
background: #cecece;
|
||||
border-radius: 8px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
direction: rtl;
|
||||
font-family: "IranSans", sans-serif;
|
||||
margin: 5px 0px;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
|
||||
.st .header {
|
||||
background: #0d4c4c;
|
||||
color: #fff;
|
||||
padding: 10px 14px;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
border-radius: 8px 8px 0 0;
|
||||
}
|
||||
|
||||
|
||||
.st .trTable {
|
||||
padding: 4px 9px;
|
||||
margin: 0;
|
||||
display: block;
|
||||
margin: 3px 3px;
|
||||
}
|
||||
|
||||
|
||||
.st .trTable .content {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
|
||||
.st .trTable.green {
|
||||
background: forestgreen;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.st .trTable.red {
|
||||
background: #d9534f;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.st .trTable.teal {
|
||||
background: #5fb0b0;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.st .trTable.orange {
|
||||
background: orangered;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.date {
|
||||
font-family: 'IranText' !important;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
</style>
|
||||
}
|
||||
|
||||
<div class="container" style="margin: 10px 0px">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<div class="st">
|
||||
<div class="trTable" style="background-color: #727272">
|
||||
<div class="content" style="background-color: #727272">
|
||||
<div>نام پرسنل</div>
|
||||
<div>@Model.EmployeeName</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
<div class="st">
|
||||
<div class="trTable" style="background-color: #727272">
|
||||
<div class="content" style="background-color: #727272">
|
||||
<div>نام کارگاه</div>
|
||||
<div>@Model.WorkshopName</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@if (Model.OldComputeMethod)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
|
||||
<div class="st">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="trTable" style="background-color: #fbddda">
|
||||
<div class="content" style="background-color: #fbddda">
|
||||
<div style="color:red">این قراداد با روش قدیم محاسبه مزد ایجاد شده است</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-warning btn-rounded waves-effect waves-light m-b-10" data-dismiss="modal">بستن فرم</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
@if (Model.Contradiction)
|
||||
{
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
|
||||
<div class="st">
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="trTable" style="background-color: #fbddda">
|
||||
<div class="content" style="background-color: #fbddda">
|
||||
<div style="color:red">
|
||||
|
||||
<p>مقادیر محاسبه شده در این گزارش با مقادیر ذخیره شده در قراداد مغایرت دارد</p>
|
||||
<p>احتمالا مواردی مانند شروع بکار/ترک کار پرسنل تغییر کرده است</p>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
|
||||
<div class="st">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="header">محاسبه پایه سنوات</div>
|
||||
|
||||
@if (Model.BaseYearDataViewModel.BaseYearResult > 0)
|
||||
{
|
||||
@foreach (var item in Model.BaseYearDataViewModel.BaseYearDataList)
|
||||
{
|
||||
if (item.HasStartWork)
|
||||
{
|
||||
<div class="trTable green">
|
||||
<div class="content">
|
||||
<div class="date">@item.BaseYearPayDay</div>
|
||||
<div>شروع بکار</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else if (item.HasLeftWork)
|
||||
{
|
||||
<div class="trTable red">
|
||||
<div class="content">
|
||||
<div class="date">@item.BaseYearPayDay</div>
|
||||
<div>ترک کار</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
if (item.BaseYearPayDay == "-")
|
||||
{
|
||||
<div class="trTable orange">
|
||||
<div class="content">
|
||||
<div>
|
||||
|
||||
<span class="date"> @item.BaseYearPayDayGr.ToFarsi()</span>
|
||||
<span>فقط ارتقاء</span>
|
||||
</div>
|
||||
<div class="date">@item.BaseYear.ToMoney()</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="trTable teal">
|
||||
<div class="content">
|
||||
<div class="date">@item.BaseYearPayDay</div>
|
||||
<div class="date">@item.BaseYear.ToMoney()</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="trTable">
|
||||
<div class="trTable teal">
|
||||
<div class="content">
|
||||
<div>پایه سنوات ندارد</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
|
||||
<div class="st">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="header"> محاسبه مزد روزانه </div>
|
||||
|
||||
|
||||
@{
|
||||
if (@Model.DailyWageType == "UpgradedDailyWage")
|
||||
{
|
||||
<div class="trTable">
|
||||
<div class="content">
|
||||
<div>بازه ارتقاء</div>
|
||||
<div> ارتقاء مزد</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@foreach (var dailyWage in @Model.UpgradeManualDailyWageLists)
|
||||
{
|
||||
<div class="trTable">
|
||||
<div class="content date">
|
||||
<div>@dailyWage.StartEndDate</div>
|
||||
<div>@dailyWage.DailyWage</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
}
|
||||
else if (@Model.DailyWageType == "ManualDailyWage")
|
||||
{
|
||||
|
||||
<div class="trTable">
|
||||
<div class="content date">
|
||||
<div>مزد دلخواه</div>
|
||||
<div>@Model.DailySalaryUnAffected</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
<div class="trTable">
|
||||
<div class="content date">
|
||||
<div>مزد سالانه</div>
|
||||
<div>@Model.DailySalaryUnAffected</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
|
||||
<div class="st">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="header" style="background-color: #ff6100"> نتایج محاسبه پایه سنوات </div>
|
||||
<div class="trTable date" style="background-color: #727272">
|
||||
<div class="content" style="background-color: #727272">
|
||||
<div> بدون تاثیر ساعت کار</div>
|
||||
<div> @Model.BaseYearDataViewModel.BaseYearResult.ToMoney() </div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="trTable date" style="background-color: #727272">
|
||||
<div class="content" style="background-color: #727272">
|
||||
<div>متاثر از ساعت کار</div>
|
||||
<div> @Model.BaseYearAffected </div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-xs-12 col-sm-6 col-md-6">
|
||||
|
||||
<div class="st">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="header" style="background-color: #ff6100"> نتایج محاسبه مزد روزانه </div>
|
||||
|
||||
<div class="trTable" style="background-color: #727272">
|
||||
<div class="content" style="background-color: #727272">
|
||||
<div>بدون تاثیر ساعت کار</div>
|
||||
<div>@Model.DailySalaryUnAffected</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="trTable" style="background-color: #727272">
|
||||
<div class="content" style="background-color: #727272">
|
||||
<div>متاثر از ساعت کار</div>
|
||||
<div class="date"> @Model.DailySalaryAffected </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-sm-12 col-md-12">
|
||||
|
||||
<div class="st">
|
||||
|
||||
<!-- هدر -->
|
||||
<div class="header" style="background-color: #596059; padding: 3px"> دستمزد روزانه تجمیعی</div>
|
||||
|
||||
|
||||
<div class="trTable" style="background-color: #3d7373">
|
||||
<div class="content" style="background-color: #3d7373">
|
||||
<div>@Model.ContractDate</div>
|
||||
<div>@Model.DailyWage</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-xs-12">
|
||||
<button type="button" class="btn btn-warning btn-rounded waves-effect waves-light m-b-10" data-dismiss="modal">بستن فرم</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
</div>
|
||||
@@ -47,6 +47,13 @@
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dailyWageReportIcon {
|
||||
font-size: 20px !important;
|
||||
top: 2px !important;
|
||||
position: relative;
|
||||
padding :6px !important;
|
||||
}
|
||||
|
||||
.ionRad {
|
||||
border-radius: 8px !important;
|
||||
padding: 0px 7px 0px 7px !important;
|
||||
@@ -797,9 +804,13 @@
|
||||
<i class="ion-medkit ionSize"></i>
|
||||
</a>
|
||||
|
||||
<a permission="20121" class="btn btn-inverse pull-left m-rl-5 ionRad2 @(item.IsBlockCantracingParty=="true" ? "disabled":"")"
|
||||
<a permission="20121" class="btn btn-inverse pull-left m-rl-5 ionRad2 @(item.IsBlockCantracingParty=="true" ? "disabled":"")"
|
||||
href="#showmodal=@Url.Page("./Index", "CreatePaidLeave", new {employeeId = item.EmployeeId, workshopId = item.WorkshopIds})">
|
||||
<i class="ion-briefcase ionSize"></i>
|
||||
</a>
|
||||
<a permission="20123" class="btn btn-success pull-left m-rl-5 ionRad2 @(item.IsBlockCantracingParty=="true" ? "disabled":"")"
|
||||
style="background-color: #c630fa !important; border-color: #c630fa !important;" href="#showmodal=@Url.Page("./Index", "DailyWageAndBaseYearReport", new {contractId = item.Id})">
|
||||
<i class="ion-alert dailyWageReportIcon"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="flexible-div op-td mobile-view" style="justify-content: flex-end;">
|
||||
|
||||
@@ -135,6 +135,69 @@ public class IndexModel : PageModel
|
||||
employeeFullName = searchModel.EmployeeName;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// نحوه محاسبه پایه سنوات و ارتقاء مزد رو نمایش میده
|
||||
/// </summary>
|
||||
/// <param name="contractId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IActionResult> OnGetDailyWageAndBaseYearReport(long contractId)
|
||||
{
|
||||
var res = new ContractDailyWageAndBaseYearReport();
|
||||
var contract = _contractApplication.GetDetails(contractId);
|
||||
var employeeName = _employeeApplication.GetDetails(contract.EmployeeId).EmployeeFullName;
|
||||
var workshopName = _workshopApplication.GetWorkshopInfo(contract.WorkshopIds).WorkshopFullName;
|
||||
var baseYearResult =await _yearlySalaryApplication.BaseYearComputeByContractId(contractId);
|
||||
|
||||
if (contract.DailySalaryUnAffected == 0 || string.IsNullOrWhiteSpace(contract.DailyWageType))
|
||||
{
|
||||
res = new ContractDailyWageAndBaseYearReport()
|
||||
{
|
||||
|
||||
EmployeeName = employeeName,
|
||||
WorkshopName = workshopName,
|
||||
Contradiction = false,
|
||||
OldComputeMethod = true,
|
||||
|
||||
|
||||
};
|
||||
|
||||
return Partial("DailyWageAndBaseYearReport", res);
|
||||
}
|
||||
|
||||
var dailyWageListResult = new List<UpgradeManualDailyWageList>();
|
||||
bool contradiction = false;
|
||||
if (contract.DailyWageType == "UpgradedDailyWage")
|
||||
{
|
||||
var upgradeDailyWageResult = _contractRepository.GetManualDailWageList(contract.WorkshopIds,
|
||||
contract.EmployeeId, contract.ContractStartGr).GetAwaiter().GetResult();
|
||||
dailyWageListResult = upgradeDailyWageResult.UpgradeManualDailyWageLists;
|
||||
|
||||
//اگر مغایرت داشت
|
||||
if (contract.DailySalaryUnAffected.ToMoney().MoneyToDouble() != upgradeDailyWageResult.DailyWage.ToMoney().MoneyToDouble()
|
||||
|| baseYearResult.BaseYearResult.ToMoney().MoneyToDouble() != contract.BaseYearUnAffected.ToMoney().MoneyToDouble())
|
||||
contradiction = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
res = new ContractDailyWageAndBaseYearReport()
|
||||
{
|
||||
BaseYearDataViewModel = baseYearResult,
|
||||
BaseYearAffected = contract.BaseYearAffected > 0 ? contract.BaseYearAffected.ToMoney() : "0",
|
||||
DailySalaryAffected = contract.DailySalaryAffected > 0 ? contract.DailySalaryAffected.ToMoney() : "0",
|
||||
DailySalaryUnAffected = contract.DailySalaryUnAffected > 0 ? contract.DailySalaryUnAffected.ToMoney() : "0",
|
||||
DailyWage = contract.DayliWage,
|
||||
ContractDate = $"تا تاریخ {contract.ContarctStart.FindeEndOfMonth()}",
|
||||
DailyWageType = contract.DailyWageType,
|
||||
UpgradeManualDailyWageLists = dailyWageListResult,
|
||||
EmployeeName = employeeName,
|
||||
WorkshopName = workshopName,
|
||||
Contradiction = contradiction,
|
||||
|
||||
};
|
||||
return Partial("DailyWageAndBaseYearReport", res);
|
||||
}
|
||||
|
||||
public async Task<IActionResult> OnGetPersonelMainList(string searchEmployee)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -568,12 +568,32 @@ public class AutoExtensionModel : PageModel
|
||||
//return Partial("Alert", alarm);
|
||||
if (!string.IsNullOrWhiteSpace(contractExistCheck)) contractExist = true;
|
||||
|
||||
|
||||
//تاریخ پایان را پایان ماه شزع قرارداد در نظر میگیریم
|
||||
//زیرا ممکن است تاریخ پایان قراداد در همان سال نباشد
|
||||
var endOfMonthFromStart = ($"{start.ToFarsi().FindeEndOfMonth()}").ToGeorgianDateTime();
|
||||
|
||||
(double dailyWage, long yearlySalaryId) normalDailyWage = (0,0);
|
||||
double upgradedDailyWage =0;
|
||||
if (!contractExist)
|
||||
{
|
||||
normalDailyWage = _yearlySalaryApplication.GetDailyWageByStartEnd(start, endOfMonthFromStart).GetAwaiter().GetResult();
|
||||
|
||||
|
||||
upgradedDailyWage =
|
||||
_contractApplication.GetManualDailWage(workshopId, employeeId, normalDailyWage.yearlySalaryId, start).GetAwaiter().GetResult();
|
||||
if (upgradedDailyWage == 0)
|
||||
upgradedDailyWage = normalDailyWage.dailyWage;
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
success = true,
|
||||
getWorkDate = getWorkDateHide,
|
||||
errContractExist = contractExist,
|
||||
errLeftValid = leftValid
|
||||
errLeftValid = leftValid,
|
||||
normalDailyWage = normalDailyWage.dailyWage > 0 ? normalDailyWage.dailyWage.ToMoney() : "0",
|
||||
upgradedDailyWage = upgradedDailyWage > 0 ? upgradedDailyWage.ToMoney() : "0",
|
||||
});
|
||||
}
|
||||
|
||||
@@ -644,6 +664,50 @@ public class AutoExtensionModel : PageModel
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
public IActionResult OnPostCompareDailyWage(string normalDailyWage,string manualDailyWage)
|
||||
{
|
||||
double normal = 0;
|
||||
double manual = 0;
|
||||
try
|
||||
{
|
||||
normal = normalDailyWage.MoneyToDouble();
|
||||
manual = manualDailyWage.MoneyToDouble();
|
||||
|
||||
if (normal == 0 || manual == 0)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false,
|
||||
message = "فقط عدد وارد کنید"
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false,
|
||||
message = "فقط عدد وارد کنید"
|
||||
});
|
||||
}
|
||||
|
||||
if (manual <= normal)
|
||||
{
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = false,
|
||||
message = $"مبلغ وارد شده می بایست بزرکتر یا مساوی {normalDailyWage} باشد"
|
||||
});
|
||||
}
|
||||
|
||||
return new JsonResult(new
|
||||
{
|
||||
isSuccess = true,
|
||||
message = $"ok"
|
||||
});
|
||||
|
||||
}
|
||||
#region CreateContract
|
||||
|
||||
public IActionResult OnPostCreateContract(List<createContractModel> createContarctList)
|
||||
@@ -659,6 +723,28 @@ public class AutoExtensionModel : PageModel
|
||||
|
||||
foreach (var item in createContarctList)
|
||||
{
|
||||
#region NewManualDailyWage
|
||||
|
||||
double normaldailyWage = item.NormalDailyWage.MoneyToDouble();
|
||||
double dailySalaryUnAffected = item.DailySalaryUnAffectedStr.MoneyToDouble();
|
||||
|
||||
item.HasManualDailyWage = dailySalaryUnAffected > normaldailyWage;
|
||||
item.DailySalaryUnAffected = dailySalaryUnAffected;
|
||||
|
||||
switch (item.DailyWageType)
|
||||
{
|
||||
case "1": item.DailyWageType = "NormalDailyWage";
|
||||
break;
|
||||
case "2":
|
||||
item.DailyWageType = item.HasManualDailyWage == true ? "UpgradedDailyWage" : "NormalDailyWage";
|
||||
break;
|
||||
case "3":
|
||||
item.DailyWageType = "ManualDailyWage";
|
||||
break;
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
var result =
|
||||
_workingHoursTempApplication.GetByWorkshopIdAndEmployeeId(item.WorkshopId,
|
||||
item.EmployeeId);
|
||||
@@ -666,6 +752,7 @@ public class AutoExtensionModel : PageModel
|
||||
result.WorkshopId = item.WorkshopId;
|
||||
result.ContarctStart = item.ContractStart;
|
||||
result.ContractEnd = item.ContractEnd;
|
||||
result.DailySalaryUnAffected = dailySalaryUnAffected;
|
||||
var leftWorkSerachModel = new LeftWorkSearchModel
|
||||
{
|
||||
EmployeeId = item.EmployeeId,
|
||||
@@ -676,6 +763,8 @@ public class AutoExtensionModel : PageModel
|
||||
?.StartWorkDate;
|
||||
result.GetWorkDate = getWorkDateHide;
|
||||
result.GetWorkDateHide = getWorkDateHide;
|
||||
|
||||
|
||||
var compute = MandatoryHours(result);
|
||||
item.DayliWage = compute.SalaryCompute;
|
||||
item.GetWorkDate = getWorkDateHide;
|
||||
@@ -693,6 +782,10 @@ public class AutoExtensionModel : PageModel
|
||||
item.OverNightWorkM = compute.OverNightWorkM;
|
||||
item.WorkshopAddress2 = result.WorkshopAddress2;
|
||||
|
||||
item.DailySalaryAffected = compute.DailySalaryAffected;
|
||||
item.BaseYearAffected = compute.BaseYearAffected;
|
||||
item.BaseYearUnAffected = compute.BaseYearUnAffected;
|
||||
|
||||
item.YearlySalaryId = yearlySalarId;
|
||||
var createContractResult = _contractApplication.CreateNew(item);
|
||||
var percent = i / maxNumber * 100;
|
||||
@@ -5411,15 +5504,27 @@ public class AutoExtensionModel : PageModel
|
||||
var endDate = command.ContractEnd.ToGeorgianDateTime();
|
||||
var dayliFee = "خطای تاریخ";
|
||||
var contractStartDate = command.ContarctStart.ToGeorgianDateTime();
|
||||
double baseYearUnAffected = 0;
|
||||
double baseYearAffected = 0;
|
||||
double dailySalaryAffected = 0;
|
||||
|
||||
if (styear >= 1370)
|
||||
{
|
||||
if (leftworkList == null)
|
||||
leftworkList = new List<LeftWorkViewModel>();
|
||||
|
||||
var dayliFeeResult = _yearlySalaryRepository.DayliFeeComputing(startDate, contractStartDate,
|
||||
contractStartDate, command.EmployeeId, command.WorkshopId, leftworkList);
|
||||
dayliFee = dayliFeeResult.DayliFee;
|
||||
basic = dayliFeeResult.Basic;
|
||||
//var dayliFeeResult = _yearlySalaryRepository.DayliFeeComputing(startDate, contractStartDate,
|
||||
// contractStartDate, command.EmployeeId, command.WorkshopId, leftworkList);
|
||||
|
||||
|
||||
var baseYear = _yearlySalaryRepository.BaseYearCompute(contractStartDate, endDate, command.EmployeeId,
|
||||
command.WorkshopId, leftworkList).Result;
|
||||
dayliFee = (command.DailySalaryUnAffected + baseYear.BaseYearResult).ToMoney();
|
||||
//basic = dayliFeeResult.Basic;
|
||||
//Console.WriteLine($"oldDaily : {dayliFeeResult.DayliFee} newDaily {dayliFee}");
|
||||
baseYearUnAffected = baseYear.BaseYearResult > 0 ? (baseYear.BaseYearResult.ToMoney()).MoneyToDouble() : 0;
|
||||
baseYearAffected = baseYearUnAffected;
|
||||
dailySalaryAffected = command.DailySalaryUnAffected;
|
||||
}
|
||||
|
||||
#endregion
|
||||
@@ -5607,13 +5712,22 @@ public class AutoExtensionModel : PageModel
|
||||
//var dividedForOneDay = totalHourses / notHolidaysCount;
|
||||
if (totalHourses < FixHourses)
|
||||
{
|
||||
var DailyFeeNumberType = dayliFee.MoneyToDouble();
|
||||
var dailyStep1 = DailyFeeNumberType / 7.33;
|
||||
//var DailyFeeNumberType = dayliFee.MoneyToDouble();
|
||||
//var dailyStep1 = DailyFeeNumberType / 7.33;
|
||||
var hoursesPerDay = totalHourses / TotalDaysNoFriday;
|
||||
var result = hoursesPerDay * dailyStep1;
|
||||
//var result = hoursesPerDay * dailyStep1;
|
||||
|
||||
dayliFee = result.ToMoney();
|
||||
//dayliFee = result.ToMoney();
|
||||
|
||||
var da = command.DailySalaryUnAffected / 7.33;
|
||||
dailySalaryAffected = da > 0 ? ((hoursesPerDay * da).ToMoney()).MoneyToDouble() : 0 ;
|
||||
var ba = baseYearUnAffected / 7.33;
|
||||
baseYearAffected = ba > 0 ? ((hoursesPerDay * ba).ToMoney()).MoneyToDouble() : 0;
|
||||
|
||||
var fullDailySalary = dailySalaryAffected + baseYearAffected;
|
||||
dayliFee = fullDailySalary.ToMoney();
|
||||
|
||||
|
||||
|
||||
var HousingAllowonceNumberType = HousingAllowance.MoneyToDouble();
|
||||
var HousingStep1 = HousingAllowonceNumberType / 30; // کمک هزینه خام به ازای روز
|
||||
@@ -5700,12 +5814,21 @@ public class AutoExtensionModel : PageModel
|
||||
|
||||
if (totalHourses < FixHourses)
|
||||
{
|
||||
var dailyFeeNumberType = dayliFee.MoneyToDouble();
|
||||
var dailyStep1 = dailyFeeNumberType / 7.33;
|
||||
//var dailyFeeNumberType = dayliFee.MoneyToDouble();
|
||||
//var dailyStep1 = dailyFeeNumberType / 7.33;
|
||||
var hoursesPerDay = totalHourses / TotalDaysNoFriday;
|
||||
var result = hoursesPerDay * dailyStep1;
|
||||
//var result = hoursesPerDay * dailyStep1;
|
||||
|
||||
//dayliFee = result.ToMoney();
|
||||
|
||||
var da = command.DailySalaryUnAffected / 7.33;
|
||||
dailySalaryAffected = da > 0 ? ((hoursesPerDay * da).ToMoney()).MoneyToDouble() : 0;
|
||||
var ba = baseYearUnAffected / 7.33;
|
||||
baseYearAffected = ba > 0 ? ((hoursesPerDay * ba).ToMoney()).MoneyToDouble() : 0;
|
||||
|
||||
var fullDailySalary = dailySalaryAffected + baseYearAffected;
|
||||
dayliFee = fullDailySalary.ToMoney();
|
||||
|
||||
dayliFee = result.ToMoney();
|
||||
|
||||
//var HousingAllowonceNumberType = HousingAllowance.MoneyToDouble();
|
||||
//var HousingStep1 = HousingAllowonceNumberType / 30;
|
||||
@@ -5892,7 +6015,11 @@ public class AutoExtensionModel : PageModel
|
||||
weeklyTime = weeklyTime,
|
||||
RotatingResultList = rotatingResultList,
|
||||
RotatingStatus = rotatingFaResult,
|
||||
Basic = basic
|
||||
Basic = basic,
|
||||
|
||||
BaseYearAffected = baseYearAffected,
|
||||
BaseYearUnAffected = baseYearUnAffected,
|
||||
DailySalaryAffected = dailySalaryAffected,
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using CompanyManagment.App.Contracts.AndroidApkVersion;
|
||||
using CompanyManagment.EFCore;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace ServiceHost.Pages.login;
|
||||
|
||||
@@ -35,6 +36,7 @@ public class IndexModel : PageModel
|
||||
private readonly IAndroidApkVersionApplication _androidApkVersionApplication;
|
||||
private readonly CompanyContext _context;
|
||||
private readonly IRollCallDomainService _rollCallDomainService;
|
||||
private readonly AppSettingConfiguration _appSettingConfiguration;
|
||||
|
||||
public string Mess { get; set; }
|
||||
[BindProperty] public string Username { get; set; }
|
||||
@@ -47,7 +49,7 @@ public class IndexModel : PageModel
|
||||
|
||||
public IndexModel(IAccountApplication accountApplication, IGoogleRecaptcha googleRecaptcha,
|
||||
IAuthHelper authHelper, IAndroidApkVersionApplication androidApkVersionApplication, CompanyContext context,
|
||||
IRollCallDomainService rollCallDomainService)
|
||||
IRollCallDomainService rollCallDomainService, IOptions<AppSettingConfiguration> optionsAppSetting)
|
||||
{
|
||||
_accountApplication = accountApplication;
|
||||
_googleRecaptcha = googleRecaptcha;
|
||||
@@ -55,6 +57,7 @@ public class IndexModel : PageModel
|
||||
_androidApkVersionApplication = androidApkVersionApplication;
|
||||
_context = context;
|
||||
_rollCallDomainService = rollCallDomainService;
|
||||
_appSettingConfiguration = optionsAppSetting.Value;
|
||||
}
|
||||
|
||||
public IActionResult OnGet()
|
||||
@@ -87,7 +90,7 @@ public class IndexModel : PageModel
|
||||
}
|
||||
else
|
||||
{
|
||||
return Redirect("/Admin");
|
||||
return Redirect($"https://{_appSettingConfiguration.AdminDomain}");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -167,7 +170,7 @@ public class IndexModel : PageModel
|
||||
switch (result.SendId)
|
||||
{
|
||||
case 1:
|
||||
return Redirect("/Admin");
|
||||
return Redirect($"https://{_appSettingConfiguration.AdminDomain}");
|
||||
break;
|
||||
case 2:
|
||||
|
||||
|
||||
@@ -96,7 +96,19 @@ connection.on('showStatus',
|
||||
});
|
||||
$('#firstCheckBtn').on('click',
|
||||
function () {
|
||||
$("a.groupDailyWage")
|
||||
.removeClass("groupDailyWageEnable");
|
||||
|
||||
$('.errorCompare').addClass("falseStatusHide");
|
||||
$('.dayliwage').removeClass("erroreManual");
|
||||
$(".groupDailyWage").removeClass("selectedBtn");
|
||||
$('.dayliwage').prop("disabled", true);
|
||||
$('.dayliwage').val("0");
|
||||
$(".selectDailyWageModel").prop("disabled", true);
|
||||
$(".selectDailyWageModel").prop('selectedIndex', 0).trigger('chang');
|
||||
$('#datatable tbody tr').each(function (i) {
|
||||
|
||||
|
||||
const tagTrue = $(this).find(".ion-checkmark-circled");
|
||||
const tagFalse = $(this).find(".ion-close-circled");
|
||||
const statusTrue = $(this).find("input[name=isStatusTrue]");
|
||||
@@ -133,6 +145,8 @@ $('#firstCheckBtn').on('click',
|
||||
var failedTr;
|
||||
var workshopId = $('#workshopId').val();
|
||||
|
||||
var normalDailyWage = "0";
|
||||
var upgradedDailyWage = "0";
|
||||
var address = $('#wAddress1').val();
|
||||
const checkboxCount = $('#datatable').find("input[type=checkbox]:checked").length;
|
||||
//ERR Response
|
||||
@@ -177,8 +191,12 @@ $('#firstCheckBtn').on('click',
|
||||
|
||||
if (continueCheck && dateInputPannel) {
|
||||
if (checkboxCount > 0) {
|
||||
|
||||
$('#datatable tbody tr').each(function (i) {
|
||||
let chekbox = $(this).find("input[name=selectItem]");
|
||||
|
||||
$(this).find(".sdate").prop("disabled", false);
|
||||
$(this).find(".edate").prop("disabled", false);
|
||||
if (chekbox.is(":checked") == true) {
|
||||
employeeId = $(this).attr("data-employeeId");
|
||||
start = $(this).find("input[name=contarctStart]").val();
|
||||
@@ -325,6 +343,9 @@ $('#firstCheckBtn').on('click',
|
||||
errLeftValid = response.errLeftValid;
|
||||
|
||||
errContractExist = response.errContractExist;
|
||||
|
||||
normalDailyWage = response.normalDailyWage;
|
||||
upgradedDailyWage = response.upgradedDailyWage;
|
||||
}
|
||||
},
|
||||
failure: function (response) {
|
||||
@@ -358,6 +379,11 @@ $('#firstCheckBtn').on('click',
|
||||
} else {
|
||||
$(this).removeClass("redColor");
|
||||
$(this).addClass("greenColor");
|
||||
$(this).find(".selectDailyWageModel").prop("disabled", false);
|
||||
$(this).find(".normalDailyWage").val(normalDailyWage);
|
||||
$(this).find(".upgradedDailyWage").val(upgradedDailyWage);
|
||||
$(this).find(".sdate").prop("disabled", true);
|
||||
$(this).find(".edate").prop("disabled", true);
|
||||
//$(this).find("input[type=checkbox]").removeAttr("disabled");
|
||||
//$(this).find("input[type=checkbox]").prop("checked", true);
|
||||
var iTagTrue = $(this).find(".ion-checkmark-circled");
|
||||
@@ -419,6 +445,14 @@ $('#firstCheckBtn').on('click',
|
||||
|
||||
|
||||
}); //end of each
|
||||
|
||||
|
||||
var greenCount = $("table tr.greenColor").length;
|
||||
|
||||
if (greenCount >= 1) {
|
||||
$("a.groupDailyWage")
|
||||
.addClass("groupDailyWageEnable");
|
||||
}
|
||||
} else { //checkboxCount If statment
|
||||
|
||||
$.Notification.autoHideNotify('error', 'top center', 'پیام سیستم ', " هیچ موردی انتخاب نشده است - میتوانید بصورت گروهی یا تکی، پرسنل را تیک بزنید");
|
||||
@@ -536,6 +570,14 @@ $('#startProcess').on('click',
|
||||
|
||||
createContractModel.EmployerId = employerId;
|
||||
|
||||
|
||||
createContractModel.NormalDailyWage = $(this).find("input[name=normalDailyWage]").val();
|
||||
createContractModel.DailySalaryUnAffectedStr = $(this).find("input[name=dailySalaryUnAffectedStr]").val();
|
||||
createContractModel.DailyWageType = $(this).find("select[name=dailyWageType]").val();
|
||||
if (createContractModel.DailySalaryUnAffectedStr == "0") {
|
||||
$(this).find("input[name=dailySalaryUnAffectedStr]").addClass("erroreManual");
|
||||
startCreate = false;
|
||||
}
|
||||
createContarctList.push(createContractModel);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user