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, }, });