diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index be14db4c..cd0785e4 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -3601,7 +3601,7 @@ export class CommandController extends Controller { positionNew.positionIsSelected = true; await this.positionRepository.save(positionNew, { data: req }); } - await CreatePosMasterHistoryOfficer(posMaster.id, req); + // await CreatePosMasterHistoryOfficer(posMaster.id, req); } const newMapProfileSalary = { profileId: profile.id, @@ -3706,6 +3706,9 @@ export class CommandController extends Controller { profile.isActive = true; } await this.profileRepository.save(profile); + if (item.posmasterId && clearProfile.LeaveType != "RETIRE_OUT_EMP") { + await CreatePosMasterHistoryOfficer(item.posmasterId, req); + } }), );