diff --git a/src/controllers/branch-user-controller.ts b/src/controllers/branch-user-controller.ts index a6e9e80..bb63ea6 100644 --- a/src/controllers/branch-user-controller.ts +++ b/src/controllers/branch-user-controller.ts @@ -49,7 +49,7 @@ async function userBranchCodeGen(branch: Branch, user: User[]) { await tx.user.update({ where: { id: usr.id }, data: { - code: mapTypeNo + `${last.value}`.padStart(6, "9"), + code: mapTypeNo + `${last.value}`.padStart(6, "0"), }, }); } diff --git a/src/controllers/user-controller.ts b/src/controllers/user-controller.ts index 0ac3604..391df2e 100644 --- a/src/controllers/user-controller.ts +++ b/src/controllers/user-controller.ts @@ -145,7 +145,7 @@ async function userBranchCodeGen(user: User, branch: Branch) { return await tx.user.update({ where: { id: user.id }, data: { - code: mapTypeNo + `${last.value}`.padStart(6, "9"), + code: mapTypeNo + `${last.value}`.padStart(6, "0"), }, }); },