From cf151951b88e52bff850c9ca86c3916e6726dd19 Mon Sep 17 00:00:00 2001 From: Methapon Metanipat Date: Thu, 7 Nov 2024 09:34:00 +0700 Subject: [PATCH] refactor: remove date from code gen --- 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 b2995d7..3e8ee6e 100644 --- a/src/controllers/05-quotation-controller.ts +++ b/src/controllers/05-quotation-controller.ts @@ -502,7 +502,7 @@ export class QuotationController extends Controller { ...rest, ...price, statusOrder: +(rest.status === "INACTIVE"), - code: `QT${currentYear.toString().padStart(2, "0")}${currentMonth.toString().padStart(2, "0")}${currentDate.toString().padStart(2, "0")}${lastQuotation.value.toString().padStart(4, "0")}`, + code: `QT${currentYear.toString().padStart(2, "0")}${currentMonth.toString().padStart(2, "0")}${lastQuotation.value.toString().padStart(6, "0")}`, worker: { createMany: { data: sortedEmployeeId.map((v, i) => ({