Files
Backend-Api/CompanyManagment.App.Contracts/CustomizeCheckout/CustomizeCheckoutMandatoryViewModel.cs
2025-04-08 16:50:51 +03:30

213 lines
5.4 KiB
C#

using System;
using System.Collections.Generic;
using System.Security.AccessControl;
using _0_Framework.Application;
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
{
/// <summary>
/// حقوق ماهانه
/// </summary>
public double MonthlySalary { get; set; }
#region Payments
/// <summary>
/// جمعه کاری
/// </summary>
public double FridayPay { get; set; }
/// <summary>
/// اضافه کاری
/// </summary>
public double OverTimePay { get; set; }
/// <summary>
/// سنوات
/// </summary>
public double BaseYearsPay { get; set; }
/// <summary>
/// عیدی
/// </summary>
public double BonusesPay { get; set; }
/// <summary>
/// شب کاری
/// </summary>
public double NightWorkPay { get; set; }
/// <summary>
/// حق تاهل
/// </summary>
public double MarriedAllowance { get; set; }
/// <summary>
/// نوبت کاری
/// </summary>
public double ShiftPay { get; set; }
/// <summary>
/// حق اولاد(حق فرزند)ء
/// </summary>
public double FamilyAllowance { get; set; }
/// <summary>
/// مزد مرخصی
/// </summary>
public double LeavePay { get; set; }
/// <summary>
/// پاداش
/// </summary>
public double RewardPay { get; set; }
#endregion
#region Deductions
/// <summary>
/// حق بیمه
/// </summary>
public double InsuranceDeduction { get; set; }
/// <summary>
/// جریمه غیبت
/// </summary>
public double FineAbsenceDeduction { get; set; }
/// <summary>
/// غیبت
/// </summary>
public double AbsenceDaysDeduction { get; set; }
/// <summary>
/// کسری ساعت
/// </summary>
public double AbsenceHoursDeduction { get; set; }
/// <summary>
/// تاخیر در ورود
/// </summary>
public double LateToWorkDeduction { get; set; }
/// <summary>
/// تعجیل در خروج
/// </summary>
public double EarlyExitDeduction { get; set; }
/// <summary>
/// مساعده
/// </summary>
public double SalaryAidDeduction { get; set; }
/// <summary>
/// قسط وام
/// </summary>
public double InstallmentDeduction { get; set; }
/// <summary>
/// جریمه
/// </summary>
public double FineDeduction { get; set; }
/// <summary>
/// مالیات
/// </summary>
public double TaxDeduction { get; set; }
#endregion
#region Values
public TimeSpan LateToWorkValue { get; set; }
#endregion
/// <summary>
/// تعداد روزهای کارکرد
/// </summary>
public string SumOfWorkingDays { get; set; }
/// <summary>
/// مجموع مطالبات
/// </summary>
public double TotalClaimsDouble => MonthlySalary + FridayPay + OverTimePay + BaseYearsPay + BonusesPay + NightWorkPay +
MarriedAllowance + ShiftPay + FamilyAllowance + LeavePay + RewardPay;
/// <summary>
/// مجموع کسورات
/// </summary>
public double TotalDeductionsDouble => FineAbsenceDeduction + InsuranceDeduction + LateToWorkDeduction +
EarlyExitDeduction + SalaryAidDeduction + InstallmentDeduction +
FineDeduction + TaxDeduction;
/// <summary>
/// مجموع مطالبات
/// </summary>
public string TotalClaimsStr => TotalClaimsDouble.ToMoney();
/// <summary>
/// مجموع کسورات
/// </summary>
public string TotalDeductionsStr => TotalDeductionsDouble.ToMoney();
/// <summary>
/// مجموع پرداختی
/// </summary>
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<FineViewModel> FineViewModels { get; set; }
public List<RewardViewModel> RewardViewModels { get; set; }
public List<LoanInstallmentViewModel> InstallmentViewModels{ get; set; }
public List<SalaryAidViewModel> 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<CustomizeRotatingShift> CustomizeRotatingShifts { get; set; } = [];
public ICollection<CustomizeSifts> EmployeeSettingsShifts { get; set; } = [];
}