From 11a6918e9643ac366c22073307d6f46b0bdff043 Mon Sep 17 00:00:00 2001 From: Methapon2001 <61303214+Methapon2001@users.noreply.github.com> Date: Wed, 29 Jan 2025 10:50:13 +0700 Subject: [PATCH] fix: error --- src/controllers/05-quotation-controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/controllers/05-quotation-controller.ts b/src/controllers/05-quotation-controller.ts index e653883..cc6fe6b 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -1047,7 +1047,7 @@ export class QuotationActionController extends Controller { const data = await tx.employee.create({ data: { ...v.workerData, - code: `${customerBranch.code}-${`${new Date().getFullYear()}`.slice(-2).padStart(2, "0")}${`${lastEmployee.value - nonExistEmployee.length + i + 1}`.padStart(7, "0")}`, + code: `${customerBranch.code}-${`${new Date().getFullYear()}`.slice(-2).padStart(2, "0")}${`${lastEmployee.value - newEmployee.length + i + 1}`.padStart(7, "0")}`, customerBranchId: customerBranch.id, }, });