fix: code not convert to uppercase can't create branch

This commit is contained in:
Methapon Metanipat 2024-08-22 14:18:15 +07:00
parent b0b54451a2
commit 1d68cc2d61

View file

@ -310,10 +310,10 @@ export class BranchController extends Controller {
async (tx) => { async (tx) => {
const last = await tx.runningNo.upsert({ const last = await tx.runningNo.upsert({
where: { where: {
key: `MAIN_BRANCH_${code}`, key: `MAIN_BRANCH_${code.toLocaleUpperCase()}`,
}, },
create: { create: {
key: `MAIN_BRANCH_${code}`, key: `MAIN_BRANCH_${code.toLocaleUpperCase()}`,
value: 1, value: 1,
}, },
update: { value: { increment: 1 } }, update: { value: { increment: 1 } },