EchoTex_Payroll/HRM.BO/Salary/SalaryMonthly.cs

2164 lines
75 KiB
C#
Raw Permalink Normal View History

2024-10-14 10:01:49 +06:00

using Ease.Core.Model;
using System;
using System.Collections.Generic;
using System.Data;
namespace HRM.BO
{
#region SalaryMonthly
public class SalaryMonthly : AuditTrailBase
{
#region Constructor
public SalaryMonthly()
{
_salaryMonth = DateTime.MinValue; //22
_employeeID = 0;//7
_categoryID = 0;//3
_departmentID = 0;//4
_designationID = 0;//5
_locationID = 0;//13
_gradeID = 0;//GetLastPaidSalaryMonth9
_isFinalized = false;//12
_paymentDate = DateTime.MinValue;//16
_employeeNo = string.Empty;
_name = string.Empty;
_prevMonthBasic = 0;//19
_thisMonthBasic = 0;//24
_arrearEmpID = 0;
_isConfirmed = false; //10
_isEligibleOT = false;//11
_religionID = 0;//20
_payrollTypeID = 0;//17
_outPayBranchID = null;//14
_outPayAccountNo = "";//15
_remarks = string.Empty;//21
_accountNo = string.Empty; //1
_branchID = 0; //2
_designationText = string.Empty;//6
_salaryProcessID = 0;//23
_pFMembershipType = EnumPFMembershipType.NotYetLive;//18
_gender = EnumGender.None;//8
_paymentDate = null;
this.Details = new List<SalaryMonthlyDetail>();
}
#endregion
#region Properties
#region Salary Month : DateTime
private DateTime _salaryMonth;
public DateTime SalaryMonth
{
get { return _salaryMonth; }
set
{
_salaryMonth = value;
}
}
#endregion
#region employeeID : ID
private int _employeeID;
public int EmployeeID
{
get { return _employeeID; }
set
{
_employeeID = value;
}
}
#endregion
#region categoryID : ID
private int _categoryID;
public int CategoryID
{
get { return _categoryID; }
set
{
_categoryID = value;
}
}
#endregion
#region departmentID : ID
private int _departmentID;
public int DepartmentID
{
get { return _departmentID; }
set
{
_departmentID = value;
}
}
#endregion
#region designationID : ID
private int _designationID;
public int DesignationID
{
get { return _designationID; }
set
{
_designationID = value;
}
}
#endregion
#region locationID : ID
private int _locationID;
public int LocationID
{
get { return _locationID; }
set
{
_locationID = value;
}
}
#endregion
#region gradeID : ID
private int _gradeID;
public int GradeID
{
get { return _gradeID; }
set
{
_gradeID = value;
}
}
#endregion
#region isFinalized : bool
private bool _isFinalized;
public bool IsFinalized
{
get { return _isFinalized; }
set
{
_isFinalized = value;
}
}
#endregion
#region paymentDate : DateTime
private DateTime? _paymentDate;
public DateTime? PaymentDate
{
get { return _paymentDate; }
set
{
_paymentDate = value;
}
}
#endregion
#region employeeNo: string
private string _employeeNo;
public string EmployeeNo
{
get { return _employeeNo; }
set
{
_employeeNo = value;
}
}
#endregion
#region Employee Name : string
private string _name;
public string Name
{
get { return _name; }
set
{
_name = value;
}
}
#endregion
#region prevMonthBasic : double
private double _prevMonthBasic;
public double PrevMonthBasic
{
get { return _prevMonthBasic; }
set
{
_prevMonthBasic = value;
}
}
#endregion
#region thisMonthBasic : double
private double _thisMonthBasic;
public double ThisMonthBasic
{
get { return _thisMonthBasic; }
set
{
_thisMonthBasic = value;
}
}
#endregion
#region thisMonthGross : double
private double _thisMonthGross;
public double ThisMonthGross
{
get { return _thisMonthGross; }
set
{
_thisMonthGross = value;
}
}
#endregion
#region arrearEmpID: int
private int _arrearEmpID;
public int ArrearEmpID
{
get { return _arrearEmpID; }
set
{
_arrearEmpID = value;
}
}
#endregion
#region isConfirmed : bool
private bool _isConfirmed;
public bool IsConfirmed
{
get { return _isConfirmed; }
set
{
_isConfirmed = value;
}
}
#endregion
#region isEligibleOT : bool
private bool _isEligibleOT;
public bool IsEligibleOT
{
get { return _isEligibleOT; }
set
{
_isEligibleOT = value;
}
}
#endregion
#region religionID : ID
private int _religionID;
public int ReligionID
{
get { return _religionID; }
set
{
_religionID = value;
}
}
#endregion
#region payrollTypeID : int
private int _payrollTypeID;
public int PayrollTypeID
{
get { return _payrollTypeID; }
set
{
_payrollTypeID = value;
}
}
#endregion
#region outPayBranchID : int
private int? _outPayBranchID;
public int? OutPayBranchID
{
get { return _outPayBranchID; }
set
{
_outPayBranchID = value;
}
}
#endregion
#region outPayAccountNo : long
private string _outPayAccountNo;
public string OutPayAccountNo
{
get { return _outPayAccountNo; }
set
{
_outPayAccountNo = value;
}
}
#endregion
#region remarks : string
private string _remarks;
public string Remarks
{
get { return _remarks; }
set
{
_remarks = value;
}
}
#endregion
#region accountNo : string
private string _accountNo;
public string AccountNo
{
get { return _accountNo; }
set
{
_accountNo = value;
}
}
#endregion
#region branchID : ID
private int? _branchID;
public int? BranchID
{
get { return _branchID; }
set
{
_branchID = value;
}
}
#endregion
#region designationText : string
private string _designationText;
public string DesignationText
{
get { return _designationText; }
set
{
_designationText = value;
}
}
#endregion
#region hoursOrDaysNDF : double
private double _hoursOrDaysNDF;
public double HoursOrDaysNDF
{
get { return _hoursOrDaysNDF; }
set
{
_hoursOrDaysNDF = value;
}
}
#endregion
#region salaryProcessID : ID
private int _salaryProcessID;
public int SalaryProcessID
{
get { return _salaryProcessID; }
set
{
_salaryProcessID = value;
}
}
#endregion
#region pFMembershipType : EnumPFMembershipType
private EnumPFMembershipType _pFMembershipType;
public EnumPFMembershipType PFMembershipType
{
get { return _pFMembershipType; }
set
{
_pFMembershipType = value;
}
}
#endregion
public double EuroRate { get; set; }
public List<SalaryMonthlyDetail> Details { get; set; }
public List<SalaryEmpCostCenter> CostCentersInvolments { get; set; }
public List<EmpChangeDesignation> DesignationChanges { get; set; }
public bool salaryWithHeld { get; set; }
//#region Salary Detail : Salary Detail
//private List<SalaryMonthlyDetail> _details;
//public List<SalaryMonthlyDetail> Details
//{
// get
// {
// // do not change this property,
// // This property is always populated from Map object with parents.
// if (_details == null) _details = new List<SalaryMonthlyDetail>();
// return _details;
// }
// set
// {
// _details = value;
// }
//}
//public static List<SalaryMonthlyDetail> GetSalaryDetail(int nID)
//{
// List<SalaryMonthlyDetail> oSalaryMonthlyDetail = null;
// #region Cache Header
// oSalaryMonthlyDetail = (List<SalaryMonthlyDetail>)_cache["GetSalaryDetail", nID];
// if (oSalaryMonthlyDetail != null)
// return oSalaryMonthlyDetail;
// #endregion
// oSalaryMonthlyDetail = SalaryMonthly.Service.GetSalaryDetail(nID);
// #region Cache Footer
// _cache.Add(oSalaryMonthlyDetail, "GetSalaryDetail", nID);
// #endregion
// return oSalaryMonthlyDetail;
//}
//public static List<SalaryMonthlyDetail> GetSalaryDetail(string nIDs)
//{
// List<SalaryMonthlyDetail> oSalaryMonthlyDetail = null;
// #region Cache Header
// oSalaryMonthlyDetail = (List<SalaryMonthlyDetail>)_cache["GetSalaryDetail", nIDs];
// if (oSalaryMonthlyDetail != null)
// return oSalaryMonthlyDetail;
// #endregion
// oSalaryMonthlyDetail = SalaryMonthly.Service.GetSalaryDetail(nIDs);
// #region Cache Footer
// _cache.Add(oSalaryMonthlyDetail, "GetSalaryDetail", nIDs);
// #endregion
// return oSalaryMonthlyDetail;
//}
//#endregion
//#region Salary EmpCostCenter : SalaryEmpCotCenter
//private List<SalaryEmpCostCenter> _salaryEmpCostCenters;
//public List<SalaryEmpCostCenter> CostCentersInvolments
//{
// get
// {
// if (_salaryEmpCostCenters == null)
// {
// _salaryEmpCostCenters = SalaryEmpCostCenter.Service.GetForCC(this.ID);
// //_salaryEmpCostCenters = new List<SalaryEmpCostCenter>();
// }
// return _salaryEmpCostCenters;
// }
// set
// {
// _salaryEmpCostCenters = value;
// }
//}
//#endregion
//#region Designation Changes : SalaryEmpCotCenter
//private List<EmpChangeDesignation> _desingatinChanges;
//public List<EmpChangeDesignation> DesignationChanges
//{
// get
// {
// if (_desingatinChanges == null)
// {
// _desingatinChanges = new List<EmpChangeDesignation>();
// }
// return _desingatinChanges;
// }
// set
// {
// _desingatinChanges = value;
// }
//}
//#endregion
#region gender : EnumGender
private EnumGender _gender;
public EnumGender Gender
{
get { return _gender; }
set
{
_gender = value;
}
}
#endregion
//#region Service Factory ISalaryMonthlyService : ISalaryMonthlyService
//internal static ISalaryMonthlyService Service
//{
// get { return Services.Factory.CreateService<ISalaryMonthlyService>(typeof(ISalaryMonthlyService)); }
//}
//#endregion
//public Category Category { get; set; }
public Employee Employee { get; set; }
public Category Category { get; set; }
//#region Category : Category
//private Category _category;
//public Category Category
//{
// get
// {
// if (_category != null && _category.ID.Integer > 0 && _employee == null)
// {
// _category = new Category();
// _category = Category.Get(_categoryID);
// }
// return this._category;
// }
// set
// {
// _category = value;
// }
//}
//#endregion
//#region Employee : Employee
//private Employee _employee;
//public Employee Employee
//{
// get
// {
// if (_employeeID.Integer > 0 && _employee == null)
// {
// _employee = new Employee();
// _employee = Payroll.BO.Employee.Get(_employeeID);
// }
// return this._employee;
// }
// set
// {
// _employee = value;
// }
//}
//#endregion
#region Grade Salaries : Grade And Salary
private List<EmployeeGradeSalary> _gradeSalaries;
public List<EmployeeGradeSalary> GradeSalaries
{
get
{
//if (_gradeSalaries == null)
//{
// throw new ServiceException("Grade Salary not yet set");
//}
return _gradeSalaries;
}
set
{
_gradeSalaries = value;
}
}
#endregion
#region Arrear Grade Salaries : Grade And Salary
private List<EmployeeGradeSalary> _arreargradeSalaries;
public List<EmployeeGradeSalary> ArrearGradeSalaries
{
get
{
if (_arreargradeSalaries == null)
{
// throw new ServiceException("Arrear Grade Salary not yet set");
_arreargradeSalaries = new List<EmployeeGradeSalary>();
}
return _arreargradeSalaries;
}
set
{
_arreargradeSalaries = value;
}
}
#endregion
#region Grade Salaries : Grade And Salary
private List<IncomeTax> _incometaxes;
public List<IncomeTax> Incometaxes
{
get
{
//if (_incometaxes == null)
//{
// throw new ServiceException("Income Tax not yet set");
//}
return _incometaxes;
}
set
{
_incometaxes = value;
}
}
#endregion
#region Arrear Paid Grade Salaries : Grade And Salary
private List<EmployeeGradeSalary> _arrearPaidgradeSalaries;
public List<EmployeeGradeSalary> ArrearPaidGradeSalaries
{
get
{
if (_arrearPaidgradeSalaries == null)
{
//throw new ServiceException("Arrear Paid Grade Salary not yet set");
_arrearPaidgradeSalaries = new List<EmployeeGradeSalary>();
}
return _arrearPaidgradeSalaries;
}
set
{
_arrearPaidgradeSalaries = value;
}
}
#endregion
#region Total Gross : double
private double _totalGross;
public double TotalGross
{
get
{
return _totalGross;
}
}
#endregion
#region Total Unauthorized Deduct : double
private double _totalUADeduct;
public double TotalUADeduct
{
get
{
return _totalUADeduct;
}
}
#endregion
#region Total Deduct : double
private double _totalDeduct;
public double TotalDeduct
{
get
{
return _totalDeduct;
}
}
#endregion
#region Total Arrear : double
private double _totalArrear;
public double TotalArrear
{
get
{
return _totalArrear;
}
}
#endregion
#region NetPay : double
private double _NetPay;
public double NetPay
{
get
{
return _NetPay;
}
}
#endregion
/// <summary>
/// this property will be use in non management arrear salary calculation
/// </summary>
public double WIPIncrement { get; set; }
#endregion
// #region Functions
// public static SalaryMonthly Get(int nID)
// {
// SalaryMonthly oSalaryMonthly = null;
// #region Cache Header
// oSalaryMonthly = (SalaryMonthly)_cache["Get", nID];
// if (oSalaryMonthly != null)
// return oSalaryMonthly;
// #endregion
// oSalaryMonthly = SalaryMonthly.Service.Get(nID);
// #region Cache Footer
// _cache.Add(oSalaryMonthly, "Get", nID);
// #endregion
// return oSalaryMonthly;
// }
// public static DateTime? GetLastPaidSalaryMonth(int nEmpID)
// {
// return SalaryMonthly.Service.GetLastPaidSalaryMonth(nEmpID);
// }
// public static bool IsSalaryProcessed(int employeeId, DateTime salaryMonth)
// {
// bool Isprocessed = false;
// Isprocessed = Service.IsSalaryProcessed(employeeId, salaryMonth);
// return Isprocessed;
// }
// public static bool IsSalaryProcessedWeb(DateTime salaryMonth)
// {
// bool Isprocessed = false;
// Isprocessed = Service.IsSalaryProcessedWeb(salaryMonth,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return Isprocessed;
// }
// public static bool IsPermanentEmp(int employeeId, DateTime salaryMonth)
// {
// bool IsPermanent = false;
// IsPermanent = Service.IsPermanentEmp(employeeId, salaryMonth,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return IsPermanent;
// }
// public static int GetTotalEmp(int SProcessID)
// {
// int nTotalEmp = 0;
// nTotalEmp = Service.GetTotalEmp(SProcessID);
// return nTotalEmp;
// }
// public static List<SalaryMonthly> Get(DateTime salaryMonth)
// {
// List<SalaryMonthly> oSalaryMonthly = null;
// oSalaryMonthly = Service.Get(salaryMonth,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return oSalaryMonthly;
// }
// public static List<SalaryMonthly> GetForJV(DateTime salaryMonth)
// {
// List<SalaryMonthly> oSalaryMonthly = null;
// oSalaryMonthly = Service.GetForJV(salaryMonth,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return oSalaryMonthly;
// }
// //public static List<SalaryMonthly> Get(DateTime salaryMonth)
// //{
// // List<SalaryMonthly> oSalaryMonthly = null;
// // oSalaryMonthly = Service.Get(salaryMonth);
// // return oSalaryMonthly;
// //}
// public static List<SalaryMonthly> Get(string sEmpID, DateTime salaryMonth)
// {
// List<SalaryMonthly> oSalaryMonthly = null;
// oSalaryMonthly = Service.Get(sEmpID, salaryMonth,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return oSalaryMonthly;
// }
// public static List<SalaryMonthlyDetail> GetHead(int index, DateTime salaryMonth)
// {
// List<SalaryMonthlyDetail> oSalaryMonthlies = null;
// oSalaryMonthlies = Service.GetHead(index, salaryMonth);
// return oSalaryMonthlies;
// }
// public static List<SalaryMonthly> GetForWTP(string sEmpID, DateTime salaryMonth)
// {
// List<SalaryMonthly> oSalaryMonthly = null;
// oSalaryMonthly = Service.GetForWTP(sEmpID, salaryMonth,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return oSalaryMonthly;
// }
// public static List<SalaryEmpCostCenter> GetCostCenter(DateTime salaryMonth)
// {
// List<SalaryEmpCostCenter> oSalaryMonthly = null;
// oSalaryMonthly = Service.GetCostCenter(salaryMonth);
// return oSalaryMonthly;
// }
// public static List<SalaryEmpCostCenter> GetForCC(int salaryMonthID)
// {
// List<SalaryEmpCostCenter> oSalaryEmpCC = null;
// oSalaryEmpCC = Service.GetForCC(salaryMonthID);
// return oSalaryEmpCC;
// }
// public static SalaryMonthly Get(int nEmpID, DateTime sMonthDate)
// {
// SalaryMonthly oSalaryMonthly = null;
// #region Cache Header
// oSalaryMonthly = (SalaryMonthly)_cache["Get", nEmpID, sMonthDate];
// if (oSalaryMonthly != null)
// return oSalaryMonthly;
// #endregion
// oSalaryMonthly = SalaryMonthly.Service.Get(nEmpID, sMonthDate);
// #region Cache Footer
// _cache.Add(oSalaryMonthly, "Get", nEmpID, sMonthDate);
// #endregion
// return oSalaryMonthly;
// }
// //public int Save()
// //{
// // return SalaryMonthly.Service.Save(this);
// //}
// public static void Save(SalaryProcess process, List<SalaryMonthly> monthlys)
// {
// process.SetAuditTraiProperty();
// SalaryMonthly.Service.Save(process, monthlys);
// }
// public void Update()
// {
// this.SetAuditTrailProperties();
// SalaryMonthly.Service.Update(this);
// }
// public void UpdateSalaryDetail(List<SalaryMonthlyDetail> oItems, List<IncomeTax> oIncomeTaxs)
// {
// SalaryMonthly.Service.UpdateDetail(oItems, oIncomeTaxs);
// }
// public void Delete()
// {
// SalaryMonthly.Service.Delete(ID);
// }
// #endregion
// public SalaryMonthlyDetail GetDetail(EnumSalaryGroup groupCode,
// EnumSalaryItemCode itemcode, int itemId)
// {
// return this.Details.Find(delegate(SalaryMonthlyDetail item)
// {
// return item.itemGroupCode == groupCode && item.ItemCode == itemcode
// && item.ItemID == itemId;
// });
// }
public double GetGrossAmount(EnumSalaryItemCode itemCode, int itemId)
{
double amount = 0;
foreach (SalaryMonthlyDetail item in this.Details)
{
if (item.ItemCode == itemCode && item.ItemID == itemId)
{
if (item.itemGroupCode == EnumSalaryGroup.Gross || item.itemGroupCode == EnumSalaryGroup.Arrear)
amount = amount + item.ChangedAmount;
else if (item.itemGroupCode == EnumSalaryGroup.UnauthLeave)
amount = amount - item.ChangedAmount;
}
}
return amount;
}
// public double GetGrossAmount(EnumSalaryItemCode itemCode, SalaryMonthly oSMonthly, int itemId)
// {
// double amount = 0;
// foreach (SalaryMonthlyDetail item in oSMonthly.Details)
// {
// if (item.ItemCode == itemCode && item.ItemID == itemId)
// {
// if (item.itemGroupCode == EnumSalaryGroup.Gross || item.itemGroupCode == EnumSalaryGroup.Arrear)
// amount = amount + item.ChangedAmount;
// else if (item.itemGroupCode == EnumSalaryGroup.UnauthLeave)
// amount = amount - item.ChangedAmount;
// }
// }
// return amount;
// }
// public double GetAmount(EnumSalaryGroup groupcode, EnumSalaryItemCode itemCode)
// {
// return this.Details
// .Where(item => item.ItemCode == itemCode &&
// item.itemGroupCode == groupcode)
// .Sum(item => item.ChangedAmount);
// }
// public double GetAmount(EnumSalaryGroup groupcode, EnumSalaryItemCode itemCode, int itemId)
// {
// //return this.Details
// // .Where(item => item.ItemCode == itemCode &&
// // item.itemGroupCode == groupcode &&
// // item.ItemID == itemId)
// // .Sum(item => item.ChangedAmount);
// return this.Details
// .Where(item => item.ItemCode == itemCode &&
// item.ItemID == itemId)
// .Sum(item => item.ChangedAmount);
// }
// public double GetAmount(EnumSalaryGroup groupcode, EnumSalaryItemCode itemCode, SalaryMonthly oSM, int itemId)
// {
// return this.Details
// .Where(item => item.ItemCode == itemCode && item.ItemID == itemId &&
// (item.itemGroupCode == groupcode || item.itemGroupCode == EnumSalaryGroup.Arrear)
// )
// .Sum(item => item.ChangedAmount);
// //double amount = 0;
// //foreach (SalaryMonthlyDetail item in this.Details)
// //{
// // if (item.ItemCode == itemCode && item.ItemID == itemId)
// // {
// // if (item.itemGroupCode == groupcode || item.itemGroupCode == EnumSalaryGroup.Arrear)
// // amount = amount + item.ChangedAmount;
// // }
// // //if (item.ItemCode == itemCode && item.itemGroupCode == groupcode && item.ItemID == itemId)
// // // amount = amount + item.ChangedAmount;
// //}
// //return amount;
// }
// public double GetOPIAmount(EnumSalaryGroup groupcode, EnumSalaryItemCode itemCode, int itemId, List<OPIProcessDetail> oOPIProcessDetails, SalaryMonthly oSMonthly)
// {
// double amount = 0;
// OPIProcessDetail oOPIPDetail = oOPIProcessDetails.Find(delegate(OPIProcessDetail item)
// {
// return item.EmployeeID == oSMonthly.EmployeeID;
// });
// if (oOPIPDetail != null)
// {
// foreach (OPIProcessDetailItem oItem in oOPIPDetail.OPIProcessDetailItems)
// {
// if (oItem.OPIItemID.Integer == itemId && oItem.OPIProcessDetailID.Integer == oOPIPDetail.ID.Integer)
// amount = amount + oItem.NetAmount;
// }
// }
// return amount;
// }
// public double GetBonusAmount(EnumSalaryGroup groupcode, EnumSalaryItemCode itemCode)
// {
// double amount = 0;
// foreach (SalaryMonthlyDetail item in this.Details)
// {
// if (item.ItemCode == itemCode && item.itemGroupCode == groupcode)
// amount = amount + item.ChangedAmount;
// }
// return amount;
// }
// public double GetUnAmount(EnumSalaryGroup groupID)
// {
// double amount = 0;
// foreach (SalaryMonthlyDetail item in this.Details)
// {
// if (item.itemGroupCode == groupID)
// amount = amount + item.ChangedAmount;
// }
// return amount;
// }
// public double GetUnAmountForWartSila(EnumSalaryGroup groupID, int SalaryMonthlyID)
// {
// double amount = 0;
// foreach (SalaryMonthlyDetail item in this.Details)
// {
// if (item.itemGroupCode == groupID && item.SalaryMonthlyID == SalaryMonthlyID)
// amount = amount + item.ChangedAmount;
// }
// return amount;
// }
// public double GetUnAmountForBasic(EnumSalaryGroup groupID)
// {
// double amount = 0;
// foreach (SalaryMonthlyDetail item in this.Details)
// {
// if (item.itemGroupCode == groupID && item.ItemCode == EnumSalaryItemCode.Basic_Salary)
// amount = amount + item.ChangedAmount;
// }
// return amount;
// }
// public static DataSet GetEmpPaySlipGrossForOthers(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipGrossForOthers(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalaryReconciliationSummary(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalaryReconciliationSummary(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalarySheet(DateTime dSMonthDate, DateTime dEMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheet(dSMonthDate, dEMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPaySlipDeductForOthers(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipDeductForOthers(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPaySlipDeductForCitiOthers(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipDeductForCitiOthers(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPaySlipDeductForLR(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipDeductForLR(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPaySlipIncomeTaxAmountForOthers(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipIncomeTaxAmountForOthers(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
public double GetDeductAmount(EnumSalaryItemCode itemCode, int itemId)
{
double amount = 0;
foreach (SalaryMonthlyDetail item in this.Details)
{
if (item.ItemCode == itemCode && item.ItemID == itemId)
{
if (item.itemGroupCode == EnumSalaryGroup.Deductions)
amount = amount + item.ChangedAmount;
else if (item.itemGroupCode == EnumSalaryGroup.UnauthLeave)
amount = amount - item.ChangedAmount;
}
}
return amount;
}
public double GetDeductAmount(EnumSalaryItemCode itemCode, SalaryMonthly oSM, int itemId)
{
double amount = 0;
foreach (SalaryMonthlyDetail item in oSM.Details)
{
if (item.ItemCode == itemCode && item.ItemID == itemId)
{
if (item.itemGroupCode == EnumSalaryGroup.Deductions)
amount = amount + item.ChangedAmount;
else if (item.itemGroupCode == EnumSalaryGroup.UnauthLeave)
amount = amount - item.ChangedAmount;
}
}
return amount;
}
// public static DataSet GetEmpPaySlipGross(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipGross(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpOverAllSummaryGross(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpOverAllSummaryGross(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpOverAllSummaryDeduct(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpOverAllSummaryDeduct(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalarySheet(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheet(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalarySheetForManagement(DateTime sdMonth, string empId)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheetForManagement(sdMonth, empId);
// }
// catch(Exception ex)
// {
// throw new ServiceException(ex.Message);
// }
// return ds;
// }
// public static DataSet GetEmpSalarySheetForNonManagement(DateTime sdMonth, string empId)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheetForNonManagement(sdMonth, empId);
// }
// catch (Exception ex)
// {
// throw new ServiceException(ex.Message);
// }
// return ds;
// }
// public static DataSet GetCasualSalarySheet(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetCasualSalarySheet(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPrevDataForSRecon(DateTime dSMonthDate)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPrevDataForSRecon(dSMonthDate);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalaryReconForNovertis(DateTime dSMonthDate)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalaryReconForNovertis(dSMonthDate);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalarySheetForNovertis(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheetForNovertis(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalaryReconForCurrMonth(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalaryReconForCurrMonth(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalarySheetByCC(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheetByCC(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetSGSSalarySheet(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetSGSSalarySheet(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetExtendedSalarySheet(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetExtendedSalarySheet(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPaySlipDeduct(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipDeduct(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetPrvMonthNetSalary(DateTime dSMonthDate, string sEmpID, bool IsNetSum)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetPrvMonthNetSalary(dSMonthDate, sEmpID, IsNetSum);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpPaySlipIncomeTaxAmount(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpPaySlipIncomeTaxAmount(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSalaryProcessedData(DateTime dSMonthDate, string employeeno)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalaryProcessedData(dSMonthDate, employeeno);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetEmpSSSummaryByDept(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSSSummaryByDept(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetCCWiseSalarySheet(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetCCWiseSalarySheet(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetCCWiseSalarySummary(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetCCWiseSalarySummary(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
public void CalculateTotal()
{
_totalArrear = 0;
_totalDeduct = 0;
_totalGross = 0;
_totalUADeduct = 0;
if (this.Details == null) return;
foreach (SalaryMonthlyDetail detail in this.Details)
{
if (detail.IsNew)
{
detail.ChangedAmount = detail.CalculatedAmount;
}
switch (detail.itemGroupCode)
{
case EnumSalaryGroup.Gross:
_totalGross += GlobalFunctions.Round(detail.ChangedAmount);
break;
case EnumSalaryGroup.Deductions:
_totalDeduct += GlobalFunctions.Round(detail.ChangedAmount);
break;
case EnumSalaryGroup.Arrear:
_totalArrear += GlobalFunctions.Round(detail.ChangedAmount);
break;
case EnumSalaryGroup.UnauthLeave:
_totalUADeduct += GlobalFunctions.Round(detail.ChangedAmount);
break;
}
}
_NetPay = _totalGross + _totalArrear - _totalDeduct - _totalUADeduct;
}
// public double GetAmountOnRange(Employee employee, DateTime fromDate, DateTime toDate,
// EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId, int supportid, EmployeeGradeSalary gradeSalary, ADParameter apraram)
// {
// double fractionMonthAmount = 0;
// double amount = 0;
// if (Ease.CoreV35.Utility.Global.DateFunctions.DateDiff("m", PayrollPayrollGlobalFunctions.PayrollFirstDateOfMonth(fromDate), PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(toDate)) > 2)
// {
// amount = SalaryMonthly.Service.GetSumOnRange(employee.ID,
// PayrollPayrollGlobalFunctions.PayrollFirstDateOfMonth(fromDate.AddMonths(1)), PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(toDate.AddMonths(-1)),
// groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// }
// bool dataNotFound = false;
// if ( Global.DateFunctions.PayrollFirstDateOfMonth(fromDate) != Global.DateFunctions.PayrollFirstDateOfMonth(fromDate))
// {
//// EmployeeGradeSalary oge = EmployeeGradeSalary.Get(employee.ID, fromDate, EnumArrearType.NotPresent);
// if (gradeSalary != null)
// {
// switch (itemCode)
// {
// case EnumSalaryItemCode.Basic_Salary:
// fractionMonthAmount = gradeSalary.BasicSalary * PayrollPayrollGlobalFunctions.GetFractinalOfMonth(fromDate);
// dataNotFound = true;
// break;
// case EnumSalaryItemCode.Allowance:
// case EnumSalaryItemCode.Deduction:
// //ADParameter op = ADParameter.Get((supportid));
// if (apraram != null)
// {
// if (apraram.EntitleType == EnumEntitleType.Grade)
// {
// fractionMonthAmount = apraram.GetGradeDefinedAmount(employee, gradeSalary.BasicSalary, gradeSalary.GrossSalary, gradeSalary);
// fractionMonthAmount = fractionMonthAmount * PayrollPayrollGlobalFunctions.GetFractinalOfMonth(fromDate);
// dataNotFound = true;
// }
// else dataNotFound = false;
// }
// break;
// default:
// break;
// }
// }
// }
// if (dataNotFound == false)
// {
// fractionMonthAmount = SalaryMonthly.Service.GetSumOnRange(employee.ID,
// PayrollPayrollGlobalFunctions.PayrollFirstDateOfMonth(fromDate), PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(fromDate),
// groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer) * PayrollPayrollGlobalFunctions.GetFractinalOfMonth(fromDate);
// }
// // if (Ease.CoreV35.Utility.Global.DateFunctions.DateDiff("m", fromDate, toDate) > 0)
// if (Global.DateFunctions.PayrollFirstDateOfMonth(fromDate) != PayrollPayrollGlobalFunctions.PayrollFirstDateOfMonth(toDate)) // if cross two month
// {
// fractionMonthAmount = fractionMonthAmount + SalaryMonthly.Service.GetSumOnRange(employee.ID,
// PayrollPayrollGlobalFunctions.PayrollFirstDateOfMonth(toDate), PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(toDate),
// groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer) * PayrollPayrollGlobalFunctions.GetFractinalOfTillDate(toDate);
// }
// return amount = amount + fractionMonthAmount;
// }
// public double GetAmountOnRange(Employee employee, DateTime fromDate, DateTime toDate,
// EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId, int supportid)
// {
// if (fromDate != Global.DateFunctions.PayrollFirstDateOfMonth(fromDate))
// {
// EmployeeGradeSalary oge = null;
// oge = EmployeeGradeSalary.Get(employee.ID, fromDate, EnumArrearType.NotPresent);
// if (oge != null)
// {
// if (itemCode == EnumSalaryItemCode.Allowance || itemCode == EnumSalaryItemCode.Deduction)
// {
// ADParameter op = null;
// op = ADParameter.Get((supportid));
// return this.GetAmountOnRange(employee, fromDate, toDate, groupCode, itemCode, itemId, supportid, oge, op);
// }
// else return this.GetAmountOnRange(employee, fromDate, toDate, groupCode, itemCode, itemId, supportid, oge, null);
// } return this.GetAmountOnRange(employee, fromDate, toDate, groupCode, itemCode, itemId, supportid, null, null);
// }
// else return this.GetAmountOnRange(employee, fromDate, toDate, groupCode, itemCode, itemId, supportid, null, null);
// }
// public double GetUnAuthorizeAmount(double nAmount, Employee employee, DateTime fromdate, DateTime toDate,
// EnumSalaryItemCode itemCode, int itemId)
// {
// double uPaid = 0, uPayable = 0, totalUpayable = 0;
// DateTime StartDate = PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(fromdate);
// DateTime EndDate = PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(toDate);
// double MonDays = 0;
// int leaveDays = 0;
// while (StartDate <= EndDate)
// {
// MonDays = (double)StartDate.Day;
// leaveDays = SalaryMonthly.Service.GetUnAuthorizeDays(employee.ID, PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(StartDate));
// if (leaveDays > 0)
// {
// uPaid = SalaryMonthly.Service.GetSumOnRange(employee.ID,
// PayrollPayrollGlobalFunctions.PayrollFirstDateOfMonth(StartDate), PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(StartDate),
// EnumSalaryGroup.UnauthLeave, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// uPayable = (nAmount / MonDays) * leaveDays;
// totalUpayable = totalUpayable + (uPayable - uPaid);
// }
// StartDate = PayrollPayrollGlobalFunctions.PayrollLastDateOfMonth(StartDate.AddDays(1));
// }
// return totalUpayable;
// }
// public double GetAmountForYear(Employee employee, DateTime firstDateOfYear, DateTime lastDateOfYear,
// EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId)
// {
// double amount = 0;
// amount = SalaryMonthly.Service.GetSumOnRange(employee.ID, firstDateOfYear, lastDateOfYear, groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return amount;
// }
// public double GetUnAuthorizeAmountOnDateRange(int employeeId, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode)
// {
// double TotalUnAmount = 0.0;
// TotalUnAmount = SalaryMonthly.Service.GetUnAuthorizeAmountOnDateRange(employeeId, fromDate, toDate, groupCode);
// return TotalUnAmount;
// }
// public double GetAmountOnDateDiff(int employeeID, DateTime dFromDate, DateTime dToDate,
// EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId)
// {
// double amount = 0;
// amount = SalaryMonthly.Service.GetAmountOnDateDiff(employeeID, dFromDate, dToDate, groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return amount;
// }
// public double GetThisMonthBasicOnDateDiff(int employeeID, DateTime dFromDate, DateTime dToDate,
// EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId)
// {
// double amount = 0;
// amount = SalaryMonthly.Service.GetThisMonthBasicOnDateDiff(employeeID, dFromDate, dToDate, groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return amount;
// }
// public double GetAmountOnDateDiffForOverTime(int employeeID, DateTime dFromDate, DateTime dToDate,
// EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId)
// {
// double amount = 0;
// amount = SalaryMonthly.Service.GetAmountOnDateDiffForOverTime(employeeID, dFromDate, dToDate, groupCode, itemCode, itemId,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return amount;
// }
// public static DataSet GetSalaryStracture(string SempIds)
// {
// return SalaryMonthly.Service.GetSalaryStracture(SempIds);
// }
// public static List<SalaryMonthly> GetByProcessID(int SProcessID)
// {
// return SalaryMonthly.Service.GetByProcessID(SProcessID);
// }
// public static DataSet GetEmpSalarySheetByYear(DateTime dSalaryMonth, string sEmpID)
// {
// return SalaryMonthly.Service.GetEmpSalarySheetByYear(dSalaryMonth, sEmpID);
// }
// public static DataSet GetEmpStartDateAndEndDate(DateTime fstDate, DateTime endDate, string sEmpID)
// {
// return SalaryMonthly.Service.GetEmpStartDateAndEndDate(fstDate, endDate, sEmpID);
// }
// public static List<SalaryMonthly> GetByDateRange(DateTime startDate, DateTime endDate)
// {
// return SalaryMonthly.Service.GetByDateRange(startDate, endDate,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// }
// public static List<SalaryMonthly> GetByDateRange(int nEmpID, DateTime startDate, DateTime endDate)
// {
// return SalaryMonthly.Service.GetByDateRange(nEmpID, startDate, endDate,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// }
// public double GetAmountOnDateDiffForAll(int employeeID, DateTime dFromDate, DateTime dToDate)
// {
// double amount = 0;
// amount = SalaryMonthly.Service.GetAmountOnDateDiffForAll(employeeID, dFromDate, dToDate,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return amount;
// }
// public double GetPrvTaxAmount(EnumIncomeTaxDataFrom dataFrom, int employeeID, DateTime dFromDate, DateTime dToDate)
// {
// double amount = 0;
// amount = SalaryMonthly.Service.GetPrvTaxAmount(dataFrom, employeeID, dFromDate, dToDate);
// return amount;
// }
// public static DataSet GetEmpSalarySheetForIDLC(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetEmpSalarySheetForIDLC(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetNewCCWiseSalarySummary(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetNewCCWiseSalarySummary(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetOnRange(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetOnRange(sEmpID, fromDate, toDate, groupCode, itemCode);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetOnRange(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode,int itemId)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetOnRange(sEmpID, fromDate, toDate, groupCode, itemCode,itemId);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetOTHourByReverseCal(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetOTHourByReverseCal(sEmpID, fromDate, toDate, groupCode, itemCode, 1);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static List<SalaryMonthly> Get(string sEmpID, DateTime fromdate, DateTime toDate)
// {
// List<SalaryMonthly> oSalaryMonthly = null;
// oSalaryMonthly = Service.Get(sEmpID, fromdate, toDate,SystemInformation.CurrentSysInfo.PayrollTypeID.Integer);
// return oSalaryMonthly;
// }
// public static DataSet GetCCWiseSalarySheetDetail(DateTime dSMonthDate, string sEmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetCCWiseSalarySheetDetail(dSMonthDate, sEmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet CostCenterCount(DateTime dSMonthDate)
// {
// DataSet ds = null;
// try
// {
// ds = Service.CostCenterCount(dSMonthDate);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
// public static DataSet GetLTAData(int EmpID)
// {
// DataSet ds = null;
// try
// {
// ds = Service.GetLTAData(EmpID);
// }
// catch (Exception e)
// {
// throw new Exception(e.Message, e);
// }
// return ds;
// }
}
#endregion
public class SalaryProcessStatus
{
public SalaryProcessStatus()
{
_employeeNo = "";
_name = "";
_remarks = "";
}
public SalaryProcessStatus(string empCode, string name, string remarks)
{
_employeeNo = empCode;
_name = name;
_remarks = remarks;
}
#region EmployeeNo : Employee No
private string _employeeNo;
public string EmployeeNo
{
get { return _employeeNo; }
set
{
_employeeNo = value;
}
}
#endregion
#region Employee Name : Employee Name
private string _name;
public string Name
{
get { return _name; }
set
{
_name = value;
}
}
#endregion
#region remaks : remarks
private string _remarks;
public string Remarks
{
get { return _remarks; }
set
{
_remarks = value;
}
}
#endregion
}
#region ISalaryMonthly Service
public class salaryHistory
{
public salaryHistory()
{
this.amount = 0;
this.referenceID = null;
}
public int empid { get; set; }
public DateTime salaryMonth { get; set; }
public EnumSalaryGroup groupCode { get; set; }
public EnumSalaryItemCode itemCode { get; set; }
public int itemID { get; set; }
public int? referenceID { get; set; }
public double amount { get; set; }
}
public interface ISalaryMonthlyService
{
DataSet GetSalaryStracture(string SempIds);
SalaryMonthly Get(int id);
DateTime? GetLastPaidSalaryMonth(int nEmpID);
void Update(SalaryMonthly item);
//void UpdateSalaryDetail(SalaryMonthlyDetail item);
void UpdateDetail(List<SalaryMonthlyDetail> oSMontlyDetails, List<IncomeTax> otaxDeduc);
void Save(SalaryProcess process, List<SalaryMonthly> items);
void Delete(int id);
DataSet GetSumOnRange(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode,
EnumSalaryItemCode itemCode, int itemId, int payrollTypeID);
double GetSumOnRange(int employeeId, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode,
EnumSalaryItemCode itemCode, int itemId, int payrollTypeID);
double GetSumOnRangeOnRound(int employeeId, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode,
EnumSalaryItemCode itemCode, int itemId, int payrollTypeID);
//double GetGrossOnRange(int employeeId, DateTime fromDate, DateTime toDate, EnumSalaryItemCode itemCode, int itemId);
SalaryMonthly Get(int nEmpID, DateTime dateTime);
List<SalaryMonthly> Get(DateTime salaryMonth, int payrollTypeID);
List<SalaryMonthly> GetForJV(DateTime salaryMonth, int payrollTypeID);
//List<SalaryMonthly> Get(int nEmpID);
List<SalaryMonthly> Get(string sEmpID, DateTime salaryMonth, int payrollTypeID);
List<SalaryMonthly> GetForWTP(string sEmpID, DateTime salaryMonth, int payrollTypeID);
List<SalaryEmpCostCenter> GetForCC(int SalaryMonthID);
List<SalaryEmpCostCenter> GetCostCenter(DateTime salaryMonth);
DataSet GetEmpPaySlipGrossForOthers(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipDeductForOthers(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipDeductForCitiOthers(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipDeductForLR(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipIncomeTaxAmountForOthers(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipGross(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpOverAllSummaryGross(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpOverAllSummaryDeduct(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipDeduct(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpPaySlipIncomeTaxAmount(DateTime dSalaryMonthDate, string sEmpID);
DataSet GetEmpSalaryProcessedData(DateTime dSalaryMonthDate, string employeeno);
DataSet GetEmpSalarySheetByCC(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpSalarySheet(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpSalarySheetForManagement(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpSalarySheetForNonManagement(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpSalarySheetForIDLC(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpPrevDataForSRecon(DateTime dSalaryMonth);
DataSet GetEmpSalarySheetForNovertis(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpSalaryReconForCurrMonth(DateTime dSalaryMonth, string sEmpID);
DataSet GetSGSSalarySheet(DateTime dSalaryMonth, string sEmpID);
DataSet GetExtendedSalarySheet(DateTime dSalaryMonth, string sEmpID);
DataSet GetPrvMonthNetSalary(DateTime dSalaryMonth, string sEmpID, bool IsNetSum);
DataSet GetEmpSSSummaryByDept(DateTime dSalaryMonth, string sEmpID);
DataSet GetCCWiseSalarySheet(DateTime dSalaryMonth, string sEmpID);
DataSet GetNewCCWiseSalarySummary(DateTime dSMonthDate, string sEmpID);
DataSet GetCCWiseSalarySummary(DateTime dSalaryMonth, string sEmpID);
double GetUnAuthorizeAmountOnDateRange(int employeeId, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode);
bool IsSalaryProcessed(int employeeID, DateTime SalaryMonth);
bool IsSalaryProcessedWeb(DateTime SalaryMonth, int payrollTypeID);
bool IsPermanentEmp(int employeeID, DateTime SalaryMonth, int payrollTypeID);
void IsSalaryProcessedAndFinalized(int employeeID, DateTime SalaryMonth, ref bool isprocessed, ref bool isfinalized);
int GetUnAuthorizeDays(int employeeid, DateTime salaryMonth);
List<SalaryMonthlyDetail> GetSalaryDetail(int salaryMonthlyID);
List<SalaryMonthlyDetail> GetSalaryDetail(string salaryMonthlyIDs);
int GetTotalEmp(int SalaryProcessID);
DataSet GetEmpSalaryReconForNovertis(DateTime dSalaryMonth);
double GetAmountOnDateDiff(int employeeID, DateTime fromDate, DateTime toDate,
EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId, int payrollTypeID);
double GetThisMonthBasicOnDateDiff(int employeeID, DateTime fromDate, DateTime toDate,
EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId, int payrollTypeID);
double GetAmountOnDateDiffForOverTime(int employeeID, DateTime fromDate, DateTime toDate,
EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId, int payrollTypeID);
double GetAmountOnDateDiffForAll(int employeeID, DateTime fromDate, DateTime toDate, int payrollTypeID);
double GetPrvTaxAmount(EnumIncomeTaxDataFrom dataFrom, int employeeID, DateTime fromDate, DateTime toDate);
DataSet GetEmpSalarySheetByYear(DateTime dSalaryMonth, string sEmpID);
DataSet GetEmpStartDateAndEndDate(DateTime fstDate, DateTime endDate, string sEmpID);
List<SalaryMonthly> GetByDateRange(DateTime startDate, DateTime endDate, int payrollTypeID);
List<SalaryMonthly> GetByDateRange(int nEmpID, DateTime startDate, DateTime endDate, int payrollTypeID);
DataSet GetEmpSalaryReconciliationSummary(DateTime dSMonthDate, string sEmpID);
List<SalaryMonthlyDetail> GetHead(int index, DateTime salaryMonth);
List<SalaryMonthly> Get(string sEmpID, DateTime fromdate, DateTime toDate, int payrollTypeID);
DataSet GetCCWiseSalarySheetDetail(DateTime dSMonthDate, string sEmpID);
DataSet CostCenterCount(DateTime dSMonthDate);
DataSet GetCasualSalarySheet(DateTime dSMonthDate, string sEmpID);
DataSet GetEmpSalarySheet(DateTime dSMonthDate, DateTime dEMonthDate, string sEmpID);
List<SalaryMonthly> GetByProcessID(int SProcessID);
DataSet GetOnRange(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode);
DataSet GetOnRange(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId);
DataSet GetOTHourByReverseCal(string sEmpID, DateTime fromDate, DateTime toDate, EnumSalaryGroup groupCode, EnumSalaryItemCode itemCode, int itemId);
DataSet GetLTAData(int EmpID);
void IsSalaryProcessedAndFinalized(DateTime dateTime, ref bool isprocessed, ref bool isfinalized);
DataTable GetNetAmount(DateTime salaryMonth, int payrollTypeid);
DataTable GetWithheldData(DateTime dateTime, int payrollTypeID);
void Updatepayment(DateTime paymentDate, int salarymonthlyid, string chequeNo, string remarks, int userID);
DataSet GetGrossDeduction(int empID, DateTime salaryMonth);
List<salaryHistory> GetSalaryHistories(int payrolltypeid, string emps, DateTime fromMonth, DateTime toMonth);
DataSet GetPFForLetterRequest(int sEmpID);
}
#endregion
}