From 623eb7b3fc4c1d933f5413c71aa72c12be2163a1 Mon Sep 17 00:00:00 2001 From: "quan.tran" Date: Mon, 2 Dec 2024 17:57:07 +0700 Subject: [PATCH] fix type register date --- packages/sequence/src/sequences.service.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/sequence/src/sequences.service.ts b/packages/sequence/src/sequences.service.ts index f341aca..2eea54b 100644 --- a/packages/sequence/src/sequences.service.ts +++ b/packages/sequence/src/sequences.service.ts @@ -146,7 +146,7 @@ export class SequencesService implements ISequenceService { const issuedAt = toISOStringWithTimezone(date || now) const nowFiscalYear = this.getFiscalYear({ now: date || now, - registerTime: registerDate, + registerTime: registerDate ? new Date(registerDate) : undefined, startMonth, }) const sourceIp = @@ -284,6 +284,7 @@ export class SequencesService implements ISequenceService { const { now, startMonth = 4, registerTime } = options + const effectiveStartMonth = registerTime ? registerTime.getMonth() + 1 : startMonth ?? 4