fix: typo 9 (should be 0)

This commit is contained in:
Methapon2001 2024-08-14 20:16:40 +07:00
parent 3aa405db7b
commit 5b75fe46b0
2 changed files with 2 additions and 2 deletions

View file

@ -49,7 +49,7 @@ async function userBranchCodeGen(branch: Branch, user: User[]) {
await tx.user.update({ await tx.user.update({
where: { id: usr.id }, where: { id: usr.id },
data: { data: {
code: mapTypeNo + `${last.value}`.padStart(6, "9"), code: mapTypeNo + `${last.value}`.padStart(6, "0"),
}, },
}); });
} }

View file

@ -145,7 +145,7 @@ async function userBranchCodeGen(user: User, branch: Branch) {
return await tx.user.update({ return await tx.user.update({
where: { id: user.id }, where: { id: user.id },
data: { data: {
code: mapTypeNo + `${last.value}`.padStart(6, "9"), code: mapTypeNo + `${last.value}`.padStart(6, "0"),
}, },
}); });
}, },