EchoTex_Payroll/HRM.BO/Arrear/ArrearProcessDetail.cs

343 lines
9.3 KiB
C#
Raw Normal View History

2024-10-14 10:01:49 +06:00
using System;
using System.Collections.Generic;
using System.Linq;
namespace HRM.BO
{
public class ArrearProcessDetail : AuditTrailBase
{
#region Constructor
public ArrearProcessDetail()
{
_iArrearProcessID = 0;
_iEmployeeID = 0;
_dProcessMonth = DateTime.MinValue;
_iDepartmentID = 0;
_iDesingnationID = 0;
_iLocationID = 0;
_iBranchID = 0;
_sAccountNo = string.Empty;
_iGradeID = 0;
_iScaleID = 0;
_dBasicSalary = 0.0;
_dGrossSalary = 0.0;
_dIncrementPercent = 0.0;
_dArrearEffectFromDate = DateTime.MinValue;
}
#endregion
#region Properties
#region ArrearProcessID : ID
private int _iArrearProcessID;
public int ArrearProcessID
{
get { return _iArrearProcessID; }
set { _iArrearProcessID = value; }
}
#endregion
#region EmployeeID : ID
private int _iEmployeeID;
public int EmployeeID
{
get { return _iEmployeeID; }
set { _iEmployeeID = value; }
}
#endregion
#region ProcessMonth : DateTime
private DateTime _dProcessMonth;
public DateTime ProcessMonth
{
get { return _dProcessMonth; }
set { _dProcessMonth = value; }
}
#endregion
#region DepartmentID : int
private int _iDepartmentID;
public int DepartmentID
{
get { return _iDepartmentID; }
set { _iDepartmentID = value; }
}
#endregion
#region DesingnationID : int
private int _iDesingnationID;
public int DesingnationID
{
get { return _iDesingnationID; }
set { _iDesingnationID = value; }
}
#endregion
#region LocationID : int
private int _iLocationID;
public int LocationID
{
get { return _iLocationID; }
set { _iLocationID = value; }
}
#endregion
#region BranchID : int
private int _iBranchID;
public int BranchID
{
get { return _iBranchID; }
set { _iBranchID = value; }
}
#endregion
#region AccountNo : string
private string _sAccountNo;
public string AccountNo
{
get { return _sAccountNo; }
set { _sAccountNo = value; }
}
#endregion
#region GradeID : int
private int _iGradeID;
public int GradeID
{
get { return _iGradeID; }
set { _iGradeID = value; }
}
#endregion
#region ScaleID : int
private int _iScaleID;
public int ScaleID
{
get { return _iScaleID; }
set { _iScaleID = value; }
}
#endregion
#region BasicSalary : double
private double _dBasicSalary;
public double BasicSalary
{
get { return _dBasicSalary; }
set { _dBasicSalary = value; }
}
#endregion
#region GrossSalary : double
private double _dGrossSalary;
public double GrossSalary
{
get { return _dGrossSalary; }
set { _dGrossSalary = value; }
}
#endregion
#region IncrementPercent : double
private double _dIncrementPercent;
public double IncrementPercent
{
get { return _dIncrementPercent; }
set { _dIncrementPercent = value; }
}
#endregion
#region ArrearEffectFromDate : DateTime
private DateTime _dArrearEffectFromDate;
public DateTime ArrearEffectFromDate
{
get { return _dArrearEffectFromDate; }
set { _dArrearEffectFromDate = value; }
}
#endregion
public List<ArrearProcessDetailItem> ArrearProcessDetailItems { get; set; }
public Employee Employee { get; set; }
public List<ArrearProcessCostDist> ArrearProcessCostDists { get; set; }
public List<IncomeTax> IncomeTaxcoll { get; set; }
//#region ArrearProcessDetailItems : List<ArrearProcessDetailItem>
// private List<ArrearProcessDetailItem> _oArrearProcessDetailItems;
//public List<ArrearProcessDetailItem> ArrearProcessDetailItems
//{
// get
// {
// if (this.int != null && _oArrearProcessDetailItems == null)
// {
// _oArrearProcessDetailItems = ArrearProcess.Service.GetArrearProcessDetailItems(this.ID);
// }
// return _oArrearProcessDetailItems;
// }
// set { _oArrearProcessDetailItems = value; }
//}
//#endregion
// private Employee _employee;
//public Employee Employee
//{
// get
// {
// if (_employee == null && _iEmployeeID.Integer > 0)
// {
// _employee = new Employee();
// _employee = Employee.Get(_iEmployeeID);
// }
// return this._employee;
// }
// set
// {
// _employee = value;
// }
//}
//private List<IncomeTax> _incomeTax = null;
//public List<IncomeTax> IncomeTaxcoll
//{
// get
// {
// return _incomeTax;
// }
// set
// {
// _incomeTax = value;
// }
//}
// #region ArrearProcessCostDists : List<ArrearProcessCostDist>
// private List<ArrearProcessCostDist> _oArrearProcessCostDists;
//public List<ArrearProcessCostDist> ArrearProcessCostDists
//{
// get
// {
// if (this.int != null && _oArrearProcessCostDists == null)
// {
// _oArrearProcessCostDists = ArrearProcess.Service.GetArrearProcessCostDists(this.ID);
// }
// return _oArrearProcessCostDists;
// }
// set { _oArrearProcessCostDists = value; }
//}
//#endregion
//public void CalculateTax(ArrearProcessDetail arritems, List<IncomeTax> currentYearTax, TaxParameter taxParameter)
//{
// List<TaxRawItem> taxrawItems = new List<TaxRawItem>();
// foreach (ArrearProcessDetailItem item in arritems.ArrearProcessDetailItems)
// {
// TaxRawItem tax = new TaxRawItem();
// tax.Description = item.Description;
// switch (item.ItemType)
// {
// case enumPayrollComponentType.Basic_salary:
// tax.ItemType = enumIncomeTaxItemType.Basic_Salary;
// //tax.ChangePrgAmount = true;//Chapal
// break;
// case enumPayrollComponentType.PF:
// tax.ItemType = enumIncomeTaxItemType.PF;
// //tax.ChangePrgAmount = true;//Chapal
// break;
// case enumPayrollComponentType.Allowance:
// tax.ItemType = enumIncomeTaxItemType.Allowance;
// //tax.ChangePrgAmount = true;//Chapal
// break;
// case enumPayrollComponentType.Deduction:
// tax.ItemType = enumIncomeTaxItemType.Deduction;
// break;
// case enumPayrollComponentType.Over_Time:
// tax.ItemType = enumIncomeTaxItemType.OT;
// break;
// case enumPayrollComponentType.Bonus:
// tax.ItemType = enumIncomeTaxItemType.Bonus;
// break;
// //case EnumArearProcessItemType.OPI:
// // tax.ItemType = enumIncomeTaxItemType.OPI;
// // break;
// default:
// break;
// }
// tax.ItemId = item.ItemID;
// tax.Description = item.Description;
// tax.Amount = item.ChangedAmount;
// //tax.SupportID = item.SupportID;//Chapal
// taxrawItems.Add(tax);
// }
// TaxCalculator ocal = new TaxCalculator();
// double namount = 0;
// ocal.TaxParameter = taxParameter;
// ocal.Employee = arritems.Employee;
// ocal.CurrentYearTax = currentYearTax;
// arritems.IncomeTaxcoll = ocal.CalculateLTATax(taxrawItems, ref namount);
// ArrearProcessDetailItem oDetailItem = new ArrearProcessDetailItem();
// oDetailItem.ItemType = enumPayrollComponentType.IncomeTax;
// oDetailItem.ItemID = (int)EnumArearProcessItemType.IncomeTax;
// oDetailItem.Side = EnumArearTranSide.Debit;
// oDetailItem.Description = "Income tax";
// oDetailItem.CalculatedAmount = namount;
// oDetailItem.ChangedAmount = namount;
// arritems.ArrearProcessDetailItems.Add(oDetailItem);
//}
#endregion
}
}