This commit is contained in:
AdisakKanthawilang 2025-09-05 13:08:26 +07:00
parent 8f62a41db3
commit 2f94ee747e

View file

@ -3543,15 +3543,15 @@ export class CommandController extends Controller {
const clearProfile = await checkCommandType(String(item.commandId));
//ปั๊มประวัติก่อนลบตำแหน่ง
const curRevition = await this.orgRevisionRepo.findOne({
const curRevision = await this.orgRevisionRepo.findOne({
where: { orgRevisionIsCurrent: true, orgRevisionIsDraft: false }
})
if(curRevition){
if(curRevision){
const curPosMaster = await this.posMasterRepository.findOne({
where:{
current_holderId: profile.id,
orgRevisionId: curRevition.id
orgRevisionId: curRevision.id
}
})
if (curPosMaster && clearProfile.LeaveType != "RETIRE_OUT_EMP") {