From 22d45ea7ecd439af39ece8a5a3d13d9024661490 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 17 Jan 2025 12:53:56 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B8=B3=E0=B9=80=E0=B8=99=E0=B8=B2?= =?UTF-8?q?=20=E0=B8=82=E0=B8=A3=E0=B8=81=20=E0=B8=A5=E0=B8=B8=E0=B8=81?= =?UTF-8?q?=E0=B8=88=E0=B9=89=E0=B8=B2=E0=B8=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/controllers/CommandController.ts | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index 3523acee..d1afbb40 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -1971,13 +1971,21 @@ export class CommandController extends Controller { select: ["orgRootId"], }); } else { - posMaster = await this.posMasterRepository.find({ + var posMasterOfficer = await this.posMasterRepository.find({ where: { current_holderId: In(requestBody.persons.map((x) => x.profileId)), orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, }, select: ["orgRootId"], }); + var posMasterEmployee = await this.employeePosMasterRepository.find({ + where: { + current_holderId: In(requestBody.persons.map((x) => x.profileId)), + orgRevision: { orgRevisionIsDraft: false, orgRevisionIsCurrent: true }, + }, + select: ["orgRootId"], + }); + posMaster = [...posMasterOfficer, ...posMasterEmployee]; } let _posMaster: any;