From 2f94ee747eac7c17fc43762e4905593ac4413e01 Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Fri, 5 Sep 2025 13:08:26 +0700 Subject: [PATCH] update --- src/controllers/CommandController.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 701f8462..b5e40dd4 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -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") {