dev_chapal #5

Merged
chapal merged 2 commits from dev_chapal into devqc 2024-10-17 12:57:41 +06:00
2 changed files with 7 additions and 6 deletions

View File

@ -85,7 +85,7 @@ export class ProductionBonusAttendanceComponent implements OnInit {
// this.endTime.setHours(23); // this.endTime.setHours(23);
// this.endTime.setMinutes(0); // this.endTime.setMinutes(0);
// this.endTime.setSeconds(0); // this.endTime.setSeconds(0);
this.endTime = this.setTime(this.endTime, 23, 0, 0) this.endTime = this.setTime(this.endTime, 23, 59, 0)
} }
employeeList: Employee[] = []; employeeList: Employee[] = [];
@ -196,11 +196,11 @@ export class ProductionBonusAttendanceComponent implements OnInit {
() => { () => {
this.loadingPanelService.ShowLoadingPanel = false; this.loadingPanelService.ShowLoadingPanel = false;
this.employeeList = []; this.employeeList = [];
// debugger; debugger;
if (this.prodBonusAttn.length <= 0 && (this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Cutting || if (this.prodBonusAttn.length <= 0 && (this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Cutting ||
this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Finishing)) { this.productionBonusSetup.productionBonusType == EnumProductionBonusType.Finishing)) {
let data = { let data = {
prodLine: this.prodBonusLine, prodLine: this.selectedLine,
date: this.selectedDate date: this.selectedDate
} }
this.loadingPanelService.ShowLoadingPanel = true; this.loadingPanelService.ShowLoadingPanel = true;
@ -234,7 +234,7 @@ export class ProductionBonusAttendanceComponent implements OnInit {
this.AddEmployeebyId(this.prodBonusAttn[i].employeeID); this.AddEmployeebyId(this.prodBonusAttn[i].employeeID);
} }
let inTime = new Date(this.prodBonusAttn[0].inTime); let inTime = new Date(this.prodBonusAttn[0].inTime);
let outTime = new Date(this.prodBonusAttn[0].inTime); let outTime = new Date(this.prodBonusAttn[0].outTime);
this.startTime = this.setTime(inTime, inTime.getHours(), inTime.getMinutes(), inTime.getSeconds()); this.startTime = this.setTime(inTime, inTime.getHours(), inTime.getMinutes(), inTime.getSeconds());
this.endTime = this.setTime(outTime, outTime.getHours(), outTime.getMinutes(), outTime.getSeconds()); this.endTime = this.setTime(outTime, outTime.getHours(), outTime.getMinutes(), outTime.getSeconds());
} }

View File

@ -745,6 +745,7 @@ namespace HRM.UI.Controllers.Payroll
DateTime dtpSalaryMonth = (DateTime)pItem["salaryMonthDate"].ToObject<DateTime>(); DateTime dtpSalaryMonth = (DateTime)pItem["salaryMonthDate"].ToObject<DateTime>();
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User); CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
int payrollTypeId = currentUser.PayrollTypeID.GetValueOrDefault(); int payrollTypeId = currentUser.PayrollTypeID.GetValueOrDefault();
//int setupID = ConfigurationManager.GetIntValue("bonus", "productionbonussetupid", EnumConfigurationType.Logic); //int setupID = ConfigurationManager.GetIntValue("bonus", "productionbonussetupid", EnumConfigurationType.Logic);
@ -780,7 +781,7 @@ namespace HRM.UI.Controllers.Payroll
//DateTime nextPayProcessDate = new SystemInformationService().Get().NextPayProcessDate; //DateTime nextPayProcessDate = new SystemInformationService().Get().NextPayProcessDate;
CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User); CurrentUser currentUser = CurrentUser.GetCurrentUser(HttpContext.User);
DateTime nextPayProcessDate = currentUser.NextPayProcessDate.GetValueOrDefault(); DateTime nextPayProcessDate = currentUser.NextPayProcessDate.GetValueOrDefault();
int payrollTypeId = currentUser.PayrollTypeID.GetValueOrDefault();
if (dtpSalaryMonth.Month == nextPayProcessDate.Month && dtpSalaryMonth.Year == nextPayProcessDate.Year) if (dtpSalaryMonth.Month == nextPayProcessDate.Month && dtpSalaryMonth.Year == nextPayProcessDate.Year)
{ {
List<ProdBonusProcess> oProdBonusProsses = _prodBonusProcessService.Get(GlobalFunctions.LastDateOfMonth(dtpSalaryMonth)); List<ProdBonusProcess> oProdBonusProsses = _prodBonusProcessService.Get(GlobalFunctions.LastDateOfMonth(dtpSalaryMonth));
@ -790,7 +791,7 @@ namespace HRM.UI.Controllers.Payroll
{ {
//int setupID = ConfigurationManager.GetIntValue("bonus", "productionbonussetupid", EnumConfigurationType.Logic); //int setupID = ConfigurationManager.GetIntValue("bonus", "productionbonussetupid", EnumConfigurationType.Logic);
int setupID = 21; int setupID = 21;
ADParameter _ADParam = new ADParameterService().Get(setupID); ADParameter _ADParam = new ADParameterService().Get(setupID, payrollTypeId);
_prodBonusProcessService.UndoProcess(oProdBonusProsses, _ADParam, GlobalFunctions.LastDateOfMonth(dtpSalaryMonth)); _prodBonusProcessService.UndoProcess(oProdBonusProsses, _ADParam, GlobalFunctions.LastDateOfMonth(dtpSalaryMonth));
//MessageBox.Show("Bonus process deleted successfully.", "Undo Bonus Process", MessageBoxButtons.OK, MessageBoxIcon.Information); //MessageBox.Show("Bonus process deleted successfully.", "Undo Bonus Process", MessageBoxButtons.OK, MessageBoxIcon.Information);