This commit is contained in:
AdisakKanthawilang 2024-03-07 10:05:22 +07:00
parent ae0d0388b8
commit d7fc649854

View file

@ -931,9 +931,14 @@ export class ProfileController extends Controller {
.leftJoinAndSelect("current_holder.posType", "posType")
.where({
orgRevisionId: findRevision?.id,
orgRootId: body.rootId == null ? "1=1" : body.rootId,
current_holderId: Not(IsNull()),
})
.orWhere(
body.rootId == null ? "1=1" : "posMaster.orgRootId = :rootId",
{
rootId: body.rootId,
},
)
.andWhere(
new Brackets((qb) => {
qb.where(