using System; using System.Collections.Generic; using System.Linq; using System.Security.AccessControl; using _0_Framework.Application; using _0_Framework.Application.Enums; using _0_Framework.Domain.CustomizeCheckoutShared.Base; using _0_Framework.Domain.CustomizeCheckoutShared.Enums; using _0_Framework.Domain.CustomizeCheckoutShared.ValueObjects; using CompanyManagment.App.Contracts.CustomizeWorkshopSettings; using CompanyManagment.App.Contracts.File1; using CompanyManagment.App.Contracts.Fine; using CompanyManagment.App.Contracts.Loan; using CompanyManagment.App.Contracts.Reward; using CompanyManagment.App.Contracts.SalaryAid; namespace CompanyManagment.App.Contracts.CustomizeCheckout; public class CustomizeCheckoutMandatoryViewModel { /// /// حقوق ماهانه /// public double MonthlySalary { get; set; } #region Payments /// /// جمعه کاری /// public double FridayPay { get; set; } /// /// اضافه کاری /// public double OverTimePay { get; set; } /// /// سنوات /// public double BaseYearsPay { get; set; } /// /// عیدی /// public double BonusesPay { get; set; } /// /// شب کاری /// public double NightWorkPay { get; set; } /// /// حق تاهل /// public double MarriedAllowance { get; set; } /// /// نوبت کاری /// public double ShiftPay { get; set; } /// /// حق اولاد(حق فرزند)ء /// public double FamilyAllowance { get; set; } /// /// مزد مرخصی /// public double LeavePay { get; set; } /// /// پاداش /// public double RewardPay { get; set; } #endregion #region Deductions /// /// حق بیمه /// public double InsuranceDeduction { get; set; } /// /// جریمه غیبت /// public double FineAbsenceDeduction { get; set; } /// /// غیبت /// public double AbsenceDaysDeduction { get; set; } /// /// کسری ساعت /// public double AbsenceHoursDeduction { get; set; } /// /// تاخیر در ورود /// public double LateToWorkDeduction { get; set; } /// /// تعجیل در خروج /// public double EarlyExitDeduction { get; set; } /// /// مساعده /// public double SalaryAidDeduction { get; set; } /// /// قسط وام /// public double InstallmentDeduction { get; set; } /// /// جریمه /// public double FineDeduction { get; set; } /// /// مالیات /// public double TaxDeduction { get; set; } #endregion #region Values public TimeSpan LateToWorkValue { get; set; } #endregion /// /// تعداد روزهای کارکرد /// public string SumOfWorkingDays { get; set; } /// /// مجموع مطالبات /// public double TotalClaimsDouble => MonthlySalary + FridayPay + OverTimePay + BaseYearsPay + BonusesPay + NightWorkPay + MarriedAllowance + ShiftPay + FamilyAllowance + LeavePay + RewardPay; /// /// مجموع کسورات /// public double TotalDeductionsDouble => FineAbsenceDeduction + InsuranceDeduction + LateToWorkDeduction + EarlyExitDeduction + SalaryAidDeduction + InstallmentDeduction + FineDeduction + TaxDeduction+ DynamicDeductions.Sum(x=>x.Amount.MoneyToDouble()); /// /// مجموع مطالبات /// public string TotalClaimsStr => TotalClaimsDouble.ToMoney(); /// /// مجموع کسورات /// public string TotalDeductionsStr => TotalDeductionsDouble.ToMoney(); /// /// مجموع پرداختی /// public double TotalPayment => Math.Truncate(TotalClaimsDouble - TotalDeductionsDouble); #region Employee Information public long PersonnelCode { get; set; } public string EmployeeName { get; set; } public long EmployeeId { get; set; } #endregion #region Contract Information public string ContractNo { get; set; } public string ContractStartFa { get; set; } public string ContractEndFa { get; set; } public int Year { get; set; } public int Month { get; set; } #endregion public List FineViewModels { get; set; } public List RewardViewModels { get; set; } public List InstallmentViewModels{ get; set; } public List SalaryAidViewModels { get; set; } public double SettingSalary { get; set; } public double DailyWage { get; set; } public WorkshopShiftStatus ShiftStatus { get; set; } public IrregularShift IrregularShift { get; set; } public ICollection CustomizeRotatingShifts { get; set; } = []; public ICollection EmployeeSettingsShifts { get; set; } = []; public List DynamicDeductions { get; set; } = new(); }