EchoTex_Payroll/HRM.BO/Salary/SalaryException.cs

106 lines
5.0 KiB
C#
Raw 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
{
public class SalaryException
{
#region Define Class Veriable
List<AllowanceDeduction> oAllDeducts;
#endregion Define Class Veriable
//public SalaryException()
//{
// oAllDeducts = AllowanceDeduction.Get(EnumStatus.Regardless);
//}
//public void SalaryExceptionCalculation(SalaryCalculator scalculator)
//{
// //if (SystemInformation.CurrentSysInfo.PayrollTypeID.Integer == (int)EnumBATBBonusType.Management_Corporate)
// //{
// // string Acting = ConfigurationManager.GetStringValue("salary", "actingallowance", EnumConfigurationType.Logic);
// // string[] Actingsplited = Acting.Split(',');
// // string forthShift = ConfigurationManager.GetStringValue("salary", "forthshiftallowid", EnumConfigurationType.Logic);
// // string[] forthShiftsplited = forthShift.Split(',');
// // #region Remove
// // List<ActingResponsibilitySetup> ActingAllow = ActingResponsibilitySetup.Service.GetBySalaryMonth(scalculator._processMonth);
// // foreach (SalaryMonthly omonthly in scalculator.SalaryMonthlies)
// // {
// // foreach (SalaryMonthlyDetail odetail in omonthly.Details)
// // {
// // if (Actingsplited.Length != 2)
// // {
// // if (odetail.ItemID.ToString() == Actingsplited[0] && odetail.itemGroupCode == EnumSalaryGroup.Gross && odetail.ItemCode == EnumSalaryItemCode.Allowance)
// // {
// // odetail.CalculatedAmount = 0;
// // odetail.ChangedAmount = 0;
// // }
// // }
// // if (forthShiftsplited.Length != 2)
// // {
// // if (odetail.ItemID.ToString() == forthShiftsplited[0] && odetail.itemGroupCode == EnumSalaryGroup.Gross && odetail.ItemCode == EnumSalaryItemCode.Allowance)
// // {
// // odetail.CalculatedAmount = 0;
// // odetail.ChangedAmount = 0;
// // }
// // }
// // }
// // }
// // #endregion
// // #region Acting Allowance
// // foreach (ActingResponsibilitySetup act in ActingAllow)
// // {
// // SalaryMonthly omonthly = scalculator.SalaryMonthlies.FirstOrDefault(x => x.EmployeeID.Integer == act.EmployeeID.Integer);
// // if (omonthly != null)
// // {
// // SalaryMonthlyDetail odetail = omonthly.Details.FirstOrDefault(x => x.ItemID.ToString() == Actingsplited[0] && x.itemGroupCode == EnumSalaryGroup.Gross && x.ItemCode == EnumSalaryItemCode.Allowance);
// // if (odetail == null)
// // {
// // scalculator.AddDetail(omonthly, EnumSalaryGroup.Gross, EnumSalaryItemCode.Allowance, Convert.ToInt32(Actingsplited[0]), Convert.ToInt32(Actingsplited[1]), "Acting Allowance", act.Amount);
// // }
// // else odetail.CalculatedAmount = act.Amount;
// // }
// // }
// // #endregion
// // #region ForthShif Allowance
// // List<EmployeeWorkPlanSetup> empWorkPlans = EmployeeWorkPlanSetup.Get(EnumWorkPlanGroup.Counter_Clock_1);
// // ADParameter oparameter = scalculator.Adparameter.FirstOrDefault(x => x.ID.Integer == Convert.ToInt32(forthShiftsplited[1]));
// // double Amount = oparameter.FlatAmount;
// // foreach (EmployeeWorkPlanSetup act in empWorkPlans)
// // {
// // SalaryMonthly omonthly = scalculator.SalaryMonthlies.FirstOrDefault(x => x.EmployeeID.Integer == act.EmployeeID.Integer);
// // if (omonthly != null)
// // {
// // SalaryMonthlyDetail odetail = omonthly.Details.FirstOrDefault(x => x.ItemID.ToString() == forthShiftsplited[0] && x.itemGroupCode == EnumSalaryGroup.Gross && x.ItemCode == EnumSalaryItemCode.Allowance);
// // if (odetail == null)
// // {
// // scalculator.AddDetail(omonthly, EnumSalaryGroup.Gross, EnumSalaryItemCode.Allowance, Convert.ToInt32(forthShiftsplited[0]), Convert.ToInt32(forthShiftsplited[1]), "Acting Allowance", Amount);
// // }
// // else odetail.CalculatedAmount = Amount;
// // }
// // }
// // #endregion
// //}
//}
}
}